@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

:root {
    --font-pixel: 'Press Start 2P', sans-serif;
    --font-body: 'Arial', sans-serif;
    
    --color-bg: #1a1a1a;       /* background */
    --color-text: #e0e0e0;     /* text */
    --color-accent: #00ff7f;   /* "terminal green" */
    --color-border: #555;
    --color-border-inner: #000;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: var(--font-pixel);
    color: var(--color-accent);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { 
    font-size: 2.5rem; text-align: center; 
}

h2 { 
    font-size: 1.5rem; margin-top: 2rem; 
}

p { 
    margin-bottom: 1rem; 
}

a { 
    color: var(--color-accent); text-decoration: none; 
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    line-height: 1.6;
    
}

#site-wrapper {
    display: grid;
    grid-template-areas:
        "header"
        "nav"
        "main"
        "footer";
    grid-gap: 2rem;
    max-width: 900px; 
    margin: 0 auto;
    
    padding: 1rem;
}

.site-header { grid-area: header; }
.site-nav    { grid-area: nav; }
.site-content  { grid-area: main; }
.site-footer   { grid-area: footer; }

.site-nav ul {
    list-style: none;
    display: flex; 
    justify-content: center;
    gap: 0.5rem;
}

.site-nav a {
    font-family: var(--font-pixel);
    font-size: 0.9rem;
    text-decoration: none;
    padding: 0.75rem 1rem;
    background-color: var(--color-border);
    color: var(--color-text);
    border-radius: 0; 
    transition: background-color 0.1s step-end;
}

.site-nav a:hover,
.site-nav a.current {
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.whats-new {
    background-color: #222;
    padding: 1.5rem;
    
    border: 4px solid var(--color-border);
    box-shadow: inset 0 0 0 4px var(--color-border-inner),
                0 0 0 4px var(--color-accent);
}

.whats-new ul {
    list-style: none;
}

.whats-new .date {
    color: var(--color-accent);
    margin-right: 0.5rem;
}

.site-footer {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-border);
    margin-top: 2rem;
}

/* ======== NEW LOGIN SCREEN STYLES ======== */

/* ======== SHUTDOWN EFFECT ======== */
#shutdown-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000; /* Pitch black */
    z-index: 9999; /* On top of EVERYTHING */
    
    /* hidden by default */
    opacity: 0;
    pointer-events: none; /* let clicks pass through when hidden */
    
    /* Smooth fade out effect I hope */
    transition: opacity 1.5s ease-in-out;
}

body.shut-down #shutdown-screen {
    opacity: 1;
    pointer-events: all; 
}

.hidden {
    display: none !important;
}

/* The main login screen container */
#login-screen {
    min-height: 100vh;
    font-family: var(--font-body);
    
    /* windows XP blue background */
    background-color: #3d78d8;
    background-image: linear-gradient(to bottom, #2a5edc, #3d78d8);

    display: grid;
    grid-template-areas:
        "welcome users"
        "taskbar taskbar";
    /* make the user list wider than the welcome text */
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: 400px 80px; 
    padding: 2rem;
}

.welcome-area {
    grid-area: welcome;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    padding-right: 2rem;
    padding-bottom: 4rem;
}

.users-area {
    grid-area: users;
    display: flex;
    align-items: center;
    
    padding-left: 10rem;
    
    padding-top: 10rem; 
}

.taskbar-area {
    grid-area: taskbar;
    background: rgba(6, 32, 102, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
}


.welcome-area h3 {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    margin: 0;
}

.welcome-title {
    font-size: 3rem; /* placeholder */
    color: white;
    margin: 0;
}

#turn-off-button {
    display: none; 
}

.h3 {
    font-family: var(--font-body); 
    font-weight: bold;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    margin-bottom: 3rem;
}

.user-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; 
    width: 100%;
    max-width: 350px;
}

.user-profile-button {
    background: none;
    border: 3px solid transparent;
    cursor: pointer;
    
    display: flex;
    flex-direction: row; 
    align-items: center; 
    gap: 1rem; 
    
    width: 100%; 
    padding: 0.5rem;
    
    color: #fff;
    font-size: 1.25rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    text-align: left;
    
    border-radius: 4px;
    outline: none; 
}

.user-icon {
    width: 50px; 
    height: 50px; 
    border: 2px solid #fff; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    transition: transform 0.2s ease;
    
    flex-shrink: 0; 
}

.user-profile-button:hover,
.user-profile-button:focus {

    background: linear-gradient(to right, 
        rgba(6, 32, 102, 0.5),  
        rgba(6, 32, 102, 0.2),  
        transparent            
    );

    border-width: 2px;
    border-style: solid;

    border-image-source: linear-gradient(to right, 
        rgba(6, 32, 102, 0.9),  
        rgba(6, 32, 102, 0.3),  
        transparent
    );
    
    border-image-slice: 1;
    border-right-width: 0;
    
}

.user-profile-button:hover .user-icon,
.user-profile-button:focus .user-icon {
    border-color: rgba(6, 32, 102, 0.5);
}



/* ======== LOG OUT BUTTON STYLE ======== */
#logout-button {
    font-family: var(--font-pixel); /* pixel font */
    font-size: 0.8rem;
    color: var(--color-bg);
    background-color: var(--color-border);
    
    border: 2px solid var(--color-border);
    border-radius: 0; 
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    
    display: block; 
    margin: 1.5rem auto 0; 
    
    transition: all 0.1s step-end;
}

#logout-button:hover,
#logout-button:focus {
    background-color: var(--color-accent);
    color: var(--color-bg);
    box-shadow: 0 0 0 2px var(--color-accent);
}

/* ======== STYLING ======== */

:root {
    --font-xp: 'Trebuchet MS', 'Arial', sans-serif;
}
#login-screen {
    font-family: var(--font-xp); 
}
.welcome-area h3 {
    font-family: var(--font-xp);
    font-size: 1.3rem;
}


.welcome-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    font-family: var(--font-xp);
    font-size: 3.5rem;
    font-weight: 100; 
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    margin: 0 0 1rem 0;
}
.xp-logo {
    width: 100px;
    height: 75px;
}


.taskbar-area {
    display: flex;
    align-items: center;
    padding-left: 2rem;
}

#turn-off-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    
    font-family: var(--font-xp);
    font-size: 1.1rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
    
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    
    border: 2px solid transparent; 
}

.power-icon {
    width: 32px; 
    height: 32px;
}

#turn-off-button:hover,
#turn-off-button:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    outline: none;
}


/* ======== TSP STYLES ======== */

.featured-exhibit {
    background-color: #222;
    border: 4px solid var(--color-border);
    box-shadow: inset 0 0 0 4px var(--color-border-inner),
                0 0 0 4px var(--color-accent);
    
    margin-bottom: 2rem; 
    overflow: hidden; 
}

.canvas-container {
    width: 100%;
    height: 300px; 
    background-color: #000; 
    border-bottom: 4px solid var(--color-border); 
}

#tsp-canvas {
    display: block; 
    width: 100%;
    height: 100%;
}

.exhibit-info {
    padding: 1.5rem;
}

.exhibit-info h2 {
    margin-top: 0;
    font-size: 1.2rem;
}

.exhibit-info p {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 0;
}

/* ======== TROPHY CASE STYLES ======== */

.ra-player-card {
    display: flex;
    align-items: center;
    gap: 2rem;
    background-color: #222;
    padding: 2rem;
    margin-bottom: 2rem;
    
    border: 4px solid var(--color-border);
    box-shadow: inset 0 0 0 4px var(--color-border-inner),
                0 0 0 4px var(--color-accent);
}

.player-avatar-container img {
    width: 100px;
    height: 100px;
    border: 4px solid #fff;
    box-shadow: 4px 4px 0 #000; 
}

.player-info h2 {
    margin-top: 0;
    font-size: 2rem;
    color: var(--color-accent);
}

.player-stats {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.stat-box {
    display: flex;
    flex-direction: column;
}

.stat-box .label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-box .value {
    font-family: var(--font-pixel);
    font-size: 1.5rem;
    color: #fff;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.game-item {
    position: relative;
    transition: transform 0.1s step-end;
    border: 2px solid transparent;
}

.game-item img {
    width: 100%; 
    height: auto;
    display: block;
    
    image-rendering: pixelated; 
    border: 2px solid #333;
}

.game-item:hover {
    transform: translateY(-4px);
    z-index: 10;
}

.game-item:hover img {
    border-color: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
}

.trophy-controls {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.trophy-controls label {
    color: #aaa;
    font-family: var(--font-body);
    text-transform: uppercase;
    font-size: 0.8rem;
}

#sort-select {
    background-color: #222;
    color: #fff;
    border: 2px solid var(--color-border);
    padding: 0.5rem;
    font-family: var(--font-body); 
    cursor: pointer;
    outline: none;
}

#sort-select:focus {
    border-color: var(--color-accent);
}

/* ======== TOOLS/CONTROL PANEL LAYOUT ======== */

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tool-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background-color: #222; 
    text-decoration: none; 
    
    border: 4px solid var(--color-border);
    box-shadow: inset 0 0 0 2px var(--color-border-inner);
    
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.tool-card:hover {
    transform: translateY(-3px); 
    border-color: var(--color-accent); 
    background-color: #2a2a2a; 
}

.tool-icon {
    width: 64px;
    height: 64px;
    object-fit: contain; 
    
    image-rendering: pixelated; 
}

/*Text Info */
.tool-info h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
    color: #fff;
}

.tool-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #aaa;
    font-family: var(--font-body);
}

/* Coming Soon State */
.tool-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%); 
}

/* ======== LIBRARY ======== */

/* Filter Bar */
.library-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #333;
}

.library-controls span {
    color: #aaa;
    font-family: var(--font-pixel);
    text-transform: uppercase;
}

.filter-btn {
    background: transparent;
    border: 2px solid transparent;
    color: #fff;
    cursor: pointer;
    font-family: var(--font-body);
    padding: 0.25rem 0.75rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--color-accent);
    border-color: #555;
}

.filter-btn.active {
    background: var(--color-accent);
    color: #000;
    border-color: var(--color-accent);
}

/* The List Entries */
.library-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lib-entry {
    display: flex; /* Row layout */
    gap: 1.5rem;
    background: #222;
    padding: 1.5rem;
    text-decoration: none;
    border-left: 4px solid #444; /* Idle state border */
    transition: all 0.2s ease;
}

.lib-entry:hover {
    background: #2a2a2a;
    border-left-color: var(--color-accent); /* Green stripe on hover */
    transform: translateX(5px); /* Nudges right slightly */
}

/* Date Column */
.entry-date {
    font-family: var(--font-pixel);
    color: #888;
    min-width: 100px; /* Aligns all text hopefully */
    padding-top: 0.2rem;
}

.entry-info h3 {
    margin: 0 0 0.5rem 0;
    color: #fff;
    font-size: 1.2rem;
}

.entry-info p {
    margin: 0 0 1rem 0;
    color: #aaa;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

/* Tags */
.tag {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 1px;
}

.tag-tech { background: #333; color: #5bc0de; border: 1px solid #5bc0de; }
.tag-uni  { background: #333; color: #f0ad4e; border: 1px solid #f0ad4e; }
.tag-personal { background: #333; color: #d9534f; border: 1px solid #d9534f; }

/* ======== RETRO UI BLOG HEADER ======== */

/* The main container for the header UI elements */
.post-header {
    margin-bottom: 3rem; /* More space before article starts */
    padding-bottom: 2rem; /* Space inside before the border */
    
    border-bottom: 4px double #555; 
}

.post-header h1 {
    font-family: var(--font-pixel);
    font-size: 2.2rem; /* Slightly smaller to fit box better */
    color: var(--color-accent);
    text-shadow: 2px 2px 0px #000;
    margin: 0 0 1rem 0; /* Reset margin, add bottom space */

    background-color: #222;
    border: 3px solid #444;
    padding: 1rem 1.5rem;
    box-shadow: inset 0 0 15px #000; 
}

/* Container for the two separate meta boxes */
.post-meta {
    display: flex;
    gap: 1rem; 
    justify-content: space-between; 
    align-items: center;
    font-family: var(--font-pixel);
    font-size: 0.9rem;
}

.post-meta .date,
.post-meta .tag {
    background-color: #222;
    border: 2px solid #444;
    padding: 0.75rem 1.25rem;
    display: inline-flex;
    align-items: center;
    box-shadow: inset 0 0 5px #000; 
}

.post-meta .date {
    color: #bbb;
}

.post-meta .date::before {
    content: "📅";
    margin-right: 0.75rem;
    filter: grayscale(100%) brightness(1.2);
}

.post-meta .tag {
    margin-left: 0; 
    border-radius: 0;
}

/* ======== GLOBAL HEADER UPDATES ======== */

.site-header h1 {
    font-size: 3rem;
    margin: 0;
    font-family: var(--font-pixel);
    text-transform: uppercase;
    letter-spacing: 2px;
    
    background: linear-gradient(90deg, var(--color-accent) 0%, #4facfe 100%);
    
    -webkit-background-clip: text;
    background-clip: text;
    
    color: transparent;
    
    filter: drop-shadow(4px 4px 0px #000);
}