/* Font imports */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans+Condensed:wght@700&display=swap");

/* CSS Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* macOS Colors */
    --bg-primary: rgba(30, 30, 30, 0.85);
    --bg-secondary: rgba(45, 45, 45, 0.9);
    --bg-tertiary: rgba(60, 60, 60, 0.8);
    --bg-window: rgba(40, 40, 40, 0.95);
    --bg-sidebar: rgba(35, 35, 35, 0.98);
    --bg-content: rgba(28, 28, 28, 0.98);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.5);

    --accent-blue: #007aff;
    --accent-purple: #bf5af2;
    --accent-pink: #ff375f;
    --accent-orange: #ff9f0a;
    --accent-green: #30d158;
    --accent-cyan: #64d2ff;
    --accent-yellow: #ffd60a;

    --control-close: #ff5f56;
    --control-minimize: #ffbd2e;
    --control-maximize: #27c93f;

    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 0, 0, 0.5);

    /* Sizing */
    --menu-bar-height: 28px;
    --dock-height: 80px;
    --window-header-height: 52px;
    --sidebar-width: 180px;
    --border-radius: 12px;
    --border-radius-sm: 8px;

    /* Animation timing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Liquid Glass Variables - Optimized for performance */
    --glass-blur: 20px;
    --glass-saturation: 150%;
    --glass-brightness: 1.05;
    --glass-border-opacity: 0.15;
    --liquid-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* 3D Effect Variables */
    --perspective: 1000px;
    --tilt-amount: 5deg;
    --float-distance: 10px;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto,
        sans-serif;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    background: #000;
    perspective: var(--perspective);
}

/* ============================================
   3D TYPING STARTUP SCREEN
   ============================================ */

#startup-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.5s ease-out;
    overflow: hidden;
}

#startup-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.startup-3d-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.startup-3d-text {
    position: relative;
    color: #fff;
    font-family: 'Open Sans Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(3rem, 12vw, 10rem);
    font-weight: 700;
    line-height: 1.1em;
    outline: none;
    text-align: center;
    user-select: none;
    -webkit-user-select: none;
    transform: rotate(-10deg) skewX(20deg);
    text-shadow:
        -1px 1px #cacaca,
        -2px 2px #cacaca,
        -3px 3px #cacaca,
        -4px 4px #cacaca,
        -5px 5px #cacaca,
        -6px 6px #cacaca,
        -7px 7px #cacaca,
        -8px 8px #cacaca,
        -9px 9px #cacaca,
        -10px 10px #cacaca,
        -11px 11px #cacaca,
        -12px 12px #cacaca,
        -20px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: text3dFadeIn 0.5s ease-out forwards;
}

.startup-3d-text.typing-done {
    animation: text3dFadeIn 0.5s ease-out forwards, text3dPulse 0.3s ease-out 0s forwards;
}

@keyframes text3dFadeIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) skewX(20deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(-10deg) skewX(20deg) scale(1);
    }
}

@keyframes text3dPulse {
    0% {
        transform: rotate(-10deg) skewX(20deg) scale(1);
    }
    50% {
        transform: rotate(-10deg) skewX(20deg) scale(1.05);
    }
    100% {
        transform: rotate(-10deg) skewX(20deg) scale(1);
    }
}

/* Typing cursor */
.startup-3d-text .cursor {
    display: inline-block;
    margin-left: 0.1em;
    animation: blink 0.7s infinite;
}

.startup-3d-text .cursor.hidden {
    opacity: 0;
    animation: none;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ============================================
   LIQUID GLASS FOUNDATION STYLES
   ============================================ */

/* Base liquid glass effect mixin-style class */
.liquid-glass {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation))
        brightness(var(--glass-brightness));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation)) brightness(var(--glass-brightness));
    border: 1px solid rgba(255, 255, 255, var(--glass-border-opacity));
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Animated gradient border for liquid effect */
@property --liquid-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes liquidFlow {
    from {
        --liquid-angle: 0deg;
    }
    to {
        --liquid-angle: 360deg;
    }
}

/* Morphing blob animation */
@keyframes morphBlob {
    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%;
    }
    75% {
        border-radius: 60% 40% 60% 30% / 70% 50% 40% 60%;
    }
}

/* Floating animation */
@keyframes float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-15px) rotate(0.5deg);
    }
}

/* Subtle glow pulse */
@keyframes glowPulse {
    0%,
    100% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(100, 210, 255, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow:
            0 8px 32px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(100, 210, 255, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.15);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* Desktop */
#desktop {
    width: 100vw;
    height: 100vh;
    background-image: url("/public/images/wallpaper.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-out;
    transform-style: preserve-3d;
}

#desktop.loaded {
    opacity: 1;
}

/* Menu Bar */
#menu-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--menu-bar-height);
    background: linear-gradient(
        180deg,
        rgba(60, 60, 60, 0.7) 0%,
        rgba(30, 30, 30, 0.8) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 12px;
    z-index: 9999;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

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

.menu-right {
    gap: 4px;
}

/* Apple Logo in Menu Bar */
#menu-bar .apple-logo {
    width: 14px;
    height: 14px;
    filter: brightness(0) invert(1);
    cursor: pointer;
    transition: opacity 0.15s ease;
    padding: 4px;
    box-sizing: content-box;
}

#menu-bar .apple-logo:hover {
    opacity: 0.7;
}

.menu-item {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: default;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.15s ease;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

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

.menu-item.active-app {
    font-weight: 600;
}

/* Menu Icon Wrapper */
.menu-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease;
}

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

.menu-icon-wrapper .menu-icon {
    width: 16px;
    height: 16px;
}

/* Standalone menu icons (search, control center) */
.menu-right > img.menu-icon {
    width: 16px;
    height: 16px;
    padding: 4px 8px;
    border-radius: 4px;
    box-sizing: content-box;
    transition: background 0.15s ease;
}

.menu-right > img.menu-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-icon {
    opacity: 0.9;
    cursor: pointer;
    filter: brightness(0) invert(1);
    display: block;
}

.menu-time {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    padding: 3px 10px;
    margin-left: 2px;
}

/* Menu Dropdowns */
.menu-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: linear-gradient(
        135deg,
        rgba(50, 50, 50, 0.95) 0%,
        rgba(30, 30, 30, 0.98) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 10px;
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 6px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.96);
    transform-origin: top center;
    transition: all 0.25s var(--ease-out-expo);
    z-index: 10000;
}

.menu-item:hover .menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: default;
    transition: background 0.1s ease;
}

.dropdown-item:hover:not(.disabled) {
    background: var(--accent-blue);
}

.dropdown-item.disabled {
    color: var(--text-tertiary);
}

.dropdown-shortcut {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: 20px;
}

.dropdown-item:hover:not(.disabled) .dropdown-shortcut {
    color: rgba(255, 255, 255, 0.7);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Status Tooltips */
.status-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: linear-gradient(
        135deg,
        rgba(60, 60, 60, 0.95) 0%,
        rgba(30, 30, 30, 0.98) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 18px;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(100, 210, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s var(--ease-out-expo);
    z-index: 10001;
}

.status-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 12px;
}

.status-label {
    color: var(--text-tertiary);
}

.status-value {
    color: var(--text-primary);
    font-weight: 500;
}

.status-battery {
    display: flex;
    align-items: center;
    gap: 6px;
}

.battery-icon {
    width: 22px;
    height: 10px;
    border: 1.5px solid var(--text-secondary);
    border-radius: 2px;
    position: relative;
    padding: 1px;
}

.battery-icon::after {
    content: "";
    position: absolute;
    right: -4px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 5px;
    background: var(--text-secondary);
    border-radius: 0 1px 1px 0;
}

.battery-level {
    height: 100%;
    background: var(--accent-green);
    border-radius: 1px;
}

/* Notification Center */
#notification-center {
    position: fixed;
    top: 36px;
    right: 12px;
    width: 320px;
    max-height: calc(100vh - 120px);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.notification {
    background: linear-gradient(
        135deg,
        rgba(70, 70, 70, 0.9) 0%,
        rgba(50, 50, 50, 0.95) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 14px 18px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 30px rgba(100, 210, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateX(350px) scale(0.9) rotateY(-10deg);
    opacity: 0;
    transition:
        transform 0.5s var(--ease-out-expo),
        opacity 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    transform-style: preserve-3d;
}

.notification.show {
    transform: translateX(0) scale(1) rotateY(0deg);
    opacity: 1;
}

.notification.hide {
    transform: translateX(350px) scale(0.9) rotateY(10deg);
    opacity: 0;
}

.notification:hover {
    transform: translateX(-5px) scale(1.02);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.15),
        0 0 40px rgba(100, 210, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.notification-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.notification-app {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.notification-time {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.notification-body {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: pre-line;
}

/* Spotlight Search */
#spotlight-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    z-index: 99998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
    perspective: 1000px;
}

#spotlight-overlay.active {
    opacity: 1;
    visibility: visible;
}

#spotlight {
    width: 680px;
    max-width: 90vw;
    background: linear-gradient(
        135deg,
        rgba(60, 60, 60, 0.9) 0%,
        rgba(36, 36, 36, 0.95) 50%,
        rgba(40, 40, 40, 0.92) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 100px rgba(100, 210, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transform: scale(0.9) rotateX(10deg) translateY(-20px);
    opacity: 0;
    transition:
        transform 0.4s var(--ease-out-expo),
        opacity 0.3s ease;
}

#spotlight-overlay.active #spotlight {
    transform: scale(1) rotateX(0deg) translateY(0);
    opacity: 1;
}

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

.spotlight-input-wrapper svg {
    width: 22px;
    height: 22px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

#spotlight-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-size: 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-weight: 300;
}

#spotlight-input::placeholder {
    color: var(--text-tertiary);
}

.spotlight-results {
    max-height: 380px;
    overflow-y: auto;
}

.spotlight-section {
    padding: 6px 0;
}

.spotlight-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 18px;
}

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

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

.spotlight-item-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.spotlight-item-text {
    flex: 1;
    min-width: 0;
}

.spotlight-item-title {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spotlight-item-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
}

.spotlight-item.selected .spotlight-item-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

/* Context Menu */
.context-menu {
    position: fixed;
    min-width: 200px;
    background: linear-gradient(
        135deg,
        rgba(60, 60, 60, 0.95) 0%,
        rgba(30, 30, 30, 0.98) 100%
    );
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 40px rgba(100, 210, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    padding: 6px 0;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.9) translateY(-10px);
    transform-origin: top left;
    transition: all 0.25s var(--ease-out-expo);
}

.context-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: default;
    transition: background 0.1s ease;
}

.context-menu-item:hover:not(.disabled) {
    background: var(--accent-blue);
}

.context-menu-item.disabled {
    color: var(--text-tertiary);
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Windows Container */
#windows-container {
    position: absolute;
    top: var(--menu-bar-height);
    left: 0;
    right: 0;
    bottom: var(--dock-height);
    pointer-events: none;
}

/* Window Base Styles */
.window {
    position: absolute;
    min-width: 400px;
    min-height: 300px;
    background: rgba(40, 40, 40, 0.92);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    will-change: transform, opacity;
}

.window.active {
    display: flex;
    animation: windowOpen3D 0.25s var(--ease-out-expo) forwards;
}

.window.closing {
    animation: windowClose3D 0.2s ease-out forwards;
}

.window.minimizing {
    animation: windowMinimize3D 0.25s var(--ease-out-expo) forwards;
}

.window.focused {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

.window:not(.focused) {
    opacity: 0.95;
}

.window.shake {
    animation: windowShake 0.4s ease-in-out;
}

/* Window Animations - 3D Enhanced */
@keyframes windowOpen3D {
    from {
        opacity: 0;
        transform: perspective(1000px) scale(0.9) rotateX(10deg)
            translateY(20px);
    }
    to {
        opacity: 1;
        transform: perspective(1000px) scale(1) rotateX(0deg) translateY(0);
    }
}

@keyframes windowClose3D {
    from {
        opacity: 1;
        transform: perspective(1000px) scale(1) rotateX(0deg);
    }
    to {
        opacity: 0;
        transform: perspective(1000px) scale(0.9) rotateX(-10deg)
            translateY(20px);
    }
}

@keyframes windowMinimize3D {
    0% {
        opacity: 1;
        transform: perspective(1000px) scale(1) translateY(0) rotateX(0deg);
    }
    50% {
        transform: perspective(1000px) scale(0.8) translateY(30vh)
            rotateX(15deg);
    }
    100% {
        opacity: 0;
        transform: perspective(1000px) scale(0.3) translateY(70vh)
            rotateX(30deg);
    }
}

@keyframes windowShake {
    0%,
    100% {
        transform: translateX(0) rotateY(0deg);
    }
    20% {
        transform: translateX(-6px) rotateY(-2deg);
    }
    40% {
        transform: translateX(6px) rotateY(2deg);
    }
    60% {
        transform: translateX(-4px) rotateY(-1deg);
    }
    80% {
        transform: translateX(4px) rotateY(1deg);
    }
}

/* Legacy animations for compatibility */
@keyframes windowOpen {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes windowMinimize {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.4) translateY(60vh);
    }
}

/* Window Header */
.window-header {
    height: var(--window-header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    cursor: grab;
    flex-shrink: 0;
    position: relative;
}

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

.window-controls {
    display: flex;
    gap: 8px;
    z-index: 1;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: filter 0.15s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

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

.control:hover {
    filter: brightness(1.1);
}

.window:not(.focused) .control {
    background: rgba(255, 255, 255, 0.2) !important;
}

.window.focused .window-controls:hover .control.close::before {
    content: "×";
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
    margin-top: -2px;
}

.window.focused .window-controls:hover .control.minimize::before {
    content: "−";
    font-size: 14px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
    margin-top: -2px;
}

.window.focused .window-controls:hover .control.maximize::before {
    content: "+";
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.6);
    line-height: 1;
    margin-top: -2px;
}

.window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

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

.window-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Window Body */
.window-body {
    flex: 1;
    overflow: hidden;
    display: flex;
}

/* Finder Window */
#finder-window {
    width: 800px;
    height: 500px;
    top: 60px;
    left: 80px;
}

.finder-body {
    display: flex;
}

.finder-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 12px 8px;
    overflow-y: auto;
}

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

.sidebar-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    display: block;
}

.sidebar-items {
    margin-top: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    color: var(--text-primary);
    font-size: 13px;
}

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

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-item img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.finder-content {
    flex: 1;
    background: var(--bg-content);
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

/* File/Folder Items */
.file-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    position: absolute;
}

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

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

.file-item-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 6px;
    object-fit: contain;
}

.file-item-name {
    font-size: 11px;
    color: var(--text-primary);
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
    max-width: 80px;
}

/* Grid Layout for Files */
.finder-content.files-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-content: flex-start;
}

.finder-content.files-grid .file-item {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb-item {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.breadcrumb-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.breadcrumb-item.current {
    color: var(--text-primary);
    font-weight: 500;
    pointer-events: none;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Safari Browser Window */
#safari-window {
    width: 900px;
    height: 600px;
    top: 60px;
    left: 120px;
}

.safari-header {
    height: auto;
    padding: 0;
    flex-direction: column;
    cursor: default;
}

.safari-header .window-controls {
    position: absolute;
    left: 16px;
    top: 14px;
    z-index: 2;
}

.safari-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 90px;
    width: 100%;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.safari-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.safari-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.safari-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.safari-url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.safari-url-bar:focus-within {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.safari-url-icon {
    color: var(--accent-green);
    flex-shrink: 0;
}

#safari-url-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
}

#safari-url-input::placeholder {
    color: var(--text-tertiary);
}

.safari-reload-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

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

.safari-body {
    background: #fff;
    padding: 0;
    overflow: hidden;
}

.safari-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

.section-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

/* Photos/Gallery Window */
#photos-window {
    width: 800px;
    height: 500px;
    top: 100px;
    left: 200px;
}

.photos-body {
    display: flex;
}

.photos-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 12px 8px;
}

.photos-content {
    flex: 1;
    background: var(--bg-content);
    padding: 20px;
    overflow-y: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Contact Window */
#contact-window {
    width: 500px;
    height: 400px;
    top: 120px;
    left: 250px;
}

.contact-body {
    background: var(--bg-content);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.contact-content {
    text-align: center;
    width: 100%;
}

.contact-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contact-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.socials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
    text-decoration: none;
}

.social-card:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.social-card:active {
    transform: translateY(-1px) scale(0.98);
}

.social-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.social-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

/* Terminal/Skills Window */
#terminal-window {
    width: 650px;
    height: 450px;
    top: 80px;
    left: 300px;
}

.terminal-header {
    background: rgba(30, 30, 30, 0.98);
}

.terminal-body {
    background: rgba(20, 20, 20, 0.98);
    font-family: "SF Mono", "Monaco", "Menlo", "Consolas", monospace;
    padding: 16px;
    overflow-y: auto;
}

.terminal-content {
    font-size: 13px;
    line-height: 1.6;
}

.terminal-line {
    margin-bottom: 8px;
}

.terminal-prompt {
    color: var(--accent-green);
}

.terminal-command {
    color: var(--text-primary);
}

.terminal-output {
    color: var(--text-secondary);
    margin-top: 8px;
}

.skill-category {
    margin-bottom: 12px;
}

.skill-category-name {
    color: var(--accent-blue);
    font-weight: 500;
}

.skill-items {
    color: var(--text-secondary);
    margin-left: 20px;
}

/* Terminal cursor blink */
@keyframes blink {
    0%,
    50% {
        opacity: 1;
    }
    51%,
    100% {
        opacity: 0;
    }
}

.terminal-cursor {
    animation: blink 1s infinite;
}

/* Resume Window */
#resume-window {
    width: 650px;
    height: calc(100vh - var(--menu-bar-height) - var(--dock-height) - 20px);
    top: 10px;
    left: calc(50% - 325px);
}

.resume-body {
    background: #3a3a3a;
    flex-direction: column;
}

.pdf-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #525659;
}

.resume-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 10px 16px;
    background: rgba(30, 30, 30, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-download-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease;
}

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

.resume-download-btn svg {
    flex-shrink: 0;
}

#pdf-canvas {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    background: #fff;
}

.pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(30, 30, 30, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.pdf-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
}

.pdf-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

#pdf-page-info {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: center;
}

.pdf-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

#pdf-zoom-level {
    font-size: 13px;
    color: var(--text-secondary);
    min-width: 50px;
    text-align: center;
}

/* Text File Viewer Window */
#txtfile-window {
    width: 550px;
    height: 420px;
    top: 100px;
    left: 280px;
}

.txtfile-body {
    background: var(--bg-content);
    padding: 24px;
    overflow-y: auto;
}

.txt-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

.txt-content p {
    margin-bottom: 16px;
}

.txt-header {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.txt-header-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.txt-header-content {
    flex: 1;
}

.txt-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image File Viewer Window */
#imgfile-window {
    width: 600px;
    height: 500px;
    top: 80px;
    left: 260px;
}

.imgfile-body {
    background: rgba(20, 20, 20, 0.98);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.img-preview {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

/* About This Mac Window */
#about-window {
    width: 480px;
    height: 320px;
    left: 50%;
    top: 50%;
    margin-left: -240px;
    margin-top: -160px;
    min-width: 480px;
    min-height: 320px;
}

#about-window.active {
    animation: windowOpen 0.25s var(--ease-out-expo) forwards;
}

#about-window .window-header {
    height: 40px;
    background: transparent;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
}

.about-body {
    background: linear-gradient(
        180deg,
        rgba(50, 50, 50, 0.95) 0%,
        rgba(25, 25, 25, 0.98) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Animated gradient shimmer in About window */
.about-body::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 40%,
        rgba(100, 210, 255, 0.03) 45%,
        rgba(100, 210, 255, 0.05) 50%,
        rgba(100, 210, 255, 0.03) 55%,
        transparent 60%
    );
    animation: shimmer 8s linear infinite;
    pointer-events: none;
}

.about-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    animation: float 6s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

.about-title {
    font-size: 26px;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 4px;
    position: relative;
    z-index: 1;
}

.about-version {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.about-specs {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.about-specs p {
    margin: 0;
}

.about-specs strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.about-footer {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}

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

.dock-container {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(50, 50, 50, 0.5);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
    -webkit-backdrop-filter: blur(var(--glass-blur))
        saturate(var(--glass-saturation));
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    position: relative;
    padding: 2px;
    /* Transform handled by JS animation loop for smoothness */
    transform-style: preserve-3d;
    will-change: transform;
}

.dock-item:hover .dock-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px) scale(1);
    visibility: visible;
}

.dock-icon {
    width: 50px;
    height: 50px;
    border-radius: 11px;
    transition:
        transform 0.2s var(--ease-out-expo),
        filter 0.2s ease,
        box-shadow 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.dock-item:hover .dock-icon {
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.4)) brightness(1.1);
}

.dock-indicator {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    margin-top: 3px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dock-item.open .dock-indicator {
    opacity: 1;
}

.dock-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px) scale(0.9);
    background: linear-gradient(
        135deg,
        rgba(60, 60, 60, 0.95) 0%,
        rgba(30, 30, 30, 0.98) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s var(--ease-out-expo);
    margin-bottom: 10px;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dock-divider {
    width: 1px;
    height: 42px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
    align-self: center;
}

/* Dock bouncing animation - Enhanced 3D */
@keyframes bounce3D {
    0%,
    100% {
        transform: translateY(0) scale(1) rotateX(0deg);
    }
    15% {
        transform: translateY(-20px) scale(1.1) rotateX(-10deg);
    }
    30% {
        transform: translateY(-8px) scale(1.05) rotateX(-5deg);
    }
    45% {
        transform: translateY(-16px) scale(1.08) rotateX(-8deg);
    }
    60% {
        transform: translateY(-4px) scale(1.02) rotateX(-2deg);
    }
    75% {
        transform: translateY(-10px) scale(1.04) rotateX(-4deg);
    }
}

.dock-item.bouncing {
    animation: bounce3D 0.6s var(--ease-out-expo);
}

.dock-item.shake {
    animation: windowShake 0.4s ease;
}

/* Dock item 3D hover lift */
.dock-item:active {
    transform: scale(0.95) translateY(2px);
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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

/* Easter egg styles */
body.konami-active #desktop {
    animation: rainbow 4s linear infinite;
}

body.konami-active .dock-icon {
    animation: pulse 0.8s ease infinite;
}

@keyframes rainbow {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
}

/* Speed Test Window */
.speedtest-body {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

.speedtest-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    height: 100%;
    color: #fff;
    text-align: center;
}

.speedtest-header {
    margin-bottom: 30px;
}

.speedtest-logo {
    color: #00d4ff;
    margin-bottom: 15px;
}

.speedtest-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #fff;
}

.speedtest-status {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.speedtest-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
    max-width: 350px;
}

.speedtest-metric {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.speedtest-metric.small {
    padding: 15px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 5px;
}

.speedtest-metric.small .metric-value {
    font-size: 20px;
}

.metric-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.speedtest-progress {
    width: 100%;
    max-width: 350px;
    margin-bottom: 20px;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #00ff88);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.speedtest-button {
    background: linear-gradient(135deg, #00d4ff, #00a8cc);
    color: #fff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.speedtest-button:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 212, 255, 0.4);
}

.speedtest-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.speedtest-info {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    max-width: 300px;
}

.speedtest-info p {
    margin: 4px 0;
}

/* Status tooltip additions */
.status-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.status-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.status-action-btn svg {
    flex-shrink: 0;
}

/* Selection highlight */
::selection {
    background: var(--accent-blue);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dock-icon {
        width: 44px;
        height: 44px;
    }

    .window {
        min-width: 320px;
        width: 95vw !important;
        left: 2.5vw !important;
    }

    .finder-sidebar,
    .photos-sidebar {
        width: 140px;
    }

    #spotlight {
        width: 95vw;
    }
}
