/**
 * Hydros OS - macOS Sonoma/Sequoia Desktop, Windows, Dock, Spotlight, Timezone & Proxy
 */

/* ============================================================
   macOS SONOMA / SEQUOIA DESIGN SYSTEM FOR HYDROS OS
   ============================================================ */

/* Hide mobile-specific iPhone elements */
.status-bar,
.dynamic-island,
.home-bar-area,
.home-nav-arrow,
.home-page-indicators,
.swipe-label {
    display: none !important;
}

:root {
    --dock-icon-size: clamp(26px, 3.2vw, 46px);
    --dock-gap: clamp(3px, 0.65vw, 10px);
    --dock-pad-v: clamp(4px, 0.7vh, 8px);
    --dock-pad-h: clamp(6px, 1vw, 14px);
    --dock-radius: clamp(14px, 1.6vw, 20px);
    --hydros-display-scale: 1;
}

#os-viewport {
    position: relative;
    width: 100%;
    width: 100vw;
    height: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    overflow: clip;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
    background-color: #000;
    transition: filter 0.1s linear;
}

.settings-layout {
    position: relative;
    min-height: 0;
}

/* ============================================================
   TOP macOS MENU BAR
   ============================================================ */
#mac-menubar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(20, 22, 28, 0.75);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    z-index: 10000;
    font-size: 13px;
    color: #ffffff;
    font-weight: 500;
    box-shadow: 0 1px 12px rgba(0, 0, 0, 0.3);
}

body.light-mode #mac-menubar {
    background: rgba(245, 245, 247, 0.78);
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    color: #1d1d1f;
}

.mac-menu-left {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
}

.mac-apple-btn {
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}

.hydros-nav-logo {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
    filter: drop-shadow(0 0 2px rgba(168, 85, 247, 0.7));
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.2s ease, box-shadow 0.2s ease;
}

.mac-apple-btn:hover .hydros-nav-logo,
.mac-apple-btn.active .hydros-nav-logo {
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(192, 132, 252, 0.95);
    filter: drop-shadow(0 0 5px rgba(192, 132, 252, 1));
}

.about-mac-logo {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.65);
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    display: block;
    margin: 0 auto;
    animation: macLogoPulse 4s ease-in-out infinite alternate;
}

@keyframes macLogoPulse {
    0% {
        box-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
    }

    100% {
        box-shadow: 0 0 28px rgba(192, 132, 252, 0.9);
    }
}

.mac-apple-btn:hover,
.mac-apple-btn.active,
.mac-menu-item:hover,
.mac-menu-item.active,
.mac-app-name:hover,
.mac-app-name.active {
    background: rgba(255, 255, 255, 0.2);
}

body.light-mode .mac-apple-btn:hover,
body.light-mode .mac-apple-btn.active,
body.light-mode .mac-menu-item:hover,
body.light-mode .mac-menu-item.active,
body.light-mode .mac-app-name:hover,
body.light-mode .mac-app-name.active {
    background: rgba(0, 0, 0, 0.12);
}

.mac-app-name {
    font-weight: 700;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: -0.1px;
}

.mac-menu-item {
    cursor: pointer;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.15s;
}

.mac-home-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
    padding: 2px 9px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #e9d5ff;
    background: rgba(168, 85, 247, 0.22);
    border: 1px solid rgba(192, 132, 252, 0.35);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.mac-home-link:hover {
    background: rgba(168, 85, 247, 0.4);
    border-color: rgba(192, 132, 252, 0.65);
    color: #ffffff;
}

body.light-mode .mac-home-link {
    color: #6b21a8;
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(147, 51, 234, 0.3);
}

body.light-mode .mac-home-link:hover {
    background: rgba(168, 85, 247, 0.25);
    color: #4c1d95;
}

.mac-menu-right {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
}

.mac-tray-icon {
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    transition: background 0.15s;
}

.mac-tray-icon:hover {
    background: rgba(255, 255, 255, 0.15);
}

body.light-mode .mac-tray-icon:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* Dropdown Menus */
.mac-dropdown {
    position: absolute;
    top: 32px;
    background: rgba(28, 30, 38, 0.88);
    backdrop-filter: blur(35px) saturate(200%);
    -webkit-backdrop-filter: blur(35px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 5px;
    min-width: 220px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.2);
    display: none;
    flex-direction: column;
    z-index: 10001;
    animation: macDropdownReveal 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes macDropdownReveal {
    0% {
        opacity: 0;
        transform: translateY(-6px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes macSpotlightReveal {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-14px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes macControlCenterReveal {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.97);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes macModalReveal {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes macFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.light-mode .mac-dropdown {
    background: rgba(245, 245, 248, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #1d1d1f;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.2);
}

.mac-dropdown.show {
    display: flex;
}

.mac-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 13px;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.1s;
}

body.light-mode .mac-dropdown-item {
    color: #1d1d1f;
}

.mac-dropdown-item:hover {
    background: #007aff !important;
    color: #ffffff !important;
}

.mac-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 4px 6px;
}

body.light-mode .mac-dropdown-divider {
    background: rgba(0, 0, 0, 0.1);
}

.mac-shortcut {
    font-size: 11px;
    opacity: 0.6;
}

/* ============================================================
   macOS DESKTOP & WIDGETS
   ============================================================ */
.home-screen {
    position: absolute !important;
    inset: 0 !important;
    padding-top: 30px !important;
    overflow: hidden !important;
    background: transparent !important;
    z-index: 5 !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
}

.home-pages-viewport {
    display: none !important;
}


/* Desktop Widgets */
.mac-desktop-widgets {
    position: absolute;
    top: clamp(34px, 5vh, 45px);
    left: clamp(12px, 1.8vw, 24px);
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 1.4vh, 16px);
    z-index: 10;
    max-width: clamp(200px, 20vw, 320px);
    pointer-events: auto;
    max-height: calc(100vh - 120px);
}

.mac-widget-card {
    background: rgba(24, 26, 34, 0.65);
    backdrop-filter: blur(35px) saturate(180%);
    -webkit-backdrop-filter: blur(35px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.mac-widget-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.28);
}

@media (max-height: 720px) {
    .mac-desktop-widgets {
        gap: 8px !important;
    }
    .mac-widget-card {
        padding: 10px 12px !important;
        border-radius: 14px !important;
    }
    .widget-quicknote {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .widget-quicknote {
        display: none !important;
    }
    .mac-desktop-widgets {
        max-width: 210px !important;
    }
}

body.light-mode .mac-widget-card {
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.widget-weather {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 250px;
}

.widget-weather-city {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.widget-weather-temp {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.widget-weather-condition {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
}

.widget-weather-icon {
    font-size: 38px;
    color: #fbbf24;
}

.widget-clock {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 250px;
}

.widget-cal-badge {
    width: 52px;
    height: 52px;
    background: #ff3b30;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.35);
    flex-shrink: 0;
}

.widget-cal-month {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-cal-day {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.widget-clock-details {
    display: flex;
    flex-direction: column;
}

.widget-clock-time {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
}

.widget-clock-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.widget-quicknote {
    width: 250px;
    background: rgba(254, 240, 138, 0.92) !important;
    color: #1c1917 !important;
    border: 1px solid rgba(234, 179, 8, 0.4) !important;
}

.widget-quicknote h4 {
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 6px;
    color: #854d0e;
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget-quicknote p {
    font-size: 12px;
    line-height: 1.45;
    color: #292524;
}

/* ============================================================
   macOS FLOATING WINDOWS WITH TRAFFIC LIGHTS
   ============================================================ */

.app-window {
    position: absolute !important;
    top: clamp(34px, 5.5vh, 55px);
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: min(960px, calc(100vw - 32px));
    height: min(680px, calc(100vh - 110px));
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 85px);
    background-color: var(--app-bg) !important;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
                width 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                height 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                top 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                left 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                border-radius 0.26s ease, 
                box-shadow 0.28s ease;
    display: none;
    flex-direction: column;
}

.app-window:not(.open):not(.closing) {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

body.light-mode .app-window {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

/* Base open window overrides */
.app-window.open {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1;
    pointer-events: auto !important;
}

@keyframes macWindowOpen {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.92);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes macWindowOpenDragged {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes macWindowOpenMaximized {
    0% {
        opacity: 0;
        transform: scale(0.97);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.app-window.open.opening:not(.maximized):not(.dragged) {
    animation: macWindowOpen 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-window.open.opening.dragged {
    animation: macWindowOpenDragged 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-window.open.opening.maximized {
    animation: macWindowOpenMaximized 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.app-window.dragged,
.app-window.open.dragged {
    transition: none !important;
}

.videos-window.open,
.videos-window.open.maximized,
#videosApp.app-window.open {
    padding-top: 0 !important;
}

/* OSX Windowed Floating Mode */
.app-window.open:not(.maximized) {
    position: absolute !important;
    inset: auto !important;
    width: min(960px, calc(100vw - 32px));
    height: min(680px, calc(100vh - 110px));
    max-width: calc(100vw - 20px);
    max-height: calc(100vh - 85px);
    background-color: var(--app-bg) !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.14) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 5000;
}

/* Center non-dragged windows */
.app-window.open:not(.maximized):not(.dragged) {
    top: clamp(34px, 5.5vh, 55px);
    left: 50%;
    transform: translateX(-50%) scale(1);
}

.app-window.open:not(.maximized).dragged {
    transform: none !important;
}

#calcApp.app-window.open:not(.maximized) {
    width: min(350px, calc(100vw - 32px)) !important;
    height: min(550px, calc(100vh - 75px)) !important;
    max-height: calc(100vh - 75px) !important;
}

#timezoneApp.app-window.open:not(.maximized) {
    width: min(660px, calc(100vw - 32px)) !important;
    height: min(640px, calc(100vh - 100px)) !important;
}

#finderApp.app-window.open:not(.maximized) {
    width: min(780px, calc(100vw - 32px)) !important;
    height: min(560px, calc(100vh - 100px)) !important;
}

#weatherApp.app-window.open:not(.maximized) {
    width: min(1060px, calc(100vw - 32px)) !important;
    height: min(680px, calc(100vh - 96px)) !important;
}

/* ============================================================
   FULLSCREEN AUTO-HIDE: MENUBAR & DOCK
   ============================================================ */
#mac-menubar {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
    will-change: transform, opacity;
}

.mac-dock-container,
.dock-outer {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
    will-change: transform, opacity;
}

body.app-fullscreen-active #mac-menubar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

body.app-fullscreen-active.menubar-peek #mac-menubar,
body.app-fullscreen-active #mac-menubar:hover {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.app-fullscreen-active .mac-dock-container,
body.app-fullscreen-active .dock-outer {
    transform: translateX(-50%) translateY(160%);
    opacity: 0;
    pointer-events: none;
}

body.app-fullscreen-active.dock-peek .mac-dock-container,
body.app-fullscreen-active .mac-dock-container:hover {
    transform: translateX(-50%) translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* OSX Maximized / Fullscreen Mode */
.app-window.open.maximized,
#calcApp.app-window.open.maximized,
#timezoneApp.app-window.open.maximized,
#proxyApp.app-window.open.maximized,
#proxyApp.open.maximized,
[id].app-window.open.maximized {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    border-radius: 0 !important;
    border: none !important;
    padding: 0 !important;
    padding-top: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
    z-index: 5000 !important;
    box-shadow: none !important;
}

/* Window Titlebar & Traffic Controls */
.app-window.open .mac-titlebar,
.app-window.open.maximized .mac-titlebar {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    z-index: 100 !important;
    pointer-events: auto !important;
    background: rgba(30, 32, 40, 0.94) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 0 14px !important;
    flex-shrink: 0 !important;
}

.mac-titlebar {
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
}

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

.app-window.open .mac-traffic-lights,
.app-window.open.maximized .mac-traffic-lights {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    align-items: center !important;
    gap: 8px !important;
    width: 76px !important;
    flex-shrink: 0 !important;
    z-index: 105 !important;
}

.app-window.open .mac-traffic-btn,
.app-window.open.maximized .mac-traffic-btn {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 106 !important;
}

.app-window.closing {
    display: flex !important;
    visibility: visible !important;
    transform: translateX(-50%) scale(0.9) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.22s cubic-bezier(0.4, 0, 1, 1), transform 0.22s cubic-bezier(0.4, 0, 1, 1) !important;
}

.app-window.maximized.closing {
    animation: none !important;
    transform: scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1), opacity 0.22s cubic-bezier(0.4, 0, 1, 1) !important;
}

.app-window.dragged.closing {
    transform: scale(0.9) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.22s cubic-bezier(0.4, 0, 1, 1), opacity 0.22s cubic-bezier(0.4, 0, 1, 1) !important;
}

.app-window.minimized.closing {
    display: flex !important;
    visibility: visible !important;
    opacity: 0 !important;
    transform: translateX(-50%) translateY(120px) scale(0.65) !important;
    filter: blur(3px);
    pointer-events: none !important;
    transition: opacity 0.24s cubic-bezier(0.3, 0, 0.8, 0.15), transform 0.24s cubic-bezier(0.3, 0, 0.8, 0.15), filter 0.24s ease !important;
}

.app-window.dragged.minimized.closing {
    transform: translateY(120px) scale(0.65) !important;
}

/* macOS Titlebar */
.mac-titlebar {
    width: 100% !important;
    box-sizing: border-box !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    background: rgba(30, 32, 40, 0.94) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 14px !important;
    flex-shrink: 0 !important;
    user-select: none;
    cursor: grab;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}

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

body.light-mode .mac-titlebar {
    background: rgba(235, 235, 240, 0.94) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

.mac-traffic-lights {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 76px !important;
    flex-shrink: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 105 !important;
}

.mac-traffic-btn {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px !important;
    min-height: 14px !important;
    border-radius: 50% !important;
    border: none !important;
    cursor: pointer !important;
    position: relative !important;
    padding: 0 !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: filter 0.15s, transform 0.1s !important;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 106 !important;
}

.mac-traffic-btn::before {
    content: '' !important;
    position: absolute !important;
    top: -5px !important;
    left: -5px !important;
    right: -5px !important;
    bottom: -5px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
}

.mac-traffic-btn i {
    font-size: 8px !important;
    opacity: 0.85 !important;
    pointer-events: none !important;
    line-height: 1 !important;
    display: block !important;
    transition: opacity 0.15s, transform 0.15s !important;
}

.mac-traffic-btn:hover i {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

.mac-traffic-btn:hover {
    filter: brightness(0.88) !important;
}

.mac-traffic-btn:active {
    transform: scale(0.9) !important;
}

.mac-traffic-btn.close {
    background: #ff5f56 !important;
    border: 0.5px solid #e0443e !important;
}

.mac-traffic-btn.close i {
    color: #4d0000 !important;
}

.mac-traffic-btn.minimize {
    background: #ffbd2e !important;
    border: 0.5px solid #dea123 !important;
}

.mac-traffic-btn.minimize i {
    color: #5c3b00 !important;
    font-size: 9px !important;
}

.mac-traffic-btn.zoom {
    background: #27c93f !important;
    border: 0.5px solid #1aab29 !important;
}

.mac-traffic-btn.zoom i {
    color: #004d13 !important;
    font-size: 7px !important;
}

.mac-titlebar-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: 0.2px;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mac-titlebar-spacer {
    width: 70px;
}

/* ============================================================
   macOS FLOATING DOCK
   ============================================================ */
.dock-outer {
    display: none !important;
}

.mac-dock-container {
    position: fixed;
    bottom: clamp(6px, 1.2vh, 12px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    pointer-events: auto !important;
    will-change: transform, opacity;
    max-width: calc(100vw - 16px);
    box-sizing: border-box;
}

.mac-dock {
    display: flex;
    align-items: center;
    gap: var(--dock-gap, 10px);
    padding: var(--dock-pad-v, 8px) var(--dock-pad-h, 14px);
    background: rgba(30, 32, 42, 0.55);
    backdrop-filter: blur(35px) saturate(190%);
    -webkit-backdrop-filter: blur(35px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--dock-radius, 20px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, gap 0.2s ease, padding 0.2s ease;
    pointer-events: auto !important;
    max-width: 100%;
    box-sizing: border-box;
}

body.light-mode .mac-dock {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.mac-dock-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.25), margin 0.2s ease;
    pointer-events: auto !important;
    transform-origin: bottom center;
    will-change: transform;
}

.mac-dock-item:hover {
    transform: scale(1.3) translateY(-10px);
    z-index: 10;
}

@keyframes macDockBounce {
    0% { transform: translateY(0); }
    18% { transform: translateY(-18px) scale(1.08); }
    36% { transform: translateY(0) scale(0.95); }
    54% { transform: translateY(-10px) scale(1.03); }
    72% { transform: translateY(0) scale(0.98); }
    86% { transform: translateY(-3px) scale(1.01); }
    100% { transform: translateY(0) scale(1); }
}

.mac-dock-item.bouncing {
    animation: macDockBounce 0.85s cubic-bezier(0.28, 0.84, 0.42, 1) !important;
}

.mac-dock-icon {
    width: var(--dock-icon-size, 46px);
    height: var(--dock-icon-size, 46px);
    border-radius: calc(var(--dock-icon-size, 46px) * 0.26);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--dock-icon-size, 46px) * 0.48);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: filter 0.15s, transform 0.15s, width 0.2s, height 0.2s;
    will-change: transform;
}

.mac-dock-item:active .mac-dock-icon {
    filter: brightness(0.8);
    transform: scale(0.92);
}

.mac-dock-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 5px #fff;
    margin-top: 3px;
    opacity: 0;
    transition: opacity 0.2s;
}

.mac-dock-item.running .mac-dock-dot {
    opacity: 1;
}

.mac-dock-tooltip {
    position: absolute;
    bottom: 60px;
    background: rgba(20, 22, 28, 0.88);
    backdrop-filter: blur(12px);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s;
}

.mac-dock-item:hover .mac-dock-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.mac-dock-divider {
    width: 1px;
    height: 38px;
    background: rgba(255, 255, 255, 0.18);
    margin: 0 4px;
}


/* ============================================================
   macOS CONTROL CENTER
   ============================================================ */
#mac-control-center {
    position: absolute;
    top: 36px;
    right: 12px;
    width: 320px;
    background: rgba(28, 30, 38, 0.84);
    backdrop-filter: blur(40px) saturate(190%);
    -webkit-backdrop-filter: blur(40px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: none;
    flex-direction: column;
    gap: 12px;
    animation: macControlCenterReveal 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#mac-control-center.open {
    display: flex;
}

body.light-mode #mac-control-center {
    background: rgba(245, 245, 248, 0.88);
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.cc-grid-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cc-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

.cc-card:hover {
    background: rgba(255, 255, 255, 0.14);
}

.cc-card.active {
    background: rgba(0, 122, 255, 0.35);
    border-color: rgba(0, 122, 255, 0.6);
}

.cc-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.cc-card.active .cc-card-icon {
    background: #007aff;
}

.cc-card-text {
    display: flex;
    flex-direction: column;
}

.cc-card-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.cc-card-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.cc-slider-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cc-slider-card label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cc-slider-card input[type="range"] {
    width: 100%;
    accent-color: #007aff;
    cursor: pointer;
}

/* ============================================================
   macOS SPOTLIGHT SEARCH
   ============================================================ */
#mac-spotlight {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: min(580px, 92vw);
    background: rgba(24, 26, 34, 0.88);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
    z-index: 10005;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: macSpotlightReveal 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

#mac-spotlight.open {
    display: flex;
}

body.light-mode #mac-spotlight {
    background: rgba(245, 245, 248, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

.spotlight-input-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.spotlight-input-row i {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
}

.spotlight-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 18px;
    color: #fff;
    font-weight: 500;
}

.spotlight-results {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.spotlight-item:hover,
.spotlight-item.active {
    background: #007aff;
}

.spotlight-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
}

.spotlight-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.spotlight-item-type {
    margin-left: auto;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.spotlight-item:hover .spotlight-item-type {
    color: rgba(255, 255, 255, 0.85);
}

/* ============================================================
   macOS LOGIN / LOCK SCREEN
   ============================================================ */
.lock-screen {
    position: absolute !important;
    inset: 0 !important;
    background: rgba(10, 12, 20, 0.55) !important;
    backdrop-filter: blur(45px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(45px) saturate(180%) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 99999 !important;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.lock-screen.unlocked {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}

.mac-login-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    animation: macFadeIn 0.4s ease;
}

.mac-login-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #007aff, #af52de);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.mac-login-name {
    font-size: 19px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.mac-login-input-row {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 6px 6px 6px 14px;
    width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: width 0.2s;
}

.mac-login-input-row input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.mac-login-input-row input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.mac-login-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: background 0.15s;
}

.mac-login-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

.mac-login-hint {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
}

.mac-login-bottom-bar {
    position: absolute;
    bottom: 30px;
    display: flex;
    gap: 32px;
}

.mac-login-bottom-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 11px;
    cursor: pointer;
    transition: color 0.15s;
}

.mac-login-bottom-btn:hover {
    color: #ffffff;
}

.mac-login-bottom-btn i {
    font-size: 20px;
}

/* ============================================================
   macOS "ABOUT THIS MAC" MODAL
   ============================================================ */
#mac-about-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 440px;
    background: rgba(26, 28, 36, 0.96);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7);
    z-index: 10006;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: macModalReveal 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#mac-about-modal.open {
    display: flex;
}

.about-header {
    height: 38px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-body {
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.about-mac-icon {
    font-size: 54px;
    color: #60a5fa;
    filter: drop-shadow(0 6px 15px rgba(0, 0, 0, 0.5));
}

.about-specs {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.about-specs h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.about-specs .version {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.about-spec-row {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
}

.about-spec-row strong {
    color: #fff;
}

/* ============================================================
   macOS BETA WARNING SYSTEM MODAL
   ============================================================ */
#mac-beta-warning-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 100005;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#mac-beta-warning-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#mac-beta-warning-card {
    width: 90%;
    max-width: 440px;
    background: rgba(26, 28, 38, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(245, 158, 11, 0.25);
    overflow: hidden;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

#mac-beta-warning-overlay.active #mac-beta-warning-card {
    transform: scale(1) translateY(0);
}

.beta-warning-header {
    height: 38px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    padding: 0 14px;
}

.beta-warning-body {
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.beta-warning-icon-box {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, rgba(245, 158, 11, 0.05) 70%);
    border: 1.5px solid rgba(245, 158, 11, 0.45);
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #f59e0b;
    margin-bottom: 18px;
    animation: betaPulse 2.5s infinite ease-in-out;
}

@keyframes betaPulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
    }

    50% {
        transform: scale(1.06);
        box-shadow: 0 0 32px rgba(245, 158, 11, 0.6);
    }
}

.beta-warning-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.beta-warning-message {
    font-size: 14.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    font-weight: 450;
}

.beta-warning-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.beta-warning-btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.beta-warning-btn-primary:hover {
    filter: brightness(1.15);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

.beta-warning-btn-primary:active {
    transform: translateY(1px);
    filter: brightness(0.95);
}

/* macOS clean desktop overrides */

/* macOS clean desktop overrides */
.home-bar-area,
.home-indicator,
.status-bar,
.dynamic-island {
    display: none !important;
    pointer-events: none !important;
}

.home-screen {
    pointer-events: none !important;
}

.home-screen>* {
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    .app-window {
        top: 30px !important;
        left: 0 !important;
        width: 100vw !important;
        height: calc(100vh - 30px) !important;
        border-radius: 0 !important;
        transform: translateY(100%) !important;
    }

    .app-window.open.maximized {
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
        transform: none !important;
    }

    .app-window.open {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: flex !important;
        pointer-events: auto !important;
    }

    .app-window.closing {
        transform: translateY(100%) !important;
    }

    .mac-desktop-widgets {
        display: none !important;
    }

    .mac-dock-container {
        width: 100vw !important;
        left: 0 !important;
        bottom: 6px !important;
        transform: none !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        justify-content: flex-start !important;
        padding: 4px 12px 6px 12px !important;
        scrollbar-width: none;
    }

    .mac-dock-container::-webkit-scrollbar {
        display: none;
    }

    .mac-dock {
        gap: 6px !important;
        padding: 6px 10px !important;
        min-width: max-content !important;
    }

    .mac-dock-icon {
        width: 42px !important;
        height: 42px !important;
        font-size: 19px !important;
    }

    .mac-dock-item:hover {
        transform: none !important;
        margin: 0 !important;
    }
}


/* ============================================================
   FIX MY TIMEZONE APP STYLES
   ============================================================ */
#timezoneApp.app-window {
    width: min(660px, 94vw) !important;
    height: min(640px, calc(100vh - 110px)) !important;
}



.tz-app-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.15), transparent 45%),
        radial-gradient(circle at bottom left, rgba(56, 189, 248, 0.08), transparent 50%),
        rgba(15, 20, 32, 0.96);
    color: #f1f5f9;
}

body.light-mode .tz-app-body {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 45%),
        rgba(248, 250, 252, 0.98);
    color: #0f172a;
}

.tz-hero-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

body.light-mode .tz-hero-card {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.tz-globe-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: linear-gradient(135deg, #0284c7, #0ea5e9, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.45);
    flex-shrink: 0;
    animation: tzGlobePulse 4s ease-in-out infinite alternate;
}

@keyframes tzGlobePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
    }

    100% {
        transform: scale(1.04);
        box-shadow: 0 12px 32px rgba(14, 165, 233, 0.65);
    }
}

.tz-hero-time-wrap {
    flex: 1;
    min-width: 0;
}

.tz-live-time {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

body.light-mode .tz-live-time {
    color: #0f172a;
}

.tz-live-date {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 4px;
    font-weight: 500;
}

body.light-mode .tz-live-date {
    color: #64748b;
}

.tz-active-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(14, 165, 233, 0.2);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
    font-size: 12px;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.light-mode .tz-active-badge {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: #0284c7;
}

.tz-action-card {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

body.light-mode .tz-action-card {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.8), rgba(240, 249, 255, 0.95));
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.tz-action-info h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}

body.light-mode .tz-action-info h4 {
    color: #0f172a;
}

.tz-action-info p {
    margin: 0;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.65);
}

body.light-mode .tz-action-info p {
    color: #64748b;
}

.tz-btn-primary {
    background: linear-gradient(135deg, #0284c7, #0ea5e9, #0284c7);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.tz-btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.55);
}

.tz-btn-primary:active {
    transform: translateY(0);
}

.tz-settings-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.light-mode .tz-settings-section {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.tz-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tz-section-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.tz-search-wrap {
    position: relative;
    width: 220px;
}

.tz-search-wrap i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

body.light-mode .tz-search-wrap i {
    color: #94a3b8;
}

.tz-search-wrap input {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 7px 12px 7px 30px;
    color: #fff;
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

body.light-mode .tz-search-wrap input {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

.tz-search-wrap input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.tz-dropdown-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tz-dropdown-row label {
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

body.light-mode .tz-dropdown-row label {
    color: #475569;
}

.tz-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13.5px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

body.light-mode .tz-select {
    background: #f8fafc;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #0f172a;
}

.tz-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.tz-preset-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.tz-pill-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 12px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

body.light-mode .tz-pill-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.tz-pill-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    color: #fff;
}

body.light-mode .tz-pill-btn:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0284c7;
}

.tz-pill-btn.active {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border-color: #38bdf8;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.35);
}

.tz-options-grid {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.light-mode .tz-options-grid {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.tz-option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tz-option-item strong {
    font-size: 13.5px;
    display: block;
}

.tz-option-item p {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

body.light-mode .tz-option-item p {
    color: #64748b;
}

.mac-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.mac-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mac-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    transition: 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .mac-switch-slider {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

.mac-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mac-switch input:checked+.mac-switch-slider {
    background-color: #34c759;
}

.mac-switch input:checked+.mac-switch-slider:before {
    transform: translateX(20px);
}

.tz-toast {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: #4ade80;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    animation: tzFadeIn 0.2s ease;
}

.tz-toast.show {
    display: flex;
}

@keyframes tzFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Camera Overlay & Extra Controls */
.cam-fallback-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    color: #fff;
    padding: 20px;
    text-align: center;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.cam-fallback-overlay.hidden {
    display: none !important;
}

.cam-fallback-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #fff;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4);
}

.cam-fallback-overlay h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
}

.cam-fallback-overlay p {
    margin: 0 0 16px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 280px;
    line-height: 1.4;
}

.cam-fallback-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.cam-action-btn {
    border-radius: 12px;
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
    border: none;
    outline: none;
    text-decoration: none;
}

.cam-action-btn.primary {
    background: #0284c7;
    color: #fff;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.4);
}

.cam-action-btn.primary:hover {
    background: #0369a1;
    transform: translateY(-1px);
}

.cam-action-btn.secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cam-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.cam-bar-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.cam-bar-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}

.cam-bar-btn:active {
    transform: scale(0.95);
}


/* ============================================================
   HYDROS PROXY APP STYLING
   ============================================================ */
#proxyApp {
    width: 920px;
    height: 640px;
    max-width: 96vw;
    max-height: 88vh;
    border-radius: 12px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    background: #0b0f19;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(0, 242, 254, 0.18);
    border: 1px solid rgba(0, 242, 254, 0.25);
}

#proxyApp.open.maximized {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.proxy-browser-chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.proxy-nav-btns,
.proxy-actions-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.proxy-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.18s ease;
}

.proxy-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #00f2fe;
    transform: translateY(-1px);
}

.proxy-btn:active {
    transform: scale(0.95);
}

.proxy-address-bar {
    flex: 1;
    height: 34px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 17px;
    padding: 0 8px 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.proxy-address-bar:focus-within {
    border-color: #00f2fe;
    box-shadow: 0 0 14px rgba(0, 242, 254, 0.28);
    background: rgba(8, 12, 22, 0.9);
}

.proxy-engine-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #38bdf8;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 6px;
    outline: none;
    cursor: pointer;
}

.proxy-engine-select option {
    background: #0f172a;
    color: #fff;
}

.proxy-url-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #f8fafc;
    font-size: 13px;
    font-family: inherit;
}

.proxy-url-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.proxy-go-btn {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    border: none;
    border-radius: 12px;
    color: #080c14;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.18s ease;
}

.proxy-go-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.proxy-bookmarks-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(10, 15, 26, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    flex-shrink: 0;
}

.proxy-bookmarks-bar::-webkit-scrollbar {
    display: none;
}

.proxy-bm-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.proxy-bm-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
}

.proxy-viewport-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.proxy-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #00f2fe, #4facfe, #8b5cf6);
    box-shadow: 0 0 10px #00f2fe;
    transition: width 0.3s ease, opacity 0.3s ease;
    z-index: 50;
    opacity: 0;
}

.proxy-home-page {
    flex: 1;
    overflow-y: auto;
    padding: 28px 24px;
    background: radial-gradient(circle at 50% 10%, rgba(0, 242, 254, 0.08) 0%, transparent 60%), #080c14;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.proxy-hero {
    text-align: center;
    max-width: 620px;
    margin-bottom: 26px;
    width: 100%;
}

.proxy-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}

.proxy-hero-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.proxy-hero-sub {
    font-size: 13.5px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 20px;
}

.proxy-hero-search {
    display: flex;
    align-items: center;
    background: rgba(16, 24, 44, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 28px;
    padding: 6px 8px 6px 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 242, 254, 0.15);
    transition: all 0.2s ease;
}

.proxy-hero-search:focus-within {
    border-color: #00f2fe;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 254, 0.3);
}

.proxy-hero-search-icon {
    color: #00f2fe;
    font-size: 16px;
    margin-right: 10px;
}

.proxy-hero-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}

.proxy-hero-search-btn {
    background: linear-gradient(135deg, #00f2fe, #4facfe);
    color: #080c14;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.18s ease;
}

.proxy-hero-search-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
}

.proxy-section-heading {
    width: 100%;
    max-width: 760px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 12px;
}

.proxy-tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    width: 100%;
    max-width: 760px;
    margin-bottom: 24px;
}

.proxy-tile {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.proxy-tile:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(0, 242, 254, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.proxy-tile-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.proxy-tile-name {
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
}

.proxy-tile-tag {
    font-size: 10px;
    color: #64748b;
}

.proxy-features-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    max-width: 760px;
    width: 100%;
}

.proxy-feature-item {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.proxy-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #ffffff;
    display: none;
    flex: 1;
}

/* ============================================================
   HYDROS DISPLAY AUTO-RESIZE & SCALING STYLES
   ============================================================ */
.hydros-scale-selector {
    display: flex;
    gap: 8px;
    width: 100%;
}

.scale-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    border-radius: 8px;
    padding: 8px 6px;
    color: var(--text-main, #ffffff);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

body.light-mode .scale-btn {
    background: rgba(0, 0, 0, 0.05);
}

.scale-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

body.light-mode .scale-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.scale-btn.active {
    background: var(--ios-blue, #007aff) !important;
    color: #ffffff !important;
    border-color: var(--ios-blue, #007aff) !important;
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.4);
}

/* ============================================================
   MACOS FINDER — APPLICATIONS DIRECTORY STYLING
   ============================================================ */
#finderApp {
    background: #141720 !important;
    color: #f8fafc;
}

body.light-mode #finderApp {
    background: #f5f5f7 !important;
    color: #1d1d1f;
}

.finder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(24, 27, 36, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

body.light-mode .finder-toolbar {
    background: rgba(235, 235, 240, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.finder-toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.finder-path-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

body.light-mode .finder-path-badge {
    color: #1d1d1f;
}

.finder-count-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

body.light-mode .finder-count-pill {
    background: rgba(0, 122, 255, 0.12);
    border-color: rgba(0, 122, 255, 0.25);
    color: #007aff;
}

.finder-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.finder-view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 7px;
    padding: 2px;
}

body.light-mode .finder-view-toggle {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.1);
}

.finder-view-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 28px;
    height: 24px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.15s ease;
}

body.light-mode .finder-view-btn {
    color: rgba(0, 0, 0, 0.55);
}

.finder-view-btn.active {
    background: #007aff;
    color: #ffffff;
}

.finder-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 5px 10px;
    width: 200px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

body.light-mode .finder-search-box {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

.finder-search-box:focus-within {
    border-color: #007aff;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.25);
}

.finder-search-box i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

body.light-mode .finder-search-box i {
    color: rgba(0, 0, 0, 0.45);
}

.finder-search-box input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 12.5px;
    width: 100%;
}

body.light-mode .finder-search-box input {
    color: #1d1d1f;
}

.finder-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.finder-sidebar {
    width: 190px;
    background: rgba(18, 20, 28, 0.85);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-shrink: 0;
    overflow-y: auto;
}

body.light-mode .finder-sidebar {
    background: rgba(230, 230, 236, 0.85);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.finder-sidebar-group-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.45);
    padding: 4px 10px 6px;
}

body.light-mode .finder-sidebar-group-title {
    color: rgba(0, 0, 0, 0.45);
}

.finder-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

body.light-mode .finder-sidebar-item {
    color: #1d1d1f;
}

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

body.light-mode .finder-sidebar-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

.finder-sidebar-item.active {
    background: rgba(0, 122, 255, 0.25);
    color: #ffffff;
    font-weight: 600;
}

body.light-mode .finder-sidebar-item.active {
    background: #007aff;
    color: #ffffff;
}

.finder-sidebar-item.active i {
    color: #ffffff !important;
}

.finder-sidebar-item i {
    width: 16px;
    text-align: center;
    font-size: 13px;
}

.finder-content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background: #10131a;
}

body.light-mode .finder-content-area {
    background: #ffffff;
}

.finder-list-header {
    display: grid;
    grid-template-columns: 1fr 140px 95px;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

body.light-mode .finder-list-header {
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.5);
}

.finder-col-action {
    text-align: right;
}

.finder-apps-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
}

.finder-apps-container.list-mode {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.finder-apps-container.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
    gap: 12px;
    padding: 16px;
    align-content: start;
}

.finder-app-row {
    display: grid;
    grid-template-columns: 1fr 140px 95px;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease, border-color 0.15s ease;
}

body.light-mode .finder-app-row {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
}

.finder-app-row:hover {
    background: rgba(0, 122, 255, 0.18);
    border-color: rgba(0, 122, 255, 0.45);
    transform: translateX(2px);
}

body.light-mode .finder-app-row:hover {
    background: rgba(0, 122, 255, 0.1);
    border-color: rgba(0, 122, 255, 0.35);
}

.finder-row-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.finder-app-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
}

.finder-app-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.finder-app-name {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .finder-app-name {
    color: #1d1d1f;
}

.finder-app-desc {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .finder-app-desc {
    color: rgba(0, 0, 0, 0.55);
}

.finder-category-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.75);
}

body.light-mode .finder-category-pill {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.7);
}

.finder-row-action {
    display: flex;
    justify-content: flex-end;
}

.finder-open-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 7px;
    border: 1px solid rgba(0, 122, 255, 0.4);
    background: rgba(0, 122, 255, 0.2);
    color: #60a5fa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.finder-app-row:hover .finder-open-btn,
.finder-open-btn:hover {
    background: #007aff;
    border-color: #007aff;
    color: #ffffff;
}

/* Grid Card Mode */
.finder-app-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 14px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.15s ease;
    gap: 8px;
}

body.light-mode .finder-app-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
}

.finder-app-card:hover {
    background: rgba(0, 122, 255, 0.18);
    border-color: rgba(0, 122, 255, 0.45);
    transform: translateY(-2px);
}

.finder-app-card .finder-app-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 22px;
}

.finder-app-card .finder-app-name {
    font-size: 12.5px;
    white-space: normal;
    line-height: 1.25;
}

.finder-app-cat-sub {
    font-size: 10.5px;
    color: rgba(255, 255, 255, 0.45);
}

body.light-mode .finder-app-cat-sub {
    color: rgba(0, 0, 0, 0.45);
}

.finder-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    gap: 6px;
}

.finder-empty-state i {
    font-size: 28px;
    margin-bottom: 6px;
    opacity: 0.6;
}

.finder-empty-state span {
    font-size: 12px;
    opacity: 0.7;
}

@media (max-width: 680px) {
    .finder-body {
        flex-direction: column;
    }

    .finder-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 8px;
    }

    .finder-sidebar-group-title {
        display: none;
    }

    .finder-sidebar-item {
        width: auto;
        white-space: nowrap;
        padding: 6px 10px;
    }

    .finder-list-header {
        display: none !important;
    }

    .finder-app-row {
        grid-template-columns: 1fr auto;
    }

    .finder-row-category {
        display: none;
    }
}


