/* ==========================================
   macOS Sequoia Desktop - Complete Styles
   ========================================== */

:root {
    --menu-height: 25px;
    --dock-height: 70px;
    --dock-icon-size: 48px;
    --blur-amount: 20px;
    --glass-bg: rgba(30, 30, 30, 0.45);
    --glass-bg-light: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.18);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --accent-blue: #007aff;
    --accent-blue-hover: #0a84ff;
    --tl-close: #ff5f57;
    --tl-minimize: #febc2e;
    --tl-maximize: #28c840;
    --window-bg: rgba(36, 36, 38, 0.92);
    --window-toolbar: rgba(50, 50, 52, 0.95);
    --sidebar-bg: rgba(40, 40, 42, 0.98);
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-active: rgba(255, 255, 255, 0.12);
    --input-bg: rgba(255, 255, 255, 0.08);
    --input-border: rgba(255, 255, 255, 0.1);
    --separator-color: rgba(255, 255, 255, 0.1);
    --shadow-window: 0 22px 70px rgba(0, 0, 0, 0.56), 0 0 0 0.5px rgba(255,255,255,0.08);
    --transition-fast: 0.15s ease;
    --transition-medium: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
    color: var(--text-primary);
    font-size: 13px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* ==========================================
   Desktop - Sequoia Dynamic Wallpaper
   ========================================== */
#desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Sequoia-inspired gradient */
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(15, 72, 128, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(120, 60, 140, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 80, 100, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(60, 30, 90, 0.5) 0%, transparent 40%),
        radial-gradient(ellipse at 30% 20%, rgba(10, 50, 80, 0.6) 0%, transparent 45%),
        linear-gradient(180deg, #0a1628 0%, #0f2847 25%, #1a3a5c 50%, #2d1b4e 75%, #1a0f2e 100%);
    z-index: 0;
    padding-top: calc(var(--menu-height) + 20px);
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: calc(var(--dock-height) + 30px);
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 4px;
}

/* Desktop Wallpaper Variants */
body.wallpaper-sequoia #desktop {
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(15, 72, 128, 0.8) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(120, 60, 140, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(20, 80, 100, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 80%, rgba(60, 30, 90, 0.5) 0%, transparent 40%),
        radial-gradient(ellipse at 30% 20%, rgba(10, 50, 80, 0.6) 0%, transparent 45%),
        linear-gradient(180deg, #0a1628 0%, #0f2847 25%, #1a3a5c 50%, #2d1b4e 75%, #1a0f2e 100%);
}

body.wallpaper-sonoma #desktop {
    background:
        radial-gradient(ellipse at 30% 70%, rgba(255, 149, 0, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 30%, rgba(88, 86, 214, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 90%, rgba(255, 59, 48, 0.3) 0%, transparent 40%),
        linear-gradient(180deg, #1e3a5f 0%, #2d4a7a 30%, #7b4397 60%, #dc2430 100%);
}

body.wallpaper-ventura #desktop {
    background:
        radial-gradient(ellipse at 50% 100%, rgba(52, 152, 219, 0.5) 0%, transparent 60%),
        radial-gradient(ellipse at 30% 30%, rgba(46, 204, 113, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(155, 89, 182, 0.3) 0%, transparent 50%),
        linear-gradient(180deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

body.wallpaper-monterey #desktop {
    background:
        radial-gradient(ellipse at 25% 75%, rgba(37, 99, 235, 0.6) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 25%, rgba(168, 85, 247, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(6, 182, 212, 0.3) 0%, transparent 60%),
        linear-gradient(180deg, #0c1445 0%, #1e3a6e 40%, #3b0764 70%, #1e1b4b 100%);
}

/* Desktop Icons */
.desktop-icon {
    width: 90px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.08);
}

.desktop-icon.selected {
    background: rgba(0, 122, 255, 0.3);
}

.desktop-icon .icon-image {
    font-size: 42px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.desktop-icon .icon-label {
    font-size: 11px;
    font-weight: 400;
    text-align: center;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 4px;
    border-radius: 3px;
}

.desktop-icon.selected .icon-label {
    background: var(--accent-blue);
}

/* Desktop icon badge (child count) */
.icon-badge {
    position: absolute;
    bottom: -2px;
    right: -6px;
    background: var(--accent-blue);
    color: white;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 8px;
    padding: 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.icon-image {
    position: relative;
}

/* Finder badge */
.fi-badge {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 2px;
}

/* ==========================================
   Menu Bar
   ========================================== */
#menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--menu-height);
    background: rgba(20, 20, 22, 0.65);
    backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--blur-amount)) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 9999;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

#menu-left, #menu-right {
    display: flex;
    align-items: center;
    gap: 1px;
    height: 100%;
}

.menu-item {
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition-fast);
    font-size: 13px;
    color: var(--text-primary);
}

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

.menu-text {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.01em;
}

#apple-menu {
    padding: 0 8px;
}

#apple-menu svg {
    opacity: 0.95;
}

.menu-icon {
    padding: 0 6px;
    height: 100%;
    display: flex;
    align-items: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background var(--transition-fast);
    color: var(--text-primary);
    opacity: 0.85;
}

.menu-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

#menu-date {
    font-size: 13px;
    font-weight: 400;
    padding: 0 12px;
    white-space: nowrap;
}

/* ==========================================
   Dock
   ========================================== */
#dock {
    position: fixed;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9998;
}

#dock-container {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 8px;
    background: rgba(30, 30, 32, 0.45);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), inset 0 0.5px 0 rgba(255, 255, 255, 0.1);
}

.dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 2px;
}

.dock-item:hover {
    transform: translateY(-8px) scale(1.3);
}

.dock-item:hover ~ .dock-item:first-of-type,
.dock-item:has(+ .dock-item:hover) {
    transform: translateY(-3px) scale(1.1);
}

.dock-icon {
    width: var(--dock-icon-size);
    height: var(--dock-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    overflow: hidden;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.dock-icon svg {
    width: 100%;
    height: 100%;
}

.dock-icon img {
    width: 100%;
    height: 100%;
    border-radius: 11px;
}

/* Dock tooltip */
.dock-item::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(0.8);
    padding: 4px 12px;
    background: rgba(30, 30, 32, 0.85);
    backdrop-filter: blur(20px);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.dock-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* Active app indicator */
.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
}

/* Dock bounce animation */
@keyframes dockBounce {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-20px); }
    50% { transform: translateY(-4px); }
    75% { transform: translateY(-12px); }
}

.dock-item.bouncing {
    animation: dockBounce 0.6s ease;
}

.dock-separator {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
    align-self: center;
    flex-shrink: 0;
}

/* Dock favorites */
.dock-fav-icon {
    width: var(--dock-icon-size);
    height: var(--dock-icon-size);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    font-size: 28px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================
   Spotlight
   ========================================== */
#spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    z-index: 10001;
    display: flex;
    justify-content: center;
    padding-top: 18vh;
    animation: fadeIn 0.2s ease;
}

#spotlight {
    width: 680px;
    max-width: 90vw;
    background: rgba(36, 36, 38, 0.85);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 0.5px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: spotlightIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    height: fit-content;
}

@keyframes spotlightIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

#spotlight-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

#spotlight-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 20px;
    font-weight: 300;
    color: white;
    font-family: inherit;
    letter-spacing: -0.02em;
}

#spotlight-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#spotlight-results {
    max-height: 400px;
    overflow-y: auto;
}

.spotlight-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.spotlight-result:hover,
.spotlight-result.selected {
    background: var(--accent-blue);
}

.spotlight-result-icon {
    font-size: 24px;
    width: 32px;
    text-align: center;
}

.spotlight-result-text {
    flex: 1;
}

.spotlight-result-title {
    font-size: 14px;
    font-weight: 500;
}

.spotlight-result-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

.spotlight-result:hover .spotlight-result-subtitle,
.spotlight-result.selected .spotlight-result-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* ==========================================
   Context Menu
   ========================================== */
#context-menu {
    position: fixed;
    min-width: 220px;
    background: rgba(36, 36, 38, 0.88);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 10000;
    animation: ctxIn 0.12s ease;
}

@keyframes ctxIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--transition-fast);
}

.ctx-item:hover {
    background: var(--accent-blue);
}

.ctx-arrow {
    font-size: 14px;
    opacity: 0.7;
}

.ctx-separator {
    height: 1px;
    background: var(--separator-color);
    margin: 4px 8px;
}

/* ==========================================
   Windows (Finder, Modals)
   ========================================== */
.window {
    position: fixed;
    background: var(--window-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    z-index: 100;
    min-width: 600px;
    min-height: 400px;
    animation: windowIn var(--transition-slow);
    resize: both;
}

@keyframes windowIn {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#finder-window {
    width: 800px;
    height: 520px;
    top: 80px;
    left: calc(50% - 400px);
}

.window-titlebar {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(50, 50, 52, 0.6);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    cursor: grab;
    position: relative;
}

.window-titlebar:active {
    cursor: grabbing;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
}

/* Traffic Lights */
.traffic-lights {
    display: flex;
    gap: 8px;
    z-index: 1;
}

.tl {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: filter 0.15s;
    position: relative;
}

.tl:hover {
    filter: brightness(0.85);
}

.tl-close {
    background: var(--tl-close);
}

.tl-minimize {
    background: var(--tl-minimize);
}

.tl-maximize {
    background: var(--tl-maximize);
}

.window-titlebar:hover .tl-close::after {
    content: '×';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.window-titlebar:hover .tl-minimize::after,
.traffic-lights:hover .tl-minimize::after {
    content: '−';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
}

.window-titlebar:hover .tl-maximize::after,
.traffic-lights:hover .tl-maximize::after {
    content: '+';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
}

/* Toolbar */
.window-toolbar {
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    background: rgba(45, 45, 47, 0.5);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
}

.toolbar-nav {
    display: flex;
    gap: 4px;
}

.toolbar-btn {
    width: 28px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text-secondary);
    border-radius: 5px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.toolbar-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.toolbar-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.toolbar-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.toolbar-actions {
    display: flex;
    gap: 2px;
}

/* Finder Layout */
.window-content {
    display: flex;
    height: calc(100% - 76px);
}

#finder-sidebar {
    width: 180px;
    min-width: 150px;
    background: var(--sidebar-bg);
    border-right: 0.5px solid rgba(255, 255, 255, 0.06);
    padding: 8px 0;
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 8px;
}

.sidebar-section h3 {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 6px 14px 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    cursor: pointer;
    font-size: 13px;
    border-radius: 6px;
    margin: 0 6px;
    transition: background var(--transition-fast);
}

.sidebar-item:hover {
    background: var(--sidebar-hover);
}

.sidebar-item.active {
    background: var(--sidebar-active);
}

.sidebar-icon {
    font-size: 14px;
    line-height: 1;
}

/* Finder Content */
#finder-content {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    align-content: flex-start;
}

#finder-content.list-view {
    display: flex;
    flex-direction: column;
    gap: 1px;
    grid-template-columns: none;
}

.finder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.finder-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.finder-item.selected {
    background: rgba(0, 122, 255, 0.25);
}

.finder-item .fi-icon {
    font-size: 48px;
    line-height: 1;
}

.finder-item .fi-name {
    font-size: 12px;
    text-align: center;
    max-width: 100px;
    word-wrap: break-word;
    line-height: 1.3;
}

/* List view items */
.list-view .finder-item {
    flex-direction: row;
    padding: 6px 12px;
    gap: 10px;
    border-radius: 6px;
}

.list-view .finder-item .fi-icon {
    font-size: 20px;
}

.list-view .finder-item .fi-name {
    text-align: left;
    font-size: 13px;
}

/* Finder empty state */
.finder-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.finder-empty-icon {
    font-size: 64px;
    opacity: 0.4;
}

.finder-empty-text {
    font-size: 15px;
    font-weight: 500;
}

.finder-empty-subtext {
    font-size: 13px;
    opacity: 0.6;
}

/* ==========================================
   Modals
   ========================================== */
#modal-overlay, #edit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 10001;
}

#add-favorite-modal, #edit-favorite-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

#modal-window, #edit-modal-window {
    position: relative;
    width: 480px;
    max-width: 90vw;
    background: var(--window-bg);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: var(--shadow-window);
    overflow: hidden;
    z-index: 10003;
    animation: windowIn var(--transition-slow);
}

#modal-titlebar, #edit-modal-titlebar {
    height: 40px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(50, 50, 52, 0.6);
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

#modal-body, #edit-modal-body {
    padding: 20px 24px 24px;
}

.modal-icon-picker {
    margin-bottom: 16px;
}

.modal-icon-picker label, .modal-field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

#icon-grid, #edit-icon-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: var(--input-bg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.icon-option:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.icon-option.selected {
    border-color: var(--accent-blue);
    background: rgba(0, 122, 255, 0.15);
}

.modal-field {
    margin-bottom: 14px;
}

.modal-field input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    color: white;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 8px;
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.modal-field input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.modal-field input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.btn {
    padding: 7px 18px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--accent-blue);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-blue-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ==========================================
   Notification Center
   ========================================== */
#notification-center {
    position: fixed;
    top: calc(var(--menu-height) + 8px);
    right: 8px;
    width: 340px;
    max-height: calc(100vh - var(--menu-height) - 100px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9997;
    overflow-y: auto;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.notif-widget {
    background: rgba(36, 36, 38, 0.8);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.notif-widget h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

#notif-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.cal-header {
    font-size: 10px;
    color: var(--text-secondary);
    padding: 4px;
    font-weight: 600;
}

.cal-day {
    font-size: 12px;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--text-secondary);
}

.cal-day.today {
    background: var(--accent-blue);
    color: white;
    font-weight: 600;
}

.cal-day.other-month {
    opacity: 0.3;
}

.weather-temp {
    font-size: 48px;
    font-weight: 200;
    letter-spacing: -3px;
    margin-bottom: 4px;
}

.weather-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.weather-location {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin-top: 4px;
}

/* ==========================================
   Scrollbars
   ========================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    #dock-container {
        padding: 3px 6px;
        gap: 1px;
    }

    .dock-icon {
        width: 40px;
        height: 40px;
    }

    #finder-window {
        min-width: auto;
        width: 95vw;
        left: 2.5vw;
    }

    #finder-sidebar {
        width: 140px;
    }

    #spotlight {
        width: 90vw;
    }
}

/* ==========================================
   Animations
   ========================================== */
@keyframes iconAppear {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.desktop-icon {
    animation: iconAppear 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Window dragging overlay */
.window.dragging {
    opacity: 0.85;
    transition: none;
}

/* Favorite item context menu */
.fav-ctx-menu {
    position: fixed;
    min-width: 180px;
    background: rgba(36, 36, 38, 0.88);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    z-index: 10010;
    animation: ctxIn 0.12s ease;
}

.fav-ctx-menu .ctx-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    transition: background var(--transition-fast);
}

.fav-ctx-menu .ctx-item:hover {
    background: var(--accent-blue);
}

.fav-ctx-menu .ctx-item.danger:hover {
    background: #ff3b30;
}

/* ==========================================
   Sticky Note (macOS Stickies style)
   ========================================== */
#sticky-note {
    position: fixed;
    top: 60px;
    right: 30px;
    width: 260px;
    border-radius: 2px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(0, 0, 0, 0.15);
    z-index: 50;
    font-family: 'Inter', sans-serif;
    animation: stickyIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

@keyframes stickyIn {
    from { transform: scale(0.85) rotate(-2deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes stickyOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.85) rotate(2deg); opacity: 0; }
}

#sticky-note.closing {
    animation: stickyOut 0.25s ease forwards;
}

.sticky-titlebar {
    height: 24px;
    background: #f6d44d;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 6px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.sticky-close {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: #e8553a;
    cursor: pointer;
    transition: filter 0.15s;
    position: relative;
    flex-shrink: 0;
}

.sticky-close:hover {
    filter: brightness(0.85);
}

.sticky-close:hover::after {
    content: '×';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.sticky-title {
    font-size: 11px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.45);
}

.sticky-body {
    background: #fbeb8a;
    padding: 14px 16px;
    color: #3b3520;
}

.sticky-body p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.sticky-body .sticky-shortcut {
    margin-top: 10px;
    font-size: 11px;
    color: rgba(59, 53, 32, 0.55);
    font-style: italic;
}
