/* CORE OS */
body {
    overflow: hidden;
    user-select: none;
    font-family: 'Ubuntu', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* WALLPAPERS */
.bg-jammy {
    background: radial-gradient(circle at 50% 0%, #77216F 0%, #2C001E 100%);
}

.bg-focal {
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop') center/cover;
}

.bg-bionic {
    background: url('https://images.unsplash.com/photo-1501862700950-18382cd41497?q=80&w=1919&auto=format&fit=crop') center/cover;
}

/* SCROLLBAR */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #5e5e5e;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E95420;
}

/* LOCK SCREEN (GDM STYLE) */
.gdm-time {
    font-size: 5rem;
    font-weight: bold;
    letter-spacing: -1px;
    line-height: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gdm-date {
    font-size: 1.5rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.gdm-notification {
    background: rgba(0, 0, 0, 0.5);
    color: #e0e0e0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px;
    margin-top: 2rem;
    width: 320px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}



.gdm-input {
    background: #2d2d2d;
    border: 2px solid transparent;
    color: white;
    border-radius: 8px;
    padding: 10px 40px 10px 16px;
    /* Extra padding on right for icon */
    outline: none;
    transition: all 0.2s;
    font-size: 0.95rem;
    width: 100%;
    text-align: left;
}

.gdm-input-wrapper {
    position: relative;
    width: 280px;
    margin-bottom: 2rem;
}

.gdm-password-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.gdm-password-submit:hover {
    color: #fff;
}

.gdm-input:focus {
    border-color: #E95420;
    background: #333;
}

.gdm-input::placeholder {
    color: #888;
}

.gdm-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* WINDOWS */
.window {
    position: absolute;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    /* Slightly rounder for modern Ubuntu */
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s, transform 0.2s;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

#win-terminal {
    background-color: #300a24 !important;
    color: white;
}

/* MOBILE OVERRIDES (CRITICAL FIX) */
@media (max-width: 768px) {
    .window {
        top: 28px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100% - 28px) !important;
        border-radius: 0 !important;
        transform: none !important;
    }

    .window-header {
        cursor: default !important;
    }

    /* Disable drag cursor */
    .dock {
        display: none;
    }

    /* Hide dock */
    .desktop-grid {
        left: 10px !important;
    }

    #system-menu {
        width: 90% !important;
        right: 5% !important;
    }
}

.window-header {
    border-radius: 8px 8px 0 0;
}

.window.closed {
    transform: scale(0.95);
    opacity: 0;
    pointer-events: none;
    display: none;
}

/* Added display:none to prevent blocking clicks */
.window.minimized {
    transform: translateY(100vh) scale(0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease-in;
}

.window.maximized {
    top: 28px !important;
    left: 0 !important;
    width: 100% !important;
    height: calc(100% - 28px) !important;
    border-radius: 0;
    transform: none;
}

/* ACTIVE STATES */
.nav-btn.active {
    background-color: #e5e7eb;
    color: #E95420;
    border-left: 4px solid #E95420;
}

.dock-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.desktop-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.desktop-icon:active {
    background-color: rgba(233, 84, 32, 0.4);
}

/* UTILS */
.sys-menu-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
}

.sys-menu-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* APP GRID OVERLAY */
#app-grid {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 200;
    display: none;
    /* jQuery fadeToggle controls this */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

/* PROJECT MODAL (Fixed Overlay) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.sidebar-active {
    background-color: #E95420 !important;
    color: white !important;
}

.sidebar-active i {
    color: white !important;
}