/**
 * 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;
}

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

/* ============================================================
   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-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: macFadeIn 0.12s ease-out;
}

@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;
}

.mac-desktop-icons {
    position: absolute;
    top: 45px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    z-index: 10;
}

.mac-desktop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.15s;
    width: 82px;
    text-align: center;
}

.mac-desktop-item:hover,
.mac-desktop-item.selected {
    background: rgba(255, 255, 255, 0.16);
}

.mac-desktop-item i {
    font-size: 36px;
    color: #60a5fa;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.mac-desktop-item span {
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* Desktop Widgets */
.mac-desktop-widgets {
    position: absolute;
    top: 45px;
    left: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
    max-width: 320px;
    pointer-events: auto;
}

.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);
}

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: 55px;
    left: 50%;
    transform: translateX(-50%) scale(0.95);
    width: min(960px, 94vw);
    height: min(680px, calc(100vh - 125px));
    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.2s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
    display: none;
    flex-direction: column;
}

.app-window:not(.open) {
    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 !important;
    pointer-events: auto !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, 94vw);
    height: min(680px, calc(100vh - 125px));
    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: 55px;
    left: 50%;
    transform: translateX(-50%) scale(1);
}

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

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

#timezoneApp.app-window.open:not(.maximized) {
    width: min(660px, 94vw) !important;
    height: min(640px, calc(100vh - 110px)) !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;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    transform: none !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !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;
    animation: 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 {
    transform: translateX(-50%) scale(0.9) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.app-window.maximized.closing {
    animation: none !important;
    transform: scale(0.96) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
}

.app-window.dragged.closing {
    transform: scale(0.9) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.app-window.dragged.closing {
    transform: scale(0.9) !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 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: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    pointer-events: auto !important;
    will-change: transform, opacity;
}

.mac-dock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 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: 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;
    pointer-events: auto !important;
}

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.18s cubic-bezier(0.25, 1, 0.5, 1);
    pointer-events: auto !important;
    transform-origin: bottom center;
    will-change: transform;
}

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

.mac-dock-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: filter 0.15s, transform 0.15s;
    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 LAUNCHPAD
   ============================================================ */
#mac-launchpad {
    position: fixed;
    inset: 0;
    background: rgba(10, 12, 18, 0.75);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    z-index: 9500;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 60px 40px 100px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#mac-launchpad.open {
    display: flex;
    opacity: 1;
}

.launchpad-search-wrap {
    width: 100%;
    max-width: 320px;
    margin-bottom: 40px;
    position: relative;
}

.launchpad-search-wrap input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.launchpad-search-wrap input:focus {
    background: rgba(255, 255, 255, 0.25);
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

.launchpad-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.launchpad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 32px 24px;
    max-width: 900px;
    width: 100%;
    overflow-y: auto;
    padding: 10px;
}

.launchpad-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.18s, filter 0.18s;
}

.launchpad-item:hover {
    transform: scale(1.1);
}

.launchpad-item:active {
    transform: scale(0.95);
}

.launchpad-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.launchpad-label {
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    text-align: center;
}

/* ============================================================
   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: macFadeIn 0.15s ease-out;
}

#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: macFadeIn 0.15s ease-out;
}

#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: macFadeIn 0.2s ease-out;
}

#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;
    -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;
}
