* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4ade80;
    --secondary-color: #22c55e;
    --bg-dark: rgba(0, 0, 0, 0.5);
    --bg-card: rgba(255, 255, 255, 0.15);
    --bg-card-hover: rgba(255, 255, 255, 0.25);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --border-color: rgba(255, 255, 255, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--text-primary);
    position: relative;
}

.wallpaper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&q=80') center/cover no-repeat;
    z-index: -2;
    transition: background-image 1s ease-in-out;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: -1;
}

.settings-icon {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.settings-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 40px 20px;
}

.clock {
    font-size: 72px;
    font-weight: 300;
    letter-spacing: -3px;
    margin-bottom: 40px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.search-container {
    width: 100%;
    max-width: 600px;
    position: relative;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.search-box-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(74, 222, 128, 0.5);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.2);
}

.search-engine-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.search-engine-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.engine-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 12px 16px;
    font-size: 16px;
    color: var(--text-primary);
}

.search-input::placeholder {
    color: var(--text-secondary);
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 16px;
    font-size: 18px;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 999;
}

.search-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content {
    display: none;
    padding: 8px;
}

.dropdown-content.show {
    display: flex;
    flex-direction: column;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.dropdown-item span {
    font-size: 14px;
}

.suggestions-container {
    padding: 8px 16px;
    max-height: 200px;
    overflow-y: auto;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.suggestion-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-history {
    padding: 8px 16px;
    border-top: 1px solid var(--border-color);
}

.search-history-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 4px 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 60px;
    max-width: 800px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.app-item:hover {
    transform: translateY(-4px);
}

.app-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.app-item:hover .app-icon-wrapper {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.app-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.add-icon {
    font-size: 32px;
    color: var(--text-secondary);
}

.add-app:hover .add-icon {
    color: var(--primary-color);
}

.app-name {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--border-color);
    z-index: 100;
}

.taskbar-center {
    display: flex;
    gap: 16px;
}

.taskbar-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.taskbar-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.taskbar-item img {
    width: 24px;
    height: 24px;
    border-radius: 4px;
}

.taskbar-item::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.taskbar-item:hover::before {
    width: 20px;
}

.context-menu {
    position: fixed;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 6px;
    min-width: 180px;
    display: none;
    z-index: 10000;
}

.context-menu.show {
    display: block;
}

.context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.context-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ctx-icon {
    width: 16px;
    text-align: center;
}

.context-divider {
    height: 1px;
    background: var(--border-color);
    margin: 6px 0;
}

.settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    z-index: 2000;
}

.settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.setting-section {
    margin-bottom: 28px;
}

.setting-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
    padding-left: 8px;
    border-left: 3px solid var(--primary-color);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.setting-item label {
    font-size: 14px;
}

.setting-item select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    cursor: pointer;
}

.setting-item select option {
    background: #2a2a2a;
    color: var(--text-primary);
}

.setting-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.wallpaper-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallpaper-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallpaper-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.wallpaper-option.active {
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.wallpaper-option span:first-child {
    font-size: 18px;
}

.wallpaper-option span:last-child {
    font-size: 14px;
}

.engine-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.engine-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: background 0.2s ease;
}

.engine-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.engine-item img {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.engine-item span {
    flex: 1;
    font-size: 14px;
}

.engine-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
}

.btn-save {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: #000;
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.4);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 24px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .clock {
        font-size: 48px;
        margin-bottom: 30px;
    }

    .search-container {
        max-width: 400px;
    }

    .apps-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
        margin-top: 40px;
    }

    .app-icon-wrapper {
        width: 48px;
        height: 48px;
    }

    .app-icon {
        width: 30px;
        height: 30px;
    }

    .taskbar-center {
        gap: 12px;
    }

    .taskbar-item {
        width: 36px;
        height: 36px;
    }

    .taskbar-item img {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .clock {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .search-container {
        max-width: 320px;
    }

    .search-input {
        font-size: 14px;
    }

    .apps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-top: 30px;
    }

    .app-icon-wrapper {
        width: 40px;
        height: 40px;
    }

    .app-icon {
        width: 24px;
        height: 24px;
    }

    .app-name {
        font-size: 11px;
    }

    .taskbar-center {
        gap: 8px;
    }

    .taskbar-item {
        width: 32px;
        height: 32px;
    }

    .taskbar-item img {
        width: 18px;
        height: 18px;
    }

    .modal-content {
        width: 95%;
    }
}