/* macOS Desktop Environment */
.macos-desktop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4a90e2 100%);
    overflow: hidden;
}

/* Desktop Layout */
.desktop-content {
    display: flex;
    height: calc(100vh - 90px); /* Account for menu bar (30px) and dock space (60px) */
    padding-top: 30px; /* Space for menu bar */
    padding-bottom: 10px; /* Small space above dock */
}

.desktop-sidebar {
    width: 40%;
    max-width: 600px;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.desktop-windows {
    flex: 1;
    position: relative;
    padding: 20px;
}

/* macOS Menu Bar */
.macos-menubar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    padding: 0 15px;
    font-size: 13px;
    color: white;
}

.menubar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menubar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.apple-logo {
    font-size: 16px;
}

/* macOS Dock */
.macos-dock {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    gap: 26px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.dock-item {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 22px;
    position: relative;
    color: white;
}

.dock-item-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    max-width: 45px;
}

.dock-label {
    font-size: 10px;
    font-weight: 400;
    text-align: center;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.dock-item.active {
    background: rgba(255, 255, 255, 0.1) !important; /* Same as normal state, override hacker.css */
}

.dock-item.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Window Management */
.window-container {
    position: absolute;
    min-width: 400px;
    max-width: 90%;
    min-height: 300px;
    max-height: 80%;
    z-index: 100;
    transition: all 0.3s ease;
}

.window-container.minimized {
    transform: scale(0.1);
    opacity: 0;
    pointer-events: none;
}

.window-container.maximized {
    top: 3em !important;
    left: 3em !important;
    right: 3em !important;
    bottom: 3em !important;
    width: calc(100% - 6em) !important;
    height: calc(100% - 6em) !important;
    max-width: none;
    max-height: none;
}

.window-container.maximized .macos-window {
    max-width: none !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
}

.window-container.focused {
    z-index: 200;
}

/* Enhanced macOS Window */
.macos-window {
    width: 100%;
    height: 100%;
    background-color: #1e1e1e;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.macos-titlebar {
    height: 40px;
    background: linear-gradient(to bottom, #3c3c3c, #2a2a2a);
    border-bottom: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    padding: 0 16px;
    position: relative;
    cursor: move;
}

.macos-traffic-lights {
    display: flex;
    gap: 8px;
}

.macos-traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.macos-traffic-light:hover {
    transform: scale(1.1);
}

.macos-traffic-light.close {
    background: linear-gradient(to bottom, #ff6058, #ff453a);
}

.macos-traffic-light.minimize {
    background: linear-gradient(to bottom, #ffbd2e, #ff9500);
}

.macos-traffic-light.maximize {
    background: linear-gradient(to bottom, #28ca42, #30d158);
}

.macos-window-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.macos-content {
    flex: 1;
    background-color: #1e1e1e;
    overflow-y: auto;
    padding: 16px;
}

/* Custom scrollbar for macOS look */
.macos-content::-webkit-scrollbar {
    width: 8px;
}

.macos-content::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.macos-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.macos-content::-webkit-scrollbar-thumb:hover {
    background: #777;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .macos-desktop {
        display: none !important;
    }
    
    .mobile-view {
        display: block !important;
    }
    
    .desktop-view {
        display: none !important;
    }
    
    .desktop-hidden {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-view {
        display: none !important;
    }
    
    .desktop-view {
        display: block !important;
    }
}

/* Mobile Menu */
.mobile-navbar {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.mobile-burger {
    border: none;
    background: none;
    color: white;
    font-size: 24px;
    padding: 10px;
}

/* About section styling in desktop */
.about-content {
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    max-height: 1000px;
    overflow-y: auto;
}

.about-content h2 {
    color: white;
}

.about-content a {
    color: #64b5f6;
}

.about-content .terminal,
.about-content #typewriter {
    background: rgba(0, 0, 0, 0.8) !important;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #00ff00 !important;
    padding: 15px !important;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
}

.about-content .small-img {
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* News images in desktop mode - only in news list */
#news-content #news-list .card img {
    max-height: 10em !important;
    object-fit: contain;
}

/* iOS-style cards for desktop windows */
.macos-content .card {
    background: rgba(224, 221, 221, 0.1) !important;
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 10px 0 !important;
    color: white !important;
    font-size: 14px;
}

.macos-content .btn {
        background: rgba(31, 54, 81, 0.8)!important;
        color: white !important;
        border-radius: 15px;
        border: 1px solid rgba(183, 183, 183, 0.5) !important;
        padding: 6px 12px !important; /* Reduced from 8px 16px */
        font-size: 12px; /* Reduced from 14px */
    }

.macos-content .btn:hover {
        transform: scale(1.2);
    }

.macos-content .list-group-item {
    border: 0px solid rgba(255, 255, 255, 0.1) !important;
    margin: 8px 0 !important;
    color: white !important;
    background: transparent !important;
}

.macos-content .list-group {
    background: transparent !important;
}

/* Ensure text readability in desktop windows */
.macos-content h1, .macos-content h2, .macos-content h3, .macos-content h4, .macos-content h5, .macos-content h6 {
    color: white !important;
    margin-top: 15px !important;
    margin-bottom: 10px !important;
}

.macos-content p {
    color: rgba(255, 255, 255, 0.9) !important;
    line-height: 1.6;
}

.macos-content a {
    color: #4a90e2 !important;
}

.macos-content a:hover {
    color: #2a5298 !important;
}

/* Badge styling for desktop */
.macos-content .badge {
    background: rgba(31, 54, 81, 0.8) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.macos-content .badge:hover {
    background: rgba(42, 82, 152, 0.9) !important;
    color: white !important;
}

.macos-content .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}



