body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: rgba(245, 245, 245, 0.8);
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    --search-bg-opacity: 0.9;
    --blur-strength: 20px;
}

.container {
    background-color: rgba(255, 255, 255, var(--search-bg-opacity));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

h1, h2 {
    color: #333;
    margin-bottom: 1rem;
}

.search-container {
    display: flex;
    margin-bottom: 2rem;
    padding: 0.5rem;
    position: relative;
    z-index: 1100;
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.search-wrapper:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.35);
}

#search-input {
    flex-grow: 1;
    padding: 12px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
}

#search-button {
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#search-button:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

#search-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.bookmarks-container {
    position: relative;
    z-index: 1000;
    margin-bottom: 2rem;
}

#bookmarks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.bookmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.bookmark:hover {
    background-color: #f0f0f0;
}

.bookmark img {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
}

.settings-container {
    margin-top: 2rem;
}

#theme-select {
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#online-version-notice {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 5px;
    text-align: center;
}

#online-version-notice a {
    color: #721c24;
    font-weight: bold;
}

.notice-close {
    background: none;
    border: none;
    color: #721c24;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.3rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.notice-close:hover {
    opacity: 0.7;
}

.hidden {
    display: none;
}

/* Dark theme */
body.dark-theme {
    background-color: #333;
}

body.dark-theme .container {
    background-color: rgba(68, 68, 68, var(--search-bg-opacity));
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme .bookmark {
    color: #f5f5f5;
}

body.dark-theme #search-input {
    background-color: #555;
    color: #f5f5f5;
    border-color: #666;
}

body.dark-theme .bookmark:hover {
    background-color: #555;
}

body.dark-theme #theme-select {
    background-color: #555;
    color: #f5f5f5;
    border-color: #666;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.settings-button {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.settings-button:hover {
    color: rgba(255, 255, 255, 1);
    transform: rotate(45deg);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media screen and (max-width: 768px) {
    .modal.show {
        align-items: flex-start;
    }

    .modal.show ~ .container {
        display: none;
    }

    .modal-content {
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .container {
        transition: visibility 0.3s ease;
    }

    .container[style*="visibility: hidden"] {
        display: none;
    }
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 0;
    width: 500px;
    height: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: modalSlideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 500;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    /* 添加滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

/* 自定义滚动条样式 */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

/* 深色主题滚动条 */
body.dark-theme .modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-height: 700px) {
    .modal-content {
        height: 90vh;
    }
}

@media (max-width: 600px) {
    .modal-content {
        width: 90%;
        height: 80vh;
    }
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 0.5rem;
}

.close-modal:hover {
    color: #333;
}

.settings-section {
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-section.vertical {
    flex-direction: column;
    align-items: flex-start;
}

.settings-section.vertical label {
    margin-bottom: 8px;
    color: #666;
}

.settings-section.vertical .control-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-section.vertical input[type="range"] {
    flex: 1;
    margin: 0;
}

body.dark-theme .settings-section.vertical label {
    color: #aaa;
}

.settings-section label {
    margin-right: 10px;
    flex: 1;
}

#opacity-value {
    display: inline-block;
    min-width: 3em;
    text-align: right;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 深色主题适配 */
body.dark-theme .modal-content {
    background-color: #444;
}

body.dark-theme .modal-header {
    border-bottom-color: #555;
}

body.dark-theme .close-modal {
    color: #aaa;
}

body.dark-theme .close-modal:hover {
    color: #fff;
}

body.dark-theme .settings-button {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-theme .settings-button:hover {
    background-color: rgba(120, 169, 255, 0.1);
}

.clock-container {
    text-align: center;
    margin-bottom: 2rem;
}

#clock {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 300;
    color: #f5f5f5;
    font-family: 'Roboto', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

body.dark-theme #clock {
    color: #f5f5f5;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    border-radius: 12px;
    padding: 8px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.search-wrapper:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.35);
}

#search-input {
    flex-grow: 1;
    padding: 12px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
}

#search-button {
    padding: 12px 24px;
    font-size: 1rem;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

#search-button:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

#search-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.search-engine-select {
    padding: 10px 36px 10px 40px;
    border: none;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-strength)) saturate(180%);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat, no-repeat;
    background-position: 12px center, right 12px center;
    background-size: 20px 20px, 12px 12px;
    min-width: 120px;
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1100;
}

.search-engine-select:hover {
    background-color: rgba(0, 0, 0, 0.12);
}

/* 深色主题样式更新 */
body.dark-theme .search-wrapper {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .search-wrapper:hover {
    background: rgba(0, 0, 0, 0.35);
}

body.dark-theme #search-input {
    color: #f5f5f5;
}

body.dark-theme #search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

body.dark-theme .search-engine-select {
    background-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .search-engine-select:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* 添加滑块样式 */
.settings-section input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    outline: none;
    margin: 10px 0;
}

.settings-section input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #4285f4;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-section input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: #3367d6;
}

body.dark-theme .settings-section input[type="range"] {
    background: #555;
}

body.dark-theme .settings-section input[type="range"]::-webkit-slider-thumb {
    background: #78a9ff;
}

body.dark-theme .settings-section input[type="range"]::-webkit-slider-thumb:hover {
    background: #5c8eff;
}

#blur-value, #opacity-value {
    display: inline-block;
    min-width: 4em;
    text-align: right;
    color: #666;
}

body.dark-theme #blur-value,
body.dark-theme #opacity-value {
    color: #aaa;
}

.fixed-bottom-right {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: transparent;
    box-shadow: none;
    z-index: 100;
    padding: 1rem;
}

.fixed-bottom-right:hover {
    background: transparent;
    box-shadow: none;
    transform: rotate(45deg);
}

body.dark-theme .fixed-bottom-right {
    background: transparent;
}

body.dark-theme .fixed-bottom-right:hover {
    background: transparent;
}

/* 开关样式 */
.toggle-switch {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-label {
    display: block;
    width: 48px;
    height: 24px;
    background-color: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-button {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-switch input:checked + .toggle-label {
    background-color: #4CAF50;
}

.toggle-switch input:checked + .toggle-label .toggle-button {
    transform: translateX(24px);
}

.toggle-switch input:focus + .toggle-label {
    box-shadow: 0 0 1px #4CAF50;
}

/* 适配深色主题 */
.dark-theme .toggle-label {
    background-color: #555;
}

.dark-theme .toggle-switch input:checked + .toggle-label {
    background-color: #6abf6e;
}

/* 自定义搜索引擎设置样式 */
.custom-search-engine {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.custom-search-engine h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
}

.settings-row {
    margin-bottom: 20px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-row label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.settings-row input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.settings-row input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
    background: rgba(255, 255, 255, 0.95);
}

.settings-row input::placeholder {
    color: #999;
}

.primary-button {
    width: 100%;
    padding: 12px 24px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.primary-button:hover {
    background: #3367d6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.primary-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

/* 深色主题适配 */
body.dark-theme .custom-search-engine {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .custom-search-engine h3 {
    color: #f5f5f5;
}

body.dark-theme .settings-row label {
    color: #aaa;
}

body.dark-theme .settings-row input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
}

body.dark-theme .settings-row input:focus {
    border-color: #78a9ff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 2px rgba(120, 169, 255, 0.2);
}

body.dark-theme .settings-row input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* 移除重复的样式 */
.search-engine-select {
    padding: 10px 36px 10px 40px;
    border: none;
    border-radius: 8px;
    background-color: rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(var(--blur-strength));
    -webkit-backdrop-filter: blur(var(--blur-strength));
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    background-repeat: no-repeat, no-repeat;
    background-position: 12px center, right 12px center;
    background-size: 20px 20px, 12px 12px;
    min-width: 120px;
    color: #333;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1100;
}

.input-tip {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

body.dark-theme .input-tip {
    color: #aaa;
}

.primary-button i {
    margin-right: 8px;
}

.settings-section.custom-search-engine {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    padding-top: 30px;
}

body.dark-theme .settings-section.custom-search-engine {
    border-top-color: rgba(255, 255, 255, 0.1);
}

/* 输入框动画效果 */
.settings-row input {
    transform-origin: left top;
    transition: all 0.3s ease;
}

.settings-row input:focus {
    transform: scale(1.01);
}

/* 添加搜索引擎按钮动画 */
.primary-button {
    position: relative;
    overflow: hidden;
}

.primary-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.primary-button:hover::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

.settings-title {
    color: #333;
    font-size: 1.1em;
    font-weight: 500;
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-theme .settings-title {
    color: #f5f5f5;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.custom-search-engine {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-theme .custom-search-engine {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.custom-search-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
    width: 100%;
}

.custom-search-item {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    width: 100%;
}

.custom-search-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.15);
}

.custom-search-item img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-right: 12px;
    object-fit: cover;
}

.custom-search-item .search-info {
    flex: 1;
    min-width: 0;
}

.custom-search-item .search-name {
    font-weight: 500;
    margin-bottom: 4px;
    color: #333;
}

.custom-search-item .search-url {
    font-size: 0.85em;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-search-item .action-buttons {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.custom-search-item .action-button {
    padding: 6px;
    border: none;
    background: none;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.custom-search-item .edit-button:hover {
    color: #4285f4;
    background: rgba(66, 133, 244, 0.1);
}

.custom-search-item .delete-button:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* 深色主题适配 */
body.dark-theme .custom-search-item {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .custom-search-item:hover {
    background: rgba(0, 0, 0, 0.3);
}

body.dark-theme .custom-search-item .search-name {
    color: #fff;
}

body.dark-theme .custom-search-item .search-url {
    color: #aaa;
}

body.dark-theme .custom-search-item .action-button {
    color: #aaa;
}

/* 添加搜索引擎表单样式优化 */
.settings-section.custom-search-engine {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.settings-row label {
    display: block;
    font-weight: 500;
    color: #333;
}

.settings-row input {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.input-tip {
    display: block;
    font-size: 0.85em;
    color: #666;
}

/* 深色主题适配 */
body.dark-theme .settings-section.custom-search-engine {
    background: rgba(0, 0, 0, 0.2);
}

body.dark-theme .settings-row label {
    color: #f5f5f5;
}

body.dark-theme .settings-row input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-theme .input-tip {
    color: #aaa;
}

/* 移动端响应式样式 */
@media screen and (max-width: 768px) {
    body {
        padding: 0;
        background-attachment: initial;
    }

    .container {
        background: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 1rem;
        margin: 0;
        width: 100%;
        max-width: none;
        border-radius: 0;
    }

    #clock {
        font-size: 2rem;
        top: 1rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }

    .search-container {
        margin-top: 4rem;
        padding: 0 1rem;
    }

    .search-wrapper {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        background: var(--search-bg-color, rgba(255, 255, 255, var(--search-bg-opacity)));
        border-radius: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(var(--blur-strength));
        -webkit-backdrop-filter: blur(var(--blur-strength));
        border: none;
    }

    .search-engine-select {
        width: 100%;
        padding: 0.5rem 0;
        margin-bottom: 0.5rem;
        font-size: 1rem;
        background-color: transparent;
        border: none;
        text-align: left;
        color: var(--text-color, #333);
        min-width: auto;
        background-position: left center, right 0.5rem center;
        background-size: 16px 16px, 12px 12px;
        padding-left: 24px;
    }

    #search-input {
        width: 100%;
        padding: 0.5rem 0;
        font-size: 1rem;
        border: none;
        border-bottom: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
        border-radius: 0;
        background: transparent;
        color: var(--text-color, #333);
    }

    #search-input::placeholder {
        color: var(--placeholder-color, rgba(0, 0, 0, 0.4));
    }

    #search-button {
        width: 100%;
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 0.5rem;
        margin-top: 0.75rem;
        background-color: var(--button-color, #4285f4);
        color: #fff;
    }

    .bookmarks-container {
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .bookmarks-container h2 {
        font-size: 0.875rem;
        color: var(--text-color-secondary, rgba(0, 0, 0, 0.7));
        margin-bottom: 1rem;
        margin-left: 0.5rem;
    }

    #bookmarks-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem 2rem;
        padding: 0;
    }

    .bookmark {
        padding: 0;
        background: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .bookmark img {
        width: 3rem;
        height: 3rem;
        margin-bottom: 0.5rem;
        border-radius: 0.75rem;
    }

    .bookmark span {
        font-size: 0.75rem;
        color: var(--text-color-secondary, rgba(0, 0, 0, 0.7));
        text-align: center;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-all;
    }

    /* 设置按钮样式 */
    .settings-button {
        bottom: 1rem;
        right: 1rem;
        font-size: 1.25rem;
        padding: 0.75rem;
        background: var(--settings-button-bg, rgba(0, 0, 0, 0.3));
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-radius: 50%;
        color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }

    /* 设置面板样式 */
    .modal-content {
        width: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .settings-section {
        margin-bottom: 1.5rem;
    }

    /* 深色主题适配 */
    body.dark-theme .search-wrapper {
        --search-bg-color: rgba(40, 40, 40, var(--search-bg-opacity));
        --text-color: rgba(255, 255, 255, 0.9);
        --text-color-secondary: rgba(255, 255, 255, 0.7);
        --border-color: rgba(255, 255, 255, 0.2);
        --placeholder-color: rgba(255, 255, 255, 0.4);
        --button-color: #78a9ff;
        --settings-button-bg: rgba(255, 255, 255, 0.2);
    }

    body.dark-theme #search-button:hover {
        background-color: #5c8eff;
    }

    body.dark-theme .bookmark span {
        color: rgba(255, 255, 255, 0.7);
    }

    /* 移动端适配 */
    @media screen and (max-width: 768px) {
        .custom-select {
            min-width: 100px;
        }

        .selected-option {
            padding: 6px 8px;
        }

        .option {
            padding: 6px 8px;
        }

        /* 当编辑模态框打开时隐藏搜索框 */
        body .modal.show ~ .container .search-container,
        body .modal.show ~ .container .search-wrapper {
            display: none !important;
            visibility: hidden !important;
            opacity: 0 !important;
            pointer-events: none !important;
        }
    }

    /* 移动端设置面板打开时隐藏搜索相关元素 */
    @media (max-width: 768px) {
        .modal:not([style*="display: none"]) ~ .container .search-wrapper,
        .modal:not([style*="display: none"]) ~ .container .bookmarks-container {
            display: none;
        }
    }
}

/* 超小屏幕设备的优化 */
@media screen and (max-width: 320px) {
    .search-container {
        padding: 0 0.75rem;
    }

    .bookmarks-container {
        padding: 0 0.75rem;
    }

    #bookmarks-list {
        gap: 1rem 1.5rem;
    }

    .bookmark img {
        width: 2.5rem;
        height: 2.5rem;
    }

    .bookmark span {
        font-size: 0.7rem;
    }

    .settings-button {
        font-size: 1.3rem;
        padding: 0.6rem;
    }
}

.bookmarks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.icon-button {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.icon-button img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.icon-button:hover img {
    opacity: 1;
}

body.dark-theme .icon-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.bookmarks-edit-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#bookmarks-edit-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bookmark-edit-item {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    gap: 1rem;
}

.bookmark-edit-item img {
    width: 24px;
    height: 24px;
}

.bookmark-edit-info {
    flex-grow: 1;
}

.bookmark-edit-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.bookmark-edit-url {
    font-size: 0.85rem;
    color: #666;
}

.bookmark-edit-actions {
    display: flex;
    gap: 0.5rem;
}

.bookmark-edit-actions button {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: #4285f4;
    color: white;
}

.edit-btn:hover {
    background-color: #3367d6;
}

.delete-btn {
    background-color: #dc3545;
    color: white;
}

.delete-btn:hover {
    background-color: #c82333;
}

body.dark-theme .bookmark-edit-item {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-theme .bookmark-edit-url {
    color: #aaa;
}

/* 添加书签时的悬浮效果 */
.bookmark {
    position: relative;
}

.bookmark .bookmark-actions {
    position: absolute;
    top: 0;
    right: 0;
    display: none;
    gap: 4px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

.bookmark:hover .bookmark-actions {
    display: flex;
}

.bookmark-action-btn {
    padding: 4px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.bookmark-action-btn:hover {
    opacity: 1;
}

/* 搜索引擎选择器样式 */
.custom-select {
    position: relative;
    min-width: 120px;
    cursor: pointer;
    z-index: 1100;
}

.selected-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #fff;
    border-radius: 8px 0 0 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.options-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    margin-top: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    visibility: hidden;
    opacity: 0;
    z-index: 1100;
}

.custom-select.active .options-container {
    visibility: visible;
    opacity: 1;
}

.option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    transition: background-color 0.2s;
}

.option:hover {
    background: var(--hover-bg-color, rgba(255, 255, 255, 0.35));
}

.search-engine-icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.search-engine-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.selected-option .fa-chevron-down {
    transition: transform 0.2s;
}

.custom-select.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* 暗色主题适配 */
body.dark-theme .selected-option,
body.dark-theme .options-container {
    background: #444;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .option:hover {
    background: #555;
}

/* 便签样式 */
.sticky-note {
    position: absolute;
    min-width: 200px;
    min-height: 200px;
    background-color: rgba(255, 255, 224, 0.9);
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 15px;
    cursor: move;
    z-index: 1000;
    resize: both;
    overflow: auto;
}

.sticky-note.locked {
    cursor: default;
    resize: none;
}

.sticky-note-header {
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    margin-bottom: 10px;
}

.sticky-note-content {
    width: 100%;
    height: calc(100% - 40px);
    border: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    line-height: 1.5;
}

.sticky-note-content:focus {
    outline: none;
}

.sticky-note-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
    color: #666;
    transition: color 0.3s;
}

.sticky-note-btn:hover {
    color: #000;
}

.sticky-note.locked .sticky-note-content {
    cursor: default;
    user-select: none;
}

/* 右键菜单样式 */
.context-menu {
    position: fixed;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    padding: 5px 0;
    z-index: 1001;
}

.context-menu-item {
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.context-menu-item:hover {
    background-color: #f0f0f0;
}

/* 附加功能样式 */
.addon-list {
    margin-top: 10px;
}

.addon-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px;
    border-radius: 8px;
    background: var(--modal-background);
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.addon-item label {
    flex: 1;
    margin-right: 15px;
    font-weight: 500;
}

.addon-item .input-tip {
    flex-basis: 100%;
    margin-top: 5px;
    color: var(--text-secondary);
}

.addon-item .toggle-switch {
    margin-left: auto;
}

/* 便签样式优化 */
.sticky-note {
    position: fixed;
    min-width: 200px;
    min-height: 150px;
    background: var(--sticky-note-bg, #ffd700);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    resize: both;
}

.sticky-note.locked {
    resize: none;
}

.sticky-note-header {
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 5px;
    cursor: move;
}

.sticky-note-btn {
    background: none;
    border: none;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.sticky-note-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.8);
}

.sticky-note-content {
    flex: 1;
    padding: 10px;
    border: none;
    background: none;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.sticky-note-content:focus {
    outline: none;
}

.context-menu {
    position: fixed;
    background: var(--modal-background);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.context-menu-item:hover {
    background: var(--hover-background);
}

/* 插件管理样式 */
.install-plugin-btn {
    width: 100%;
    margin-bottom: 20px;
}

.addon-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.uninstall-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.uninstall-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
}

.plugin-code-input {
    width: 100%;
    min-height: 300px;
    margin: 15px 0;
    padding: 10px;
    font-family: monospace;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    resize: vertical;
}

body.dark-theme .plugin-code-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.dark-theme .uninstall-btn {
    color: #ff6b6b;
}

body.dark-theme .uninstall-btn:hover {
    background-color: rgba(255, 107, 107, 0.1);
}

