/* 
    ForensicOS Theme 
    Dark Mode: "Incident Response / Cyber" (Cyan, Dark Slate, Neon)
    Light Mode: "Lab Report" (White, Black, Stark borders)
*/

:root {
    /* Default Dark Theme */
    --bg-color: #0f172a;
    /* Slate 900 */
    --window-bg: #1e293b;
    /* Slate 800 */
    --text-color: #e2e8f0;
    /* Slate 200 */
    --accent-color: #06b6d4;
    /* Cyan 500 */
    --accent-dim: rgba(6, 182, 212, 0.2);
    --border-color: #334155;
    --header-bg: #334155;
    --taskbar-bg: rgba(15, 23, 42, 0.9);

    --font-mono: 'Share Tech Mono', monospace;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    /* Light Theme (Report Mode) */
    --bg-color: #f1f5f9;
    /* Slate 100 */
    --window-bg: #ffffff;
    --text-color: #0f172a;
    --accent-color: #2563eb;
    /* Blue 600 */
    --accent-dim: rgba(37, 99, 235, 0.1);
    --border-color: #cbd5e1;
    --header-bg: #e2e8f0;
    --taskbar-bg: #cbd5e1;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    height: 100vh;
    overflow: hidden;
    /* Prevent body scroll, windows scroll internally */
    transition: background-color 0.3s, color 0.3s;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Grid pattern */
}

/* BOOT SCREEN */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    color: #0f0;
    font-family: var(--font-mono);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.boot-log p {
    margin: 10px 0;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* LIVE WALLPAPER */
#wallpaper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Behind desktop */
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    /* Subtle gradient base */
}

#canvas-matrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    /* Very subtle texture */
}

.user-photo-overlay {
    position: absolute;
    bottom: 0;
    right: 2%;
    /* Pull back from the edge slightly */
    height: 100%;
    width: 45%;
    /* Restrict width so it doesn't cross to the left side */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* Center image within this right-side container */
    opacity: 1;
    z-index: 1;
    pointer-events: none;
}

.bg-photo {
    height: auto;
    max-height: 85vh;
    /* Reduce height so it's not overwhelming */
    max-width: 100%;
    object-fit: contain;
    /* Professional Fade: Soft blend on left and bottom */
    mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 20%, black 100%);
    filter: grayscale(20%) contrast(1.1);
}

/* HOLOGRAPHIC HUD */
.user-hud {
    position: absolute;
    bottom: 50%;
    /* Center-ish vertically relative to photo */
    left: -20px;
    /* Float to the left of the image */
    text-align: right;
    color: var(--accent-color);
    font-family: var(--font-mono);
    z-index: 2;
    transform: translateY(50%);
    display: flex;
    flex-direction: row;
    /* Line + Content */
    align-items: center;
    gap: 15px;
}

.hud-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hud-line {
    width: 2px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--accent-color), transparent);
}

.user-hud h3 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-dim);
}

.hud-row {
    font-size: 0.8rem;
    opacity: 0.8;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.hud-row span:first-child {
    font-weight: bold;
    opacity: 0.6;
}

.hud-graph {
    display: flex;
    gap: 3px;
    height: 30px;
    justify-content: flex-end;
    margin-top: 5px;
    align-items: flex-end;
}

.hud-graph .bar {
    width: 4px;
    background: var(--accent-color);
    animation: audiopulse 1.5s infinite ease-in-out alternate;
}

.hud-graph .bar:nth-child(2) {
    animation-delay: 0.2s;
}

.hud-graph .bar:nth-child(3) {
    animation-delay: 0.4s;
}

.hud-graph .bar:nth-child(4) {
    animation-delay: 0.1s;
}

@keyframes audiopulse {
    0% {
        height: 20%;
        opacity: 0.5;
    }

    100% {
        height: 100%;
        opacity: 1;
    }
}

.blink-smooth {
    animation: smoothblink 2s infinite;
}

@keyframes smoothblink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Hide HUD in light mode or style differently */
[data-theme="light"] .user-hud {
    color: var(--text-color);
}

[data-theme="light"] .hud-line {
    background: #000;
}

[data-theme="light"] #wallpaper {
    background: #f1f5f9;
}

[data-theme="light"] #canvas-matrix {
    opacity: 0.05;
}

[data-theme="light"] .bg-photo {
    filter: grayscale(100%) opacity(0.8);
    /* B&W for print look */
}

/* DESKTOP */
#desktop {
    height: calc(100vh - 40px);
    position: relative;
    padding: 40px;
    /* More breathing room */
    z-index: 2;
    /* Above wallpaper and photo */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center icons vertically */
}

/* ICONS */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 100px);
    /* Strict grid */
    grid-auto-flow: row;
    gap: 30px;
    height: auto;
    width: 400px;
    /* Limit width to keep them on the left */
    background: rgba(15, 23, 42, 0.6);
    /* Glass panel behind icons */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    color: var(--text-color);
    transition: background 0.2s;
}

.desktop-icon:hover {
    background-color: var(--accent-dim);
    border: 1px dotted var(--accent-color);
}

.desktop-icon i {
    font-size: 2.5rem;
    margin-bottom: 8px;
    color: var(--accent-color);
}

.desktop-icon span {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* WINDOWS */
.window {
    position: absolute;
    background-color: var(--window-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    min-height: 200px;
    width: 500px;
    display: none;
    /* Hidden by default */
    flex-direction: column;
    resize: both;
    overflow: hidden;
}

.window.active {
    display: flex;
    z-index: 100;
}

.window-header {
    background-color: var(--header-bg);
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    /* For dragging later if implemented */
    border-bottom: 1px solid var(--border-color);
}

.window-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    display: flex;
    gap: 8px;
    align-items: center;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.close {
    background: #ef4444;
    color: white;
}

.minimize {
    background: #eab308;
    color: black;
}

.maximize {
    background: #22c55e;
    color: black;
}

.window-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

/* TASKBAR */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: var(--taskbar-bg);
    backdrop-filter: blur(5px);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 10px;
    z-index: 1000;
}

.start-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    background: var(--accent-color);
    color: var(--bg-color);
    font-family: var(--font-mono);
    font-weight: bold;
    border-radius: 2px;
    cursor: pointer;
    margin-right: 15px;
}

.open-apps {
    flex-grow: 1;
    display: flex;
    gap: 5px;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    cursor: pointer;
    color: var(--text-color);
}

#clock {
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

/* UTILS */
h1,
h2,
h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

hr {
    border-color: var(--border-color);
    margin: 15px 0;
}

/* --- COMPONENT STYLES --- */

/* 1. RESEARCH (File Browser) */
.toolbar {
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 10px;
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: var(--accent-color);
}

.file-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.file-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}

.file-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.file-details h4 {
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--accent-color);
}

.file-details p {
    font-size: 0.8rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.sys-link {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
    text-decoration: none;
}

.sys-link:hover {
    text-decoration: underline;
}


/* 2. GALLERY (Masonryish) */
.masonry-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gallery-item {
    flex: 1 1 300px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    padding: 5px;
}

.placeholder-img {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.2);
    margin-bottom: 5px;
}

.gallery-item img,
.gallery-img {
    width: 100%;
    height: auto;
    max-height: 200px;
    /* Constrain height to keep grid uniform */
    object-fit: cover;
    display: block;
    border-radius: 2px;
    margin-bottom: 5px;
    border: 1px solid var(--border-color);
}

.caption {
    font-size: 0.85rem;
    padding: 5px;
    margin: 0;
    font-family: var(--font-mono);
}


/* 3. EXPERIENCE (System Logs) */
.log-container {
    border-left: 2px dashed var(--border-color);
    padding-left: 20px;
    margin-left: 10px;
}

.log-entry {
    margin-bottom: 25px;
    position: relative;
}

.log-entry::before {
    content: '';
    position: absolute;
    left: -26px;
    top: 5px;
    width: 10px;
    height: 10px;
    background: var(--accent-color);
    border-radius: 50%;
}

.timestamp {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

.log-title {
    margin-bottom: 2px;
    color: var(--text-color);
}

.role-subtitle {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-color);
    opacity: 0.8;
    margin-bottom: 8px;
    font-style: italic;
}

.log-details {
    list-style: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    opacity: 0.8;
    padding-left: 10px;
}

.log-details li {
    margin-bottom: 3px;
}


/* 4. SKILLS (Terminal) */
.terminal-content {
    font-family: 'Share Tech Mono', monospace;
    background-color: #0c0c0c;
    /* Force black even in light mode for terminal */
    color: #00ff00;
    /* Classic Terminal Green */
    padding: 15px;
}

.term-blue {
    color: #3b82f6;
    display: block;
    margin-bottom: 5px;
}

.term-red {
    color: #ef4444;
    display: block;
    margin-bottom: 5px;
}

.term-green {
    color: #22c55e;
    display: block;
    margin-bottom: 5px;
}

.term-yellow {
    color: #eab308;
    display: block;
    margin-bottom: 5px;
}

.term-purple {
    color: #a855f7;
    display: block;
    margin-bottom: 5px;
}

.term-cyan {
    color: #06b6d4;
    display: block;
    margin-bottom: 5px;
}

.term-green {
    color: #22c55e;
    display: block;
    margin-bottom: 5px;
}

.skill-bar {
    margin-bottom: 2px;
}

/* Override some window styles just for this ID via CSS if needed, 
   but inline styles in HTML handled the black bg */


/* 5. CONTACT (Form) */
.sys-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.sys-form label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.sys-form input,
.sys-form textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    padding: 8px;
    color: var(--text-color);
    font-family: var(--font-mono);
}

.sys-submit {
    background: var(--accent-color);
    color: var(--bg-color);
    border: none;
    padding: 10px;
    font-family: var(--font-mono);
    font-weight: bold;
    cursor: pointer;
    margin-top: 5px;
}

.sys-submit:hover {
    opacity: 0.9;
}

.contact-links {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.sys-btn {
    background: var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.sys-btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
}

.status-ok {
    color: var(--accent-color);
    font-weight: bold;
}

/* START MENU */
#start-menu {
    position: fixed;
    bottom: 50px;
    left: 10px;
    width: 350px;
    height: 400px;
    background: var(--window-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    transform: translateY(110%);
    /* Hidden below screen */
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#start-menu.active {
    transform: translateY(0);
}

.menu-sidebar {
    width: 60px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-right: 1px solid var(--border-color);
}

.user-mini-profile {
    font-size: 1.5rem;
    color: var(--accent-color);
    text-align: center;
}

.user-mini-profile span {
    font-size: 0.6rem;
    display: block;
    margin-top: 5px;
    color: var(--text-color);
}

.power-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pwr-btn {
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.2s;
}

.pwr-btn:hover {
    color: #ef4444;
}

.menu-content {
    flex-grow: 1;
    padding: 15px;
}

.menu-header {
    font-family: var(--font-mono);
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 5px;
    margin-bottom: 15px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.menu-item i {
    width: 20px;
    text-align: center;
    color: var(--accent-color);
}

.menu-item span {
    font-size: 0.9rem;
}

/* Terminal Skills Polish */
.skill-row {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    max-width: 400px;
}

/* LOCK SCREEN */
#lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    /* Dark blur overlay */
    backdrop-filter: blur(15px);
    z-index: 5000;
    /* Above everything */
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
    color: var(--text-color);
}

#lock-screen.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.login-box {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.login-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-color);
    padding: 3px;
    background: var(--bg-color);
}

.login-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.status-locked {
    font-family: var(--font-mono);
    color: #ef4444;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.fingerprint-btn {
    font-size: 3.5rem;
    color: var(--accent-color);
    cursor: pointer;
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.3s;
    overflow: hidden;
    margin: 10px 0;
}

.fingerprint-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

/* Scanning Animation */
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #0f0;
    box-shadow: 0 0 10px #0f0;
    opacity: 0;
}

.fingerprint-btn.scanning .scan-line {
    opacity: 1;
    animation: scanMove 1s ease-in-out;
}

.fingerprint-btn.scanning i {
    color: #0f0;
    /* Turn green on scan */
}

@keyframes scanMove {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* EVIDENCE VIEWER (Lightbox) */
#evidence-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.95);
    z-index: 6000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#evidence-viewer.active {
    display: flex;
    opacity: 1;
}

.viewer-content {
    width: 90%;
    max-width: 1000px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
}

.viewer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 10px;
    font-family: var(--font-mono);
    color: var(--accent-color);
}

.close-viewer {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.close-viewer:hover {
    transform: rotate(90deg) scale(1.1);
    color: #ef4444;
}

.viewer-body {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    height: 70vh;
}

.img-container {
    flex-grow: 1;
    height: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

#ev-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.1);
}

#ev-desc {
    font-family: var(--font-mono);
    text-align: center;
    opacity: 0.8;
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--accent-color);
    z-index: 1;
    /* Behind the image (which is z-index 2) */
    display: none;
}

/* MOBILE RESPONSIVENESS */
/* MOBILE RESPONSIVENESS */
/* MOBILE RESPONSIVENESS */
/* MOBILE RESPONSIVENESS */
/* MOBILE RESPONSIVENESS */
@media (max-width: 768px) {

    /* --- MOBILE HEADER STRIP --- */

    /* RESET: Disable the 'bar' background we tried before */
    .user-photo-overlay {
        position: fixed;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        background: none;
        border: none;
        backdrop-filter: none;
        pointer-events: none;
        z-index: 1000;
    }

    /* 1. LAYOUT: HUD (Bottom Left - With Effects) */
    .user-hud {
        position: absolute !important;
        bottom: 80px !important;
        /* Above Start Button */
        left: 20px !important;
        /* Left Aligned */
        right: auto !important;
        top: auto !important;

        transform: scale(0.8) !important;
        /* Slightly larger than before */
        transform-origin: bottom left !important;

        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        /* Left align text */

        background: rgba(13, 17, 23, 0.6);
        /* Subtle backing for readability */
        padding: 10px;
        border-radius: 8px;
        border: 1px solid rgba(var(--accent-rgb), 0.2);
        backdrop-filter: blur(4px);
    }

    /* Restore Holographic Effects */
    .hud-line {
        height: 40px;
        display: block !important;
        position: absolute;
        left: -5px;
        top: 10px;
        border-left: 2px solid var(--accent-color);
    }

    .hud-graph {
        display: flex !important;
        margin-top: 5px;
        opacity: 0.8;
    }

    .hud-content h3 {
        font-size: 1.5rem;
        margin: 0;
        letter-spacing: 1px;
        color: #fff;
        text-shadow: 0 0 5px var(--accent-color);
    }

    .hud-row {
        font-size: 0.8rem;
        opacity: 0.9;
        color: #fff;
    }

    /* 2. LAYOUT: PHOTO (Bottom Right - Large) */
    .bg-photo {
        display: block !important;
        position: fixed !important;
        bottom: -30px !important;
        right: -60px !important;
        /* Pushed to right corner */
        left: auto !important;
        top: auto !important;

        width: 90vw !important;
        /* Large as requested */
        max-width: 450px;
        height: auto !important;

        opacity: 0.25 !important;
        /* Faded watermark style */
        z-index: -1 !important;
        pointer-events: none;
        border: none !important;
        border-radius: 0 !important;
        transform: none !important;

        mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
        -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 80%);
    }

    .photo-glitch-effect {
        display: none;
    }

    /* --- CONTENT AREA --- */

    /* Icons: Move Up */
    .icon-grid {
        margin-top: 10px;
        padding: 15px;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
        position: relative;
        z-index: 10;
        /* Ensure bottom area is preserved for HUD/Photo */
        margin-bottom: 200px;
    }

    .desktop-icon {
        width: 75px;
        margin-bottom: 5px;
    }

    .desktop-icon span {
        font-size: 0.75rem;
        text-shadow: 0 2px 4px #000;
    }

    /* Start Menu: Fixed Bottom Left */
    /* Start Menu: MacOS Style Floating Dock */
    #start-menu {
        width: 90%;
        left: 5%;
        bottom: 80px;
        /* Floating above bar */

        display: none !important;
        /* Fix visibility bug: Nuclear option */
        opacity: 0;
        transform: translateY(20px) scale(0.95);

        /* MacOS Dock Style */
        border-radius: 16px;
        background: rgba(20, 20, 30, 0.85);
        /* Deep glass */
        backdrop-filter: blur(12px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    #start-menu.active {
        display: flex !important;
        opacity: 1;
        transform: translateY(0) scale(1);
        animation: dockPopUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    }

    @keyframes dockPopUp {
        0% {
            opacity: 0;
            transform: translateY(30px) scale(0.9);
        }

        100% {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    /* Windows */
    .window {
        width: 96% !important;
        height: 82vh !important;
        left: 2% !important;
        top: 20px !important;
        /* Higher up */
    }

    /* Utils */
    .masonry-gallery {
        grid-template-columns: 1fr;
    }

    #canvas-matrix {
        display: none;
    }

    .viewer-content {
        width: 95%;
        max-height: 90vh;
    }

    .viewer-body {
        flex-direction: column;
        height: 50vh;
    }

    .nav-btn {
        background: rgba(0, 0, 0, 0.5);
    }

    .nav-btn.prev {
        left: 5px;
    }

    /* --- LIGHT MODE MOBILE FIXES --- */
    [data-theme="light"] .user-hud {
        background: rgba(255, 255, 255, 0.7) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
    }

    [data-theme="light"] .user-hud h3,
    [data-theme="light"] .user-hud .hud-row {
        color: #0f172a !important;
        /* Dark text */
        text-shadow: none !important;
    }

    [data-theme="light"] .desktop-icon span {
        color: #0f172a !important;
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.8) !important;
        /* White glow for contrast */
        font-weight: 700;
    }

    [data-theme="light"] .bg-photo {
        opacity: 0.6 !important;
        /* Higher opacity for light mode */
        mix-blend-mode: multiply;
        /* Better blending on white */
        filter: contrast(1.2);
    }

    [data-theme="light"] #start-menu {
        background: rgba(255, 255, 255, 0.85) !important;
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
}