/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* ========== SCREENS ========== */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.screen.active {
    display: block;
}

/* ========== LOCK SCREEN ========== */
#lockScreen {
    background: #000;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    z-index: 10000;
}

.lock-screen-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.8) 0%,
        rgba(20, 20, 40, 0.9) 50%,
        rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.dynamic-wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: wallpaperPulse 15s ease-in-out infinite alternate;
    z-index: 0;
}

@keyframes wallpaperPulse {
    0% { opacity: 0.3; }
    100% { opacity: 0.7; }
}

/* Lock Screen Status Bar (Top) */
.lock-screen-status-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 44px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 2;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.status-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.status-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.status-right i {
    font-size: 1rem;
    opacity: 0.9;
}

.lock-time-small {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* Main Content */
.lock-screen-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 400px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 150px;
}

/* Time Display */
.time-display {
    text-align: center;
    margin-bottom: 40px;
    animation: timeFadeIn 1s ease-out;
}

@keyframes timeFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.time-display h1 {
    font-size: 5.5rem;
    font-weight: 200;
    letter-spacing: -2.5px;
    margin-bottom: 10px;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.time-display p {
    font-size: 1.4rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* User Profile */
.user-profile {
    margin-bottom: 40px;
    animation: profileFadeIn 1s ease-out 0.2s both;
}

@keyframes profileFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.avatar {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    position: relative;
}

.avatar-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.4),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
    animation: avatarGlow 3s ease-in-out infinite alternate;
}

@keyframes avatarGlow {
    0% { 
        box-shadow: 
            0 15px 35px rgba(0, 0, 0, 0.4),
            inset 0 0 40px rgba(255, 255, 255, 0.1),
            0 0 20px rgba(102, 126, 234, 0.2);
    }
    100% { 
        box-shadow: 
            0 15px 35px rgba(0, 0, 0, 0.4),
            inset 0 0 40px rgba(255, 255, 255, 0.1),
            0 0 40px rgba(118, 75, 162, 0.4);
    }
}

.username {
    font-size: 1.8rem;
    font-weight: 400;
    text-align: center;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* Password Field */
.password-container {
    width: 100%;
    animation: passwordFadeIn 1s ease-out 0.4s both;
}

@keyframes passwordFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.password-field {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.password-field:focus-within {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#lockPassword {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 20px;
    color: white;
    font-size: 1rem;
    outline: none;
    font-weight: 300;
    letter-spacing: 1px;
}

#lockPassword::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 300;
}

#unlockBtn {
    width: 50px;
    background: linear-gradient(135deg, #007aff 0%, #0056cc 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

#unlockBtn:hover {
    background: linear-gradient(135deg, #0056cc 0%, #004099 100%);
    transform: translateX(2px);
}

.password-hint {
    font-size: 0.9rem;
    opacity: 0.7;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 300;
}

.password-note {
    font-size: 0.8rem;
    opacity: 0.5;
    text-align: center;
    font-weight: 300;
}

/* Quick Actions */
.lock-screen-quick-actions {
    display: flex;
    gap: 30px;
    margin: 30px 0;
    animation: actionsFadeIn 1s ease-out 0.6s both;
}

@keyframes actionsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.quick-action {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-action:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Power Controls (Icons Only - Bottom Right) */
.lock-screen-power-controls {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 20px;
    z-index: 2;
    animation: controlsFadeIn 1s ease-out 0.8s both;
}

@keyframes controlsFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.power-icon-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.power-icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Emergency SOS (Bottom Left) */
.emergency-sos {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
    animation: sosFadeIn 1s ease-out 0.8s both;
}

@keyframes sosFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.sos-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 59, 48, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 59, 48, 0.3);
    border-radius: 50%;
    color: #ff3b30;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sos-btn:hover {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.5);
    transform: scale(1.1);
}

/* Biometric Indicator */
.biometric-indicator {
    position: absolute;
    bottom: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: biometricPulse 2s ease-in-out infinite;
    cursor: pointer;
}

@keyframes biometricPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
}

.biometric-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #34c759;
    border: 2px solid rgba(52, 199, 89, 0.3);
}

.biometric-text {
    font-size: 0.9rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
}

/* Password Error Animation */
@keyframes shakeError {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.password-error {
    animation: shakeError 0.5s ease-in-out;
    border-color: #ff3b30 !important;
    background: rgba(255, 59, 48, 0.1) !important;
}

/* ========== DESKTOP ========== */
#desktop {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), 
                url('https://images.unsplash.com/photo-1519681393784-d120267933ba?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80');
    background-size: cover;
    background-position: center;
}

/* Menu Bar */
.menu-bar {
    height: 25px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 0.9rem;
    color: #424245;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.apple-menu {
    font-size: 1.1rem;
    margin-right: 25px;
    cursor: pointer;
    font-weight: 500;
}

.menu-items {
    flex: 1;
    display: flex;
    gap: 25px;
}

.menu-item {
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.2s;
}

.menu-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.menu-right {
    display: flex;
    gap: 20px;
}

.status-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-icons i, #desktopTime {
    opacity: 0.9;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.2s;
}

.status-icons i:hover, #desktopTime:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 40px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 80px;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    padding: 10px 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.desktop-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.icon-img {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.8rem;
    color: #1d1d1f;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.icon-label {
    color: white;
    font-size: 0.85rem;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    word-break: break-word;
}

/* Dock */
.dock {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

.dock-items {
    display: flex;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 16px;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dock-item {
    width: 50px;
    height: 50px;
    margin: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.4rem;
    color: white;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
}

.dock-item:hover {
    transform: translateY(-10px) scale(1.2);
    background: rgba(255, 255, 255, 0.2);
}

.dock-item.running::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #007aff;
    border-radius: 50%;
}

.dock-separator {
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 10px 15px;
}

/* ========== APP WINDOWS ========== */
.app-window {
    position: absolute;
    width: 400px;
    height: 300px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    z-index: 100;
    animation: windowAppear 0.3s ease;
}

@keyframes windowAppear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.window-titlebar {
    height: 30px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    padding: 0 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    cursor: move;
}

.window-controls {
    display: flex;
    gap: 8px;
    margin-right: 15px;
}

.window-control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.window-control:hover {
    transform: scale(1.1);
}

.window-control.close {
    background: #ff5f57;
}

.window-control.minimize {
    background: #ffbd2e;
}

.window-control.expand {
    background: #28ca42;
}

.window-title {
    flex: 1;
    font-size: 0.9rem;
    color: #424245;
    text-align: center;
    font-weight: 500;
}

.window-content {
    padding: 20px;
    height: calc(100% - 30px);
    overflow-y: auto;
    color: #1d1d1f;
}

/* Finder window styles */
.finder-content h3 {
    margin-bottom: 20px;
}

.finder-files {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.finder-file:hover {
    background: #f5f5f7;
}

.finder-file i {
    font-size: 1.2rem;
    color: #007aff;
}

/* Music window styles */
.music-content h3 {
    margin-bottom: 20px;
}

.now-playing {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.song-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.song-info p {
    color: #86868b;
    font-size: 0.9rem;
}

.player-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.player-controls button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #007aff;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.player-controls button:hover {
    background: #0056cc;
    transform: scale(1.1);
}

.song-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.song-item:hover {
    background: #f5f5f7;
}

.song-item i {
    color: #ff2d55;
}

/* Calculator window styles */
.calculator-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.calculator-display {
    background: #1d1d1f;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: right;
}

.calc-current {
    font-size: 2rem;
    font-weight: 300;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.calc-btn {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: #f5f5f7;
    color: #1d1d1f;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.calc-btn:hover {
    background: #e5e5e7;
}

.calc-btn.operator {
    background: #ff9500;
    color: white;
}

.calc-btn.operator:hover {
    background: #e68a00;
}

.calc-btn.zero {
    grid-column: span 2;
}

/* Terminal window styles */
.terminal-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #1d1d1f;
    color: #f5f5f7;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    border-radius: 8px;
    padding: 20px;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.terminal-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.terminal-input span {
    color: #34c759;
}

.terminal-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    outline: none;
}

.cursor {
    animation: blink 1s infinite;
}

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

/* Preferences window styles */
.preferences-content h3 {
    margin-bottom: 20px;
}

.pref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.pref-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-radius: 10px;
    background: #f5f5f7;
    cursor: pointer;
    transition: all 0.2s;
}

.pref-item:hover {
    background: #e5e5e7;
    transform: translateY(-2px);
}

.pref-item i {
    font-size: 2rem;
    color: #007aff;
}

.pref-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== NOTIFICATION CENTER ========== */
.notification-center {
    position: absolute;
    top: 25px;
    right: -350px;
    width: 350px;
    height: calc(100% - 25px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: right 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: none;
}

.notification-center.active {
    right: 0;
    display: block;
}

.notification-header {
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-header h3 {
    font-weight: 600;
    color: #1d1d1f;
}

#closeNotifications {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #424245;
    padding: 5px;
    border-radius: 5px;
}

#closeNotifications:hover {
    background: rgba(0, 0, 0, 0.05);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.notification-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #007aff;
    animation: slideInRight 0.3s ease;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d1d1f;
}

.notification-message {
    font-size: 0.9rem;
    color: #424245;
}

.notification-time {
    font-size: 0.8rem;
    color: #86868b;
    margin-top: 5px;
}

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

/* Notification Toast */
.notification-toast {
    position: fixed;
    top: 40px;
    right: 20px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s;
    max-width: 350px;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.5rem;
    color: #007aff;
}

.toast-content { flex: 1; }
.toast-title { font-weight: 600; margin-bottom: 5px; color: #1d1d1f; }
.toast-message { font-size: 0.9rem; color: #424245; }

/* ========== MISSION CONTROL ========== */
.mission-control {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    animation: missionFadeIn 0.3s ease;
}

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

.mission-header {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.mission-header h2 {
    font-weight: 300;
    font-size: 2rem;
}

#exitMission {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

#exitMission:hover {
    background: rgba(255, 255, 255, 0.2);
}

.desktops-container {
    display: flex;
    gap: 30px;
    padding: 0 30px;
    height: 60%;
}

.desktop-space {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.desktop-space.active {
    border-color: #007aff;
    background: rgba(0, 122, 255, 0.1);
}

.desktop-space:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.desktop-label {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.windows-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    height: calc(100% - 40px);
}

.add-desktop {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    cursor: pointer;
    transition: color 0.2s;
}

.add-desktop:hover {
    color: white;
}

/* ========== LAUNCHPAD ========== */
.launchpad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(30px);
    z-index: 10000;
    display: none;
    animation: launchpadFadeIn 0.4s ease;
}

@keyframes launchpadFadeIn {
    from { opacity: 0; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1); }
}

.launchpad-header {
    padding: 40px 60px 20px;
    display: flex;
    gap: 20px;
}

.launchpad-search {
    flex: 1;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(20px);
}

.launchpad-search::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

#exitLaunchpad {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 30px;
    padding: 30px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.launchpad-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: white;
}

/* ========== SPOTLIGHT SEARCH ========== */
.spotlight {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px);
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    animation: spotlightSlideIn 0.2s ease;
    overflow: hidden;
}

@keyframes spotlightSlideIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}

.spotlight-search {
    display: flex;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.spotlight-search i {
    color: #86868b;
    margin-right: 15px;
    font-size: 1.2rem;
}

#spotlightInput {
    flex: 1;
    border: none;
    background: none;
    font-size: 1.2rem;
    color: #1d1d1f;
    outline: none;
}

#closeSpotlight {
    background: none;
    border: none;
    color: #86868b;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    border-radius: 5px;
}

#closeSpotlight:hover {
    background: rgba(0, 0, 0, 0.05);
}

.spotlight-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 20px;
}

.result-category h4 {
    color: #86868b;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

/* ========== MODAL ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal h3 {
    margin-bottom: 20px;
    color: #1d1d1f;
    font-size: 1.5rem;
}

/* Power modals */
.power-modal {
    text-align: center;
    max-width: 400px;
}

.power-icon-large {
    font-size: 3rem;
    color: #007aff;
    margin-bottom: 20px;
}

.power-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 25px;
}

.power-cancel, .power-confirm {
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    border: none;
    transition: all 0.2s;
}

.power-cancel {
    background: #f5f5f7;
    color: #424245;
}

.power-confirm {
    background: #007aff;
    color: white;
}

.power-cancel:hover {
    background: #e5e5e7;
}

.power-confirm:hover {
    background: #0056cc;
}

/* Sound test modal */
.sound-test-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.sound-test-btn {
    padding: 15px;
    background: #f5f5f7;
    border: 1px solid #e5e5e7;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.sound-test-btn:hover {
    background: #007aff;
    color: white;
    border-color: #007aff;
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 10px 20px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.modal-actions button:hover {
    background: #0056cc;
}

/* Shutdown/Restart overlays */
.shutdown-overlay, .restart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    z-index: 100000;
    transition: opacity 0.5s;
}

.restart-overlay .apple-logo {
    font-size: 4rem;
    margin-top: 20px;
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

@keyframes minimizeToDock {
    0% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.1) translateY(100px); }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .desktop-icons {
        grid-template-columns: repeat(2, 1fr);
        left: 10px;
        top: 30px;
    }
    
    .dock-items {
        padding: 8px 10px;
    }
    
    .dock-item {
        width: 40px;
        height: 40px;
        margin: 0 5px;
        font-size: 1.2rem;
    }
    
    .app-window {
        width: 90% !important;
        height: 80% !important;
        left: 5% !important;
        top: 10% !important;
    }
    
    .lock-screen-content {
        max-width: 90%;
        margin-top: 100px;
    }
    
    .time-display h1 {
        font-size: 3.5rem;
    }
    
    .time-display p {
        font-size: 1.2rem;
    }
    
    .avatar {
        width: 100px;
        height: 100px;
    }
    
    .username {
        font-size: 1.5rem;
    }
    
    .lock-screen-quick-actions {
        gap: 20px;
    }
    
    .quick-action {
        width: 50px;
        height: 50px;
    }
    
    .lock-screen-power-controls {
        bottom: 20px;
        right: 20px;
        gap: 15px;
    }
    
    .power-icon-btn {
        width: 45px;
        height: 45px;
    }
    
    .emergency-sos {
        bottom: 20px;
        left: 20px;
    }
    
    .sos-btn {
        width: 45px;
        height: 45px;
    }
    
    .biometric-indicator {
        bottom: 80px;
    }
    
    .spotlight {
        width: 90%;
    }
    
    .lock-screen-status-bar {
        padding: 0 15px;
        font-size: 0.8rem;
    }
    
    .status-right {
        gap: 10px;
    }
}

@media (max-height: 700px) {
    .lock-screen-content {
        margin-top: 80px;
    }
    
    .time-display {
        margin-bottom: 20px;
    }
    
    .time-display h1 {
        font-size: 3rem;
    }
    
    .user-profile {
        margin-bottom: 20px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .lock-screen-quick-actions {
        margin: 20px 0;
    }
    
    .biometric-indicator {
        bottom: 70px;
    }
}

/* ========== ENHANCED APPS STYLES ========== */

/* System Preferences */
.pref-sidebar {
    width: 200px;
    background: #f5f5f7;
    border-right: 1px solid #e5e5e7;
    padding: 20px 0;
    float: left;
    height: 100%;
}

.pref-sidebar-item {
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.pref-sidebar-item:hover {
    background: #e5e5e7;
}

.pref-sidebar-item.active {
    background: #e5e5e7;
    border-left-color: #007aff;
    font-weight: 500;
}

.pref-sidebar-item i {
    width: 20px;
    text-align: center;
}

.pref-panes {
    margin-left: 220px;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

.pref-pane {
    display: none;
}

.pref-pane.active {
    display: block;
}

.pref-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e7;
}

.pref-section h4 {
    margin-bottom: 15px;
    color: #1d1d1f;
    font-weight: 600;
}

.pref-option {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pref-option label {
    min-width: 150px;
    color: #424245;
}

.pref-option input[type="checkbox"] {
    margin-right: 8px;
}

.pref-option select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #c7c7cc;
    background: white;
}

.pref-option input[type="range"] {
    flex: 1;
    max-width: 200px;
}

.pref-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

.pref-btn {
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}

.pref-btn.secondary {
    background: #f5f5f7;
    color: #424245;
    border: 1px solid #c7c7cc;
}

.pref-btn:hover {
    opacity: 0.9;
}

.pref-btn.small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Wallpaper Grid */
.wallpaper-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.wallpaper-option {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.wallpaper-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wallpaper-option.selected {
    border-color: #007aff;
}

.wallpaper-preview {
    height: 100px;
    background-size: cover;
    background-position: center;
}

.wallpaper-name {
    display: block;
    padding: 8px;
    text-align: center;
    background: #f5f5f7;
    font-size: 0.9rem;
}

/* App Notifications */
.app-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f5f5f7;
    border-radius: 8px;
}

.app-notification-item i {
    width: 20px;
    text-align: center;
}

.app-notification-item span {
    flex: 1;
}

.app-notification-setting {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #c7c7cc;
}

/* User Profile */
.user-profile-large {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.user-avatar-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    font-weight: 600;
}

.user-info h4 {
    margin: 0 0 5px 0;
}

.user-info p {
    color: #86868b;
    margin: 0;
}

.user-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f5f5f7;
    border-radius: 8px;
    cursor: pointer;
}

.user-item:hover {
    background: #e5e5e7;
}

.user-status {
    color: #86868b;
    font-size: 0.9rem;
}

/* TextEdit */
.textedit-toolbar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e5e5e7;
}

.textedit-btn {
    padding: 5px 10px;
    background: #f5f5f7;
    border: 1px solid #c7c7cc;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.textedit-btn:hover {
    background: #e5e5e7;
}

.textedit-area {
    width: 100%;
    height: 350px;
    border: 1px solid #c7c7cc;
    border-radius: 4px;
    padding: 10px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    resize: none;
}

.textedit-status {
    margin-top: 10px;
    display: flex;
    gap: 20px;
    color: #86868b;
    font-size: 0.8rem;
}

/* Safari */
.safari-toolbar {
    background: #f5f5f7;
    border-bottom: 1px solid #e5e5e7;
    padding: 10px;
}

.safari-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.safari-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #c7c7cc;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.safari-btn:hover {
    background: #f5f5f7;
}

.safari-url-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid #c7c7cc;
    border-radius: 20px;
    padding: 5px 15px;
}

.safari-url-bar i {
    color: #34c759;
}

#safari-url {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.9rem;
}

.safari-go-btn {
    background: #007aff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 15px;
    cursor: pointer;
}

.safari-view {
    display: flex;
    height: calc(100% - 60px);
}

.safari-favorites {
    width: 200px;
    background: #f5f5f7;
    border-right: 1px solid #e5e5e7;
    padding: 20px;
}

.favorite-sites {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.favorite-site {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}

.favorite-site:hover {
    background: #e5e5e7;
}

.favorite-site i {
    font-size: 1.2rem;
    width: 30px;
}

.safari-webview {
    flex: 1;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.webview-placeholder {
    text-align: center;
    color: #86868b;
}

.webview-placeholder i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #007aff;
}

.website-preview {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    max-width: 500px;
}

.website-preview.apple {
    background: #000;
    color: white;
}

.website-preview.google {
    background: white;
}

.google-logo {
    font-size: 3rem;
    font-weight: bold;
    color: #4285f4;
    margin-bottom: 20px;
}

.google-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #c7c7cc;
    border-radius: 24px;
    font-size: 1rem;
}

.hint {
    font-size: 0.8rem;
    color: #ff9500;
    margin-top: 10px;
}

/* Launchpad Apps */
.launchpad-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
}

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

.launchpad-app-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 10px;
}

.launchpad-app-name {
    color: white;
    font-size: 0.9rem;
    text-align: center;
}

/* Mission Control Windows */
.window-preview {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.window-preview:hover {
    transform: translateY(-5px);
}

.window-preview-header {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.window-preview-title {
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
}

/* Dark Theme Support */
.dark-theme .pref-sidebar {
    background: #2c2c2e;
    border-right-color: #3a3a3c;
}

.dark-theme .pref-sidebar-item {
    color: #f5f5f7;
}

.dark-theme .pref-sidebar-item:hover {
    background: #3a3a3c;
}

.dark-theme .pref-sidebar-item.active {
    background: #3a3a3c;
}

.dark-theme .pref-section {
    border-bottom-color: #3a3a3c;
}

.dark-theme .pref-section h4 {
    color: #f5f5f7;
}

.dark-theme .pref-option label {
    color: #e5e5e7;
}

.dark-theme .pref-option select {
    background: #3a3a3c;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .pref-btn.secondary {
    background: #3a3a3c;
    color: #f5f5f7;
    border-color: #48484a;
}

.dark-theme .wallpaper-name {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .app-notification-item {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .user-item {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .user-item:hover {
    background: #48484a;
}

.dark-theme .textedit-btn {
    background: #3a3a3c;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .textedit-btn:hover {
    background: #48484a;
}

.dark-theme .textedit-area {
    background: #2c2c2e;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .safari-toolbar {
    background: #2c2c2e;
    border-bottom-color: #3a3a3c;
}

.dark-theme .safari-btn {
    background: #3a3a3c;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .safari-url-bar {
    background: #3a3a3c;
    border-color: #48484a;
}

.dark-theme #safari-url {
    background: transparent;
    color: #f5f5f7;
}

.dark-theme .safari-favorites {
    background: #2c2c2e;
    border-right-color: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .favorite-site:hover {
    background: #3a3a3c;
}

.dark-theme .website-preview {
    background: #2c2c2e;
    color: #f5f5f7;
}

.dark-theme .website-preview.google {
    background: #2c2c2e;
    color: #f5f5f7;
}

.dark-theme .google-search input {
    background: #3a3a3c;
    border-color: #48484a;
    color: #f5f5f7;
}

/* ========== UTILITIES STYLES ========== */

/* Context Menu */
.context-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    min-width: 200px;
    animation: fadeIn 0.2s ease;
}

.context-item {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.context-item:hover {
    background: #007aff;
    color: white;
}

.context-item i {
    width: 16px;
    text-align: center;
}

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

/* App Switcher */
.app-switcher {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    animation: fadeIn 0.2s ease;
}

.app-switcher-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
}

.app-switcher-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 30px;
    width: 500px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.app-switcher-container h3 {
    margin-bottom: 20px;
    text-align: center;
    color: #1d1d1f;
}

.app-switcher-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
}

.app-switcher-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.app-switcher-item.active {
    background: #007aff;
    color: white;
    transform: scale(1.1);
}

.app-switcher-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.app-switcher-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.app-switcher-hint {
    text-align: center;
    color: #86868b;
    font-size: 0.8rem;
    margin-top: 20px;
}

/* Developer Tools */
.dev-tools {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    max-width: 90%;
    max-height: 80%;
    background: white;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dev-tools-header {
    padding: 15px 20px;
    background: #1d1d1f;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dev-tools-header h3 {
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.dev-tools-tabs {
    display: flex;
    background: #f5f5f7;
    border-bottom: 1px solid #e5e5e7;
}

.dev-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    border-right: 1px solid #e5e5e7;
    cursor: pointer;
    font-size: 0.9rem;
}

.dev-tab:hover {
    background: #e5e5e7;
}

.dev-tab.active {
    background: white;
    font-weight: 500;
}

.dev-tools-content {
    flex: 1;
    overflow: hidden;
}

.dev-tab-content {
    display: none;
    height: 100%;
    overflow: auto;
}

.dev-tab-content.active {
    display: block;
}

/* Console */
.dev-console-output {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background: #1d1d1f;
    color: #f5f5f7;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
}

.dev-console-command {
    color: #34c759;
    margin-bottom: 5px;
}

.dev-console-command.error {
    color: #ff3b30;
}

.dev-console-result {
    color: #8e8e93;
    margin-bottom: 15px;
    padding-left: 20px;
}

.dev-console-result.error {
    color: #ff3b30;
}

.dev-console-input {
    padding: 15px;
    display: flex;
    gap: 10px;
    background: #2c2c2e;
}

.dev-console-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #48484a;
    border-radius: 4px;
    background: #1d1d1f;
    color: white;
}

.dev-console-input button {
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Database View */
#devDatabaseView {
    height: 400px;
    overflow: auto;
    padding: 20px;
    background: #f5f5f7;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    white-space: pre-wrap;
}

.dev-db-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.dev-db-actions button {
    padding: 10px 20px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.dev-db-actions button:hover {
    opacity: 0.9;
}

/* System Info & Performance */
.dev-system-info,
.dev-performance-info {
    padding: 20px;
}

.dev-system-info h4,
.dev-performance-info h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1d1d1f;
}

.dev-system-info p,
.dev-performance-info p {
    margin: 5px 0;
    color: #424245;
}

/* Drag & Drop */
.drag-over {
    position: relative;
}

.drag-over::after {
    content: 'Drop files here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 122, 255, 0.9);
    color: white;
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 1.2rem;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

/* Animations */
@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes minimizeToDock {
    0% { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.1) translateY(100px); }
}

/* High Contrast Mode */
.high-contrast {
    filter: contrast(1.5) brightness(1.2);
}

.high-contrast .app-window {
    border: 2px solid #000;
}

.high-contrast .dock-item {
    border: 1px solid #000;
}

.high-contrast .menu-bar {
    border-bottom: 2px solid #000;
}

/* Accessibility */
.accessibility-toggle {
    animation: pulse 2s infinite;
}

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

/* Window Shadows */
.app-window {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Smooth Transitions */
.dock-item,
.menu-item,
.window-control,
.pref-sidebar-item,
.context-item {
    transition: all var(--transition-speed, 0.3s) ease;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .app-switcher-container {
        width: 90%;
        padding: 20px;
    }
    
    .app-switcher-list {
        gap: 10px;
    }
    
    .app-switcher-item {
        min-width: 60px;
        padding: 10px;
    }
    
    .dev-tools {
        width: 95%;
        height: 80%;
    }
    
    .dev-db-actions {
        flex-direction: column;
    }
}

/* Dark Theme Utilities */
.dark-theme .context-menu {
    background: rgba(44, 44, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .context-item {
    color: #f5f5f7;
}

.dark-theme .context-divider {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .app-switcher-container {
    background: rgba(44, 44, 46, 0.95);
    color: #f5f5f7;
}

.dark-theme .app-switcher-container h3 {
    color: #f5f5f7;
}

.dark-theme .app-switcher-item {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .app-switcher-hint {
    color: #8e8e93;
}

.dark-theme .dev-tools {
    background: #2c2c2e;
    color: #f5f5f7;
}

.dark-theme .dev-tools-tabs {
    background: #3a3a3c;
    border-bottom-color: #48484a;
}

.dark-theme .dev-tab {
    border-right-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .dev-tab:hover {
    background: #48484a;
}

.dark-theme .dev-tab.active {
    background: #2c2c2e;
}

.dark-theme #devDatabaseView {
    background: #1d1d1f;
    color: #f5f5f7;
}

.dark-theme .dev-system-info h4,
.dark-theme .dev-performance-info h4 {
    color: #f5f5f7;
}

.dark-theme .dev-system-info p,
.dark-theme .dev-performance-info p {
    color: #e5e5e7;
}

.dark-theme .drag-over::after {
    background: rgba(10, 132, 255, 0.9);
}

/* ========== MENU BAR ENHANCEMENTS ========== */
.menu-bar {
    height: 25px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 0.9rem;
    color: #424245;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10000;
    user-select: none;
}

/* Apple Menu */
.apple-menu {
    font-size: 1.1rem;
    margin-right: 25px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    padding: 2px 8px;
    border-radius: 3px;
}

.apple-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

.apple-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.apple-menu:hover .apple-dropdown {
    display: block;
}

/* App Menus */
.menu-items {
    flex: 1;
    display: flex;
    gap: 0;
}

.app-menu {
    position: relative;
    padding: 2px 10px;
    border-radius: 3px;
    cursor: pointer;
}

.app-menu:hover {
    background: rgba(0, 0, 0, 0.05);
}

.app-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 220px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 10001;
    animation: fadeIn 0.2s ease;
}

.app-menu:hover .dropdown {
    display: block;
}

/* Dropdown Items */
.dropdown-item {
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
    position: relative;
}

.dropdown-item:hover {
    background: #007aff;
    color: white;
}

.dropdown-item.disabled {
    color: #c7c7cc;
    cursor: default;
}

.dropdown-item.disabled:hover {
    background: transparent;
    color: #c7c7cc;
}

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

/* Shortcuts */
.shortcut {
    color: #86868b;
    font-size: 0.8rem;
    margin-left: 20px;
}

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

/* Arrows for submenus */
.arrow {
    margin-left: 10px;
    color: #86868b;
    font-size: 0.8rem;
}

/* Submenus */
.submenu {
    position: absolute;
    left: 100%;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    border-radius: 8px;
    padding: 8px 0;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: none;
}

.dropdown-item:hover .submenu {
    display: block;
}

.submenu-item {
    padding: 5px 20px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}

.submenu-item:hover {
    background: #007aff;
    color: white;
}

.submenu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 5px 0;
}

/* Checkmarks */
.check {
    margin-right: 8px;
    color: #007aff;
}

/* Right Side Status */
.menu-right {
    display: flex;
    gap: 20px;
}

.status-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.status-icons i, #desktopTime {
    opacity: 0.9;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background 0.2s;
    font-size: 0.85rem;
}

.status-icons i:hover, #desktopTime:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Menu Item Active State */
.menu-item.active {
    font-weight: 500;
}

/* Dark Theme Support */
.dark-theme .menu-bar {
    background: rgba(44, 44, 46, 0.85);
    color: #f5f5f7;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .apple-menu:hover,
.dark-theme .app-menu:hover,
.dark-theme .status-icons i:hover,
.dark-theme #desktopTime:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .apple-dropdown,
.dark-theme .app-menu .dropdown,
.dark-theme .submenu {
    background: rgba(44, 44, 46, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f5f5f7;
}

.dark-theme .dropdown-divider,
.dark-theme .submenu-divider {
    background: rgba(255, 255, 255, 0.1);
}

.dark-theme .shortcut {
    color: #8e8e93;
}

.dark-theme .dropdown-item:hover .shortcut {
    color: rgba(255, 255, 255, 0.8);
}

.dark-theme .check {
    color: #0a84ff;
}

.dark-theme .dropdown-item.disabled {
    color: #636366;
}

/* Menu Bar for Different Apps */
.menu-items .app-menu {
    display: none;
}

.menu-items .app-menu.active {
    display: block;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-items {
        gap: 15px;
    }
    
    .app-menu .dropdown {
        min-width: 180px;
    }
    
    .shortcut {
        display: none; /* Hide shortcuts on smaller screens */
    }
}

@media (max-width: 768px) {
    .menu-items {
        display: none; /* Hide menu items on mobile */
    }
    
    .apple-menu {
        margin-right: 0;
    }
    
    .menu-right {
        gap: 10px;
    }
    
    .status-icons {
        gap: 10px;
    }
} 

/* ========== NEW WINDOW STYLES ========== */

/* About This Mac */
.about-content {
    text-align: center;
    padding: 30px;
}

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

.macos-logo {
    font-size: 4rem;
    color: #007aff;
    margin-bottom: 10px;
}

.about-header h1 {
    font-size: 2rem;
    color: #1d1d1f;
    margin-bottom: 5px;
}

.about-info {
    text-align: left;
    margin-bottom: 30px;
    background: #f5f5f7;
    padding: 20px;
    border-radius: 10px;
}

.about-info p {
    margin: 8px 0;
    color: #424245;
}

.about-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.about-btn {
    padding: 8px 16px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.about-btn:hover {
    opacity: 0.9;
}

.about-footer {
    border-top: 1px solid #e5e5e7;
    padding-top: 15px;
    color: #86868b;
    font-size: 0.9rem;
}

/* Force Quit */
.force-quit-list {
    margin: 20px 0;
}

.force-quit-app {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #f5f5f7;
    border-radius: 6px;
    margin-bottom: 10px;
}

.force-quit-btn {
    padding: 5px 10px;
    background: #ff3b30;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.force-quit-btn:hover {
    opacity: 0.9;
}

/* Logout Dialog */
.logout-icon {
    font-size: 3rem;
    color: #007aff;
    margin-bottom: 20px;
}

.logout-options {
    margin: 15px 0;
    text-align: left;
    font-size: 0.9rem;
}

.logout-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Get Info Window */
.info-content {
    padding: 20px;
}

.info-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e7;
}

.info-icon {
    width: 60px;
    height: 60px;
    background: #007aff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.info-name h3 {
    margin: 0 0 5px 0;
    color: #1d1d1f;
}

.info-name p {
    margin: 0;
    color: #86868b;
}

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

.info-section h4 {
    margin: 0 0 10px 0;
    color: #1d1d1f;
    font-size: 0.9rem;
}

.info-section p {
    margin: 5px 0;
    color: #424245;
    font-size: 0.9rem;
}

/* Emoji Picker */
.emoji-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.emoji-search {
    padding: 10px;
    border-bottom: 1px solid #e5e5e7;
}

.emoji-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #c7c7cc;
    border-radius: 6px;
    font-size: 0.9rem;
}

.emoji-categories {
    display: flex;
    padding: 10px;
    border-bottom: 1px solid #e5e5e7;
    gap: 10px;
}

.emoji-cat {
    padding: 5px 10px;
    background: #f5f5f7;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.emoji-cat.active {
    background: #007aff;
    color: white;
}

.emoji-grid {
    flex: 1;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    overflow-y: auto;
}

.emoji-item {
    font-size: 1.5rem;
    cursor: pointer;
    text-align: center;
    padding: 5px;
    border-radius: 4px;
}

.emoji-item:hover {
    background: #f5f5f7;
}

.emoji-preview {
    padding: 15px;
    border-top: 1px solid #e5e5e7;
    display: flex;
    align-items: center;
    gap: 15px;
}

#selectedEmoji {
    font-size: 2rem;
}

#emojiName {
    font-size: 0.9rem;
    color: #424245;
}

/* Keyboard Shortcuts */
.shortcuts-content {
    padding: 20px;
}

.shortcuts-content h3 {
    margin: 20px 0 10px 0;
    color: #1d1d1f;
    font-size: 1rem;
}

.shortcuts-content h3:first-child {
    margin-top: 0;
}

.shortcuts-list {
    background: #f5f5f7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

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

.shortcut-item:last-child {
    border-bottom: none;
}

.shortcut-keys {
    background: white;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #c7c7cc;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
}

.shortcut-desc {
    color: #424245;
    font-size: 0.9rem;
}

/* Dark Theme for New Windows */
.dark-theme .about-info {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .about-info p {
    color: #e5e5e7;
}

.dark-theme .about-footer {
    border-top-color: #3a3a3c;
    color: #8e8e93;
}

.dark-theme .force-quit-app {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .info-header {
    border-bottom-color: #3a3a3c;
}

.dark-theme .info-name h3 {
    color: #f5f5f7;
}

.dark-theme .info-section h4 {
    color: #f5f5f7;
}

.dark-theme .info-section p {
    color: #e5e5e7;
}

.dark-theme .emoji-search input {
    background: #3a3a3c;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .emoji-cat {
    background: #3a3a3c;
    color: #f5f5f7;
}

.dark-theme .emoji-cat.active {
    background: #0a84ff;
}

.dark-theme .emoji-item:hover {
    background: #3a3a3c;
}

.dark-theme #emojiName {
    color: #e5e5e7;
}

.dark-theme .shortcuts-list {
    background: #3a3a3c;
}

.dark-theme .shortcut-item {
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark-theme .shortcut-keys {
    background: #2c2c2e;
    border-color: #48484a;
    color: #f5f5f7;
}

.dark-theme .shortcut-desc {
    color: #e5e5e7;
}