:root {
    --bg-color: #181c21;
    --window-bg: #1E1E1E;
    --text-color: #fefeff; 
    --primary-accent: #64B5F6;
    --secondary-accent: #e5da89;
    --tertiary-accent: #ff00ff;
    --border-color: #303030;
    --header-bg: #750600;
}

* {
    box-sizing: border-box;
}

body {
    background-color: #000;
    color: #00E5FF; 
    font-family: 'VT323', monospace;
    font-size: 18px;
    overflow: hidden;
    margin: 0;
    padding: 0;
    cursor: auto;
}

a, button, .button-control, .nav-button, .desktop-shortcut-item, .taskbar-tab {
    cursor: pointer;
}

@keyframes link-glitch {
    0% { transform: translate(0, 0); text-shadow: 0 0 3px #00BFFF; } /* Glitch is blue */
    25% { transform: translate(2px, -2px); text-shadow: 2px 0 3px #ff00ff; }
    50% { transform: translate(-2px, 2px); text-shadow: -2px 0 3px #00BFFF; }
    75% { transform: translate(2px, 2px); text-shadow: 0 0 3px #00BFFF; }
    100% { transform: translate(0, 0); text-shadow: 0 0 3px #00BFFF; }
}

a:hover, .nav-button:hover {
    animation: link-glitch 0.2s infinite;
}

#desktop-icons {
    position: absolute;
    top: 50px;
    left: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}
.desktop-shortcut-item {
    width: 90px;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}
.desktop-shortcut-item span {
    display: block;
    margin-top: 5px;
}

#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35px;
    background-color: #c0c0c0;
    border-top: 2px solid #dfdfdf;
    z-index: 9999;
    display: flex;
    align-items: center;
    padding: 0 5px;
    gap: 5px;
}

.taskbar-tab {
    height: 28px;
    max-width: 250px;
    flex-shrink: 1;
    flex-grow: 0;
    padding: 0 10px;
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px #fff;
    display: flex;
    align-items: center;
    color: #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s, opacity 0.2s;
}

.taskbar-tab.active {
    background-color: #a0a0a0;
    border-color: #000 #dfdfdf #dfdfdf #000;
}

.taskbar-tab.minimized {
    font-weight: bold;
}

.taskbar-tab.dragging {
    opacity: 0.5;
}

.hidden {
    display: none !important;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.window-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 960px;
    height: 720px;
    max-width: 95vw;
    max-height: 95vh;
    border: 2px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    background-color: #c0c0c0;
    box-shadow: 2px 2px 0px #000, inset 1px 1px #fff;
    display: flex;
    flex-direction: column;
    z-index: 10;
    transition: all 0.2s ease-in-out;
    min-width: 250px;
    min-height: 200px;
}
.window-container.is-dragging, .window-container.is-resizing {
    transition: none;
}
.window-container.minimized {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}
.window-container.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 35px) !important;
    transform: none !important;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: none;
}

.resize-handle {
    position: absolute;
    background: transparent;
    z-index: 20;
}
.resize-handle.n { top: -3px; left: 8px; right: 8px; height: 6px; cursor: n-resize; }
.resize-handle.s { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: s-resize; }
.resize-handle.e { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: e-resize; }
.resize-handle.w { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: w-resize; }
.resize-handle.nw { top: -4px; left: -4px; width: 12px; height: 12px; cursor: nw-resize; }
.resize-handle.ne { top: -4px; right: -4px; width: 12px; height: 12px; cursor: ne-resize; }
.resize-handle.sw { bottom: -4px; left: -4px; width: 12px; height: 12px; cursor: sw-resize; }
.resize-handle.se { bottom: -4px; right: -4px; width: 12px; height: 12px; cursor: se-resize; }

.window-container.maximized .resize-handle {
    display: none;
}

.title-bar {
    background: linear-gradient(to right, #000080, #1e90ff);
    padding: 4px 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    cursor: move;
    flex-shrink: 0;
}
.title-bar-text {
    color: #fefeff;
    font-weight: bold;
    letter-spacing: 1px;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.title-bar-controls {
    display: flex;
    flex-shrink: 0;
}
.button-control {
    width: 18px;
    height: 18px;
    background-color: #c0c0c0;
    border: 1px solid;
    border-color: #dfdfdf #000 #000 #dfdfdf;
    box-shadow: inset 1px 1px #fff;
    margin-left: 3px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    color: #000;
}
.button-control:active {
    border-color: #000 #dfdfdf #dfdfdf #000;
}

.title-bar-status-left, .title-bar-status-right {
    display: none;
}

.window-content {
    flex-grow: 1;
    padding: 10px;
    border-top: 2px solid #000;
    background-color: #00001a;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    color: #fefeff; 
}

.window-content::-webkit-scrollbar { width: 16px; }
.window-content::-webkit-scrollbar-track { background: #c0c0c0; border-left: 2px solid #000; }
.window-content::-webkit-scrollbar-thumb { background: #c0c0c0; border: 2px solid; border-color: #dfdfdf #000 #000 #dfdfdf; box-shadow: inset 1px 1px #fff; }
.window-content::-webkit-scrollbar-thumb:hover { background: #a0a0a0; }


header {
    text-align: center;
    border-bottom: 2px solid #00E5FF;
    margin-bottom: 15px;
    padding-bottom: 10px;
}
.ascii-art {
    color: #00E5FF;
    text-shadow: 0 0 5px #00E5FF;
    font-size: 0.8em;
    margin: 0 auto;
    line-height: 1.1;
    font-weight: bold;
    white-space: pre;
}
nav {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.nav-button {
    background-color: transparent;
    border: 1px solid #00E5FF;
    color: #00E5FF;
    padding: 5px 15px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-shadow: 0 0 3px #00E5FF;
}
.nav-button:hover, .nav-button.active {
    background-color: #00E5FF;
    color: #000;
    box-shadow: 0 0 10px #00E5FF;
}

main {
    flex-grow: 1;
}
.content-box, #project-view-container {
    border: 1px dashed #333;
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(0, 255, 0, 0.03);
    color: #fefeff; 
}
#project-view-container.hidden {
    display: none;
}

h2 {
    color: #FEEA00; 
    border-bottom: 1px solid #FEEA00; 
    padding-bottom: 5px;
    margin-top: 0;
}
h3 {
    color: #00BFFF;
    margin-top: 20px;
    margin-bottom: 5px;
}
p, li { line-height: 1.6; color: #fefeff; } 
p.comment {
    color: #888;
    font-style: italic;
    font-size: 0.9em;
}
.decorative-gif {
    display: block;
    margin: 20px auto;
    width: 120px;
    height: 120px;
    background-color: #00001a;
    border: 2px solid #00BFFF;
    border-radius: 50%;
    object-fit: scale-down;
    filter: drop-shadow(0 0 10px #00BFFF);
}
ul { list-style-type: ':: '; padding-left: 20px; color: #fefeff; } 
a { color: #ede08e; text-decoration: none; transition: color 0.2s ease, text-shadow 0.2s ease; }

.back-button {
    display: inline-block;
    border: 1px solid #00E5FF;
    color: #00E5FF;
    padding: 5px 15px;
    margin-bottom: 20px;
    text-shadow: 0 0 3px #00E5FF;
}
.back-button:hover {
    background-color: #00E5FF;
    color: #000;
    animation: none;
}
.project-image {
    display: block;
    max-width: 50%;
    margin: 20px auto;
    border: 2px solid #00BFFF;
    box-shadow: 0 0 15px #00BFFF;
}

footer { border-top: 2px solid; border-color: #000 #dfdfdf; margin-top: auto; color: #fefeff; } /* Footer text is white */
.status-bar { display: flex; flex-wrap: wrap; justify-content: space-between; padding: 3px 5px; font-size: 14px; color: #00E5FF; } /* Status bar text is green */
.status-field { border: 1px inset #888; padding: 0 10px; color: #fefeff; } /* Status field text is white */
.status-field.right { display: flex; align-items: center; }
.status-field img { vertical-align: middle; }

#visitor-counter-wrapper {
    display: inline-block;
    transform: scale(0.8);
    transform-origin: left center;
    vertical-align: middle;
    margin-left: 4px;
}

.glitch {
    position: relative;
    color: #FEEA00; 
    z-index: 2;
}
.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}
.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #FF3B30; 
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00BFFF, 2px 2px #FF3B30; 
    animation: glitch-anim-2 2s infinite linear alternate-reverse;
}
@keyframes glitch-anim-1 {
    0%, 100% { clip-path: inset(30% 0 60% 0); }
    25% { clip-path: inset(10% 0 85% 0); }
    50% { clip-path: inset(70% 0 5% 0); }
    75% { clip-path: inset(40% 0 40% 0); }
}
@keyframes glitch-anim-2 {
    0%, 100% { clip-path: inset(80% 0 10% 0); }
    25% { clip-path: inset(2% 0 50% 0); }
    50% { clip-path: inset(33% 0 33% 0); }
    75% { clip-path: inset(90% 0 5% 0); }
}

/******************************************/
/* --- MOBILE SMARTPHONE STYLES --- */
/******************************************/
@media only screen and (max-width: 800px) {

    :root {
        --bg-color: #c0c0c0;
        --window-bg: #00001a;
        --text-color: #fefeff;
        --header-bg: #000080;
        --border-color: #303030;
    }

    #desktop-icons, #taskbar, body > .window-container > footer {
        display: none !important;
    }

    body { overflow: hidden; }

    .window-container {
        position: fixed !important; top: 0 !important; left: 0 !important;
        width: 100% !important; height: 100% !important;
        transform: none !important; max-width: none !important; max-height: none !important;
        border: 2px solid;
        border-color: #fff #555 #555 #fff;
        border-radius: 0;
        background: var(--bg-color);
        box-shadow: none !important;
        padding: 10px;
        overflow: hidden;
    }

    .title-bar {
        height: 25px;
        padding: 0 10px;
        cursor: default;
        color: #fff;
        z-index: 20;
        flex-shrink: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--header-bg);
    }
    .title-bar-text, .title-bar-controls { display: none; }

    .title-bar-status-left {
        display: block;
        font-size: 14px;
        text-align: left;
    }

    .title-bar-status-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        font-size: 14px;
        font-weight: normal;
        color: #fff;
    }

    .status-icon-group { display: flex; align-items: center; gap: 4px; }
    .signal-bars { display: flex; align-items: flex-end; gap: 1.5px; height: 12px; }
    .signal-bar { width: 3px; background-color: #888; transition: all 0.3s ease; }
    .signal-bar.active { background-color: #fff; }
    .signal-bar.bar-1 { height: 25%; }
    .signal-bar.bar-2 { height: 40%; }
    .signal-bar.bar-3 { height: 60%; }
    .signal-bar.bar-4 { height: 80%; }
    .signal-bar.bar-5 { height: 100%; }

    .window-content {
        padding: 10px; padding-bottom: 50px;
        border: 2px inset #888;
        border-radius: 0;
        background-color: var(--window-bg);
        height: 100%;
        position: relative;
        color: var(--text-color);
    }
    
    .window-content::-webkit-scrollbar { display: none; }
    .window-content { scrollbar-width: none; }

    #matrix-canvas { display: block; position: absolute; z-index: -1; }

    #home-screen-container .window-content {
        background: transparent;
        border: none;
        padding: 0;
    }

    header nav {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 5px;
        margin: -10px -10px 10px -10px;
        padding: 5px;
        background-color: rgba(0,0,0,0.2);
        border-bottom: 1px solid var(--border-color);
    }
    header nav .nav-button {
        padding: 4px 8px;
        font-size: 16px;
        flex-grow: 1;
        text-align: center;
        white-space: nowrap;
    }

    .ascii-art {
        color: #00E5FF;
        text-shadow: 0 0 5px #00E5FF;
    }
    
    .content-box, #project-view-container {
        border-color: var(--border-color);
        background: rgba(0, 255, 0, 0.03);
    }

    a, #mobile-system-nav button, .mobile-app, .mobile-app-link { cursor: pointer; }
    
    a:hover, .nav-button:hover, #enable-notifications-btn:hover, .back-button:hover {
        animation: none;
    }

    a:active, .nav-button:active, #enable-notifications-btn:active, .back-button:active, .mobile-app:active, .mobile-app-link:active {
        animation: link-glitch 0.2s infinite;
    }

    #mobile-system-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 50px;
        background: #c0c0c0;
        z-index: 1000;
        align-items: center;
        justify-content: space-around;
        padding: 5px;
        gap: 5px;
        border-top: 2px solid #fff;
    }
    .sys-nav-btn {
        background: #c0c0c0;
        border: 2px outset #dfdfdf;
        padding: 5px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #000;
        flex-grow: 1;
        height: 100%;
        border-radius: 5px;
    }
    .sys-nav-btn:active {
        border-style: inset;
        animation: link-glitch 0.2s infinite;
    }
    
    .sys-nav-btn svg {
        fill: #000;
        width: 20px;
        height: 20px;
    }

    .sys-nav-label {
        font-size: 12px;
        margin-top: 2px;
        display: block;
    }

    #home-screen-scroller {
        display: flex;
        overflow-x: auto;
        width: 100%;
        height: 100%;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    #home-screen-scroller::-webkit-scrollbar { display: none; }
    #home-screen-scroller { scrollbar-width: none; }

    .home-screen-page {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;
        scroll-snap-align: start;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, 1fr);
        place-items: center;
        padding: 20px 10px;
        gap: 10px;
    }

    .mobile-app {
        width: 90px;
        text-align: center;
        color: #fff;
        text-shadow: 1px 1px 2px #000;
    }
    .mobile-app span {
        display: block;
        margin-top: 5px;
        font-size: 16px;
    }

    .mobile-menu-overlay, #mobile-app-list-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); z-index: 1500;
        display: flex; align-items: center; justify-content: center;
        color: var(--text-color);
    }
    .mobile-menu-content {
        display: flex; flex-direction: column; gap: 15px; width: 80%;
        max-width: 300px; padding: 20px; border: 1px solid var(--primary-accent); background: var(--window-bg); border-radius: 8px;
    }
    .mobile-menu-content h3 {
        margin: 0 0 10px 0; text-align: center; border-bottom: 1px solid var(--border-color); padding-bottom: 10px;
        color: #00E5FF;
    }
    .mobile-menu-content .nav-button { width: 100%; text-align: center; color: #00E5FF; border-color: #00E5FF; }
    .mobile-menu-content .nav-button.active { color: #000; }
    .mobile-app-link {
        color: #00E5FF;
        border: 1px solid var(--border-color); padding: 10px; text-align: center;
        transition: all 0.2s ease; border-radius: 4px;
    }
    .mobile-app-link:hover {
        background: #00BFFF;
        color: #000;
    }
}

.live-now-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #d80e03;
    color: #fff;
    padding: 0 12px;
    height: 28px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s ease;
}

.live-now-button:hover {
    background-color: #ff3b30;
    opacity: 1;
}

.live-dot {
    width: 10px;
    height: 10px;
    background-color: #fff;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

#taskbar .live-now-button {
    margin-left: auto;
    margin-right: 10px;
}

.title-bar-status-right .live-now-button {
    height: auto;
    padding: 2px 6px;
    font-size: 14px;
}
.title-bar-status-right .live-now-button .live-dot {
    width: 8px;
    height: 8px;
}

.link-list li {
    list-style: none;
    display: flex;
    align-items: center;
    color: #fefeff; 
}

.live-indicator {
    display: none;
    margin-right: 10px;
    vertical-align: middle;
}

.live-indicator::before {
    content: '●';
    color: #d80e03;
    font-size: 1.2em;
    animation: pulse-red 1.5s infinite;
    display: inline-block;
}

.live-indicator.is-live {
    display: inline-block;
}

@keyframes pulse-red {
    0% { transform: scale(0.9); text-shadow: 0 0 0 rgba(216, 14, 3, 0.7); }
    70% { transform: scale(1); text-shadow: 0 0 10px rgba(216, 14, 3, 0); }
    100% { transform: scale(0.9); text-shadow: 0 0 0 rgba(216, 14, 3, 0); }
}

.notification-controls {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #fefeff; 
}

#enable-notifications-btn {
    background-color: transparent;
    color: #00E5FF;
    border: 1px solid #00E5FF;
    text-shadow: 0 0 3px #00E5FF;
    padding: 8px 20px;
    font-size: 1em;
    font-family: 'VT323', monospace;
    border-radius: 4px;
    transition: all 0.2s ease;
}

#enable-notifications-btn:hover {
    background-color: #00E5FF;
    color: #000;
    opacity: 1;
}

#enable-notifications-btn:disabled {
    background-color: var(--border-color);
    border-color: var(--border-color);
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
    text-shadow: none;
}

#notification-status-msg {
    margin-top: 10px;
    font-size: 0.9em;
    min-height: 1.2em;
}