* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    background-image: url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1200&q=60&fm=webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    position: relative;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    gap: 30px;
}

.clock {
    margin-bottom: 30px;
}

#time {
    font-size: 6rem;
    font-weight: 300;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.search-container {
    width: 100%;
    max-width: 584px;
    margin-bottom: 40px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.search-engine-selector select {
    background: transparent;
    border: none;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.search-engine-selector select:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-engine-selector select option {
    background: #333;
    color: #fff;
}

#search {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 16px;
    padding: 5px 10px;
    outline: none;
}

#search::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.copyright {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    z-index: 1000;
}

.copyright p {
    margin: 5px 0;
}

.copyright a {
    color: #4a90e2;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.copyright a:hover {
    color: #fff;
    text-decoration: underline;
}

.copyright .sub-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

.copyright .beian {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 5px;
}

.copyright .beian a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.copyright .beian a:hover {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 768px) {
    #time {
        font-size: 4rem;
    }
    
    .search-container {
        max-width: 90%;
    }
    
    .copyright {
        font-size: 14px;
    }
    
    .copyright .sub-text {
        font-size: 12px;
    }
}

.app-dock {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
    padding: 18px 32px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    max-width: 800px;
    justify-content: center;
    align-items: center;
    margin: 40px auto 60px auto;
}

.app-dock:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px) scale(1.03);
}

.app-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    position: relative;
    border-radius: 16px;
    background: rgba(255,255,255,0.13);
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.app-icon:hover {
    transform: scale(1.12) translateY(-6px);
    background: rgba(255,255,255,0.22);
}

.app-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.app-icon::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}

.app-icon:hover::after {
    opacity: 1;
}

.add-button {
    background: rgba(255, 255, 255, 0.2) !important;
}

.add-button i {
    font-size: 24px;
    color: white;
}

.manage-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.dialog-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.dialog-content h3 {
    margin: 0 0 20px;
    color: #333;
    text-align: center;
}

.add-site {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.add-site input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.add-site button {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.close-button {
    display: block;
    width: 100%;
    padding: 10px;
    background: #666;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.add-website-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-website-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.add-website-btn i {
    font-size: 24px;
    color: #fff;
}

.context-menu {
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 5px 0;
    min-width: 120px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
}

.menu-item {
    padding: 8px 15px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.menu-item[data-action="delete"] {
    color: #ff4444;
}

.menu-item[data-action="delete"]:hover {
    background-color: rgba(255, 68, 68, 0.1);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.modal-content {
    background: rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 18px 14px 14px 14px;
    min-width: 220px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.close-modal {
    position: absolute;
    right: 18px;
    top: 12px;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.close-modal:hover {
    color: #f44336;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.form-group label {
    font-size: 13px;
    color: #333;
    margin-bottom: 2px;
}
.form-group input,
.form-group select {
    font-size: 13px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border 0.2s;
}
.form-group input:focus,
.form-group select:focus {
    border: 1.5px solid #4a90e2;
}
#addFolderBtn {
    font-size: 12px;
    padding: 4px 8px;
    margin-top: 4px;
    background: #eee;
    color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
#addFolderBtn:hover {
    background: #4a90e2;
    color: #fff;
}
.submit-btn {
    width: 100%;
    background: var(--main-btn-color, #7ac943);
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 0;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.2s;
}
.submit-btn:hover {
    filter: brightness(0.92);
}

.folder-preview {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 8px 2px 0;
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s;
}
.folder-preview:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transform: scale(1.06);
}
.folder-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 1px;
    width: 26px;
    height: 26px;
    margin: 2px 0 0 0;
}
.folder-icons img {
    width: 11px;
    height: 11px;
    border-radius: 3px;
    background: #fff;
    object-fit: contain;
}
.folder-name {
    display: block;
    position: static;
    background: none;
    color: #222;
    font-size: 12px;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    white-space: nowrap;
    pointer-events: auto;
    z-index: 1;
    text-align: center;
    margin: 0 8px 10px 0;
    font-weight: 500;
    width: 45px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.folder-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.25);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.folder-modal-content {
    background: rgba(255,255,255,0.85);
    border-radius: 14px;
    min-width: 220px;
    max-width: 90vw;
    min-height: 120px;
    padding: 24px 18px 18px 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.folder-modal-close {
    position: absolute;
    right: 14px;
    top: 10px;
    font-size: 22px;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.folder-modal-close:hover {
    color: #f44336;
}
.folder-modal-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #222;
}
.folder-modal-sites {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}
.folder-modal-sites a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    width: 54px;
}
.folder-modal-sites img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    background: #fff;
    margin-bottom: 3px;
    object-fit: contain;
}
.folder-modal-sites span {
    font-size: 12px;
    text-align: center;
    word-break: break-all;
}

.site-context-menu {
    position: fixed;
    background: rgba(255,255,255,0.85);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.13);
    z-index: 5000;
    min-width: 90px;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    padding: 0;
    overflow: hidden;
}
.site-menu-item {
    padding: 10px 22px;
    cursor: pointer;
    font-size: 15px;
    color: #222;
    background: none;
    transition: background 0.18s, color 0.18s;
    user-select: none;
}
.site-menu-item:hover {
    background: rgba(74,144,226,0.08);
    color: #4a90e2;
}
.site-menu-item[data-action="delete"] {
    color: #d9534f;
}
.site-menu-item[data-action="delete"]:hover {
    background: rgba(217,83,79,0.08);
    color: #d9534f;
}

.settings-btn {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 3002;
    background: rgba(255,255,255,0.18);
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.settings-btn:hover {
    background: rgba(255,255,255,0.32);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.settings-btn i {
    font-size: 22px;
    color: #222;
    text-shadow: 0 1px 4px rgba(255,255,255,0.7), 0 1px 8px rgba(0,0,0,0.18);
}

.search-btn {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    margin-left: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 50%;
    transition: background 0.18s;
}
.search-btn:hover {
    background: rgba(255,255,255,0.18);
}
.search-btn i {
    font-size: 22px;
    color: #fff;
}

.suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 1;
    max-height: 220px;
    overflow-y: auto;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: none;
    margin-top: 4px;
}

.suggest-list li {
    padding: 10px 18px;
    color: #222;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.18s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.suggest-list li:last-child {
    border-bottom: none;
}

.suggest-list li:hover {
    background: rgba(74, 144, 226, 0.08);
    color: #4a90e2;
}

.suggest-list::-webkit-scrollbar {
    width: 6px;
}

.suggest-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.suggest-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.suggest-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.about-modal-content {
    align-items: center;
    text-align: center;
    padding-top: 32px;
    padding-bottom: 28px;
}
.about-icon-wrapper {
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.about-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: contain;
}
.about-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #222;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1px 0 #fff;
}
.about-version {
    font-size: 15px;
    color: #4a90e2;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1px 0 #fff;
}
.about-desc {
    font-size: 15px;
    color: #222;
    margin-top: 2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1px 0 #fff;
}

.initial-loading.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .app-dock {
        gap: 10px;
        padding: 10px 6vw;
        border-radius: 16px;
        margin: 24px auto 32px auto;
    }
    .app-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        padding: 6px;
    }
}