/* =========================================================
   GLOBAL TERMINAL THEME VARIABLES
========================================================= */
:root {
    --primary-color: #00FF41;
    --secondary-color: #008000;
    --background-color: #000000;
    --text-color: var(--primary-color);
    --border-color: var(--secondary-color);
}

/* =========================================================
   BASE LAYOUT
========================================================= */
/* CRITICAL SAFETY: Ensure no image ever exceeds the main content width */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevents weird spacing issues */
}
body {
    position: relative;
    margin: 0;
    padding: 20px;
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    overflow-x: hidden; 
}

/* -------------------------------------------
   VHS TRACKING/NOISE BAR (HIGH VISIBILITY)
------------------------------------------- */

/* Keyframes for the Tracking Bar Animation (UPDATED OPACITY) */
@keyframes tracking-noise {
    0%   { opacity: 0; top: 0; }
    1%   { opacity: 0.3; top: 20%; } 
    3%   { opacity: 0; } 
    50%  { opacity: 0; top: 80%; }
    51%  { opacity: 0.4; top: 75%; } 
    53%  { opacity: 0; }
    100% { opacity: 0; }
}

/* body::before: Persistent noise layer (white static) */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;

    background: repeating-linear-gradient(
        90deg, 
        transparent 0, 
        rgba(255, 255, 255, 0.05) 5px, 
        transparent 10px
    );
    opacity: 0.03; /* Subtle static opacity increased from 0.02 to 0.03 */
}

/* body::after: The animated tracking bar (UPDATED HEIGHT) */
body::after {
    content: '';
    position: fixed;
    width: 100%;
    
    height: 25px; /* Height increased to 25px */
    
    top: 0; 
    background: white; 
    opacity: 0;
    filter: blur(1px); 
    animation: tracking-noise 8s infinite ease-out; 
    pointer-events: none;
    z-index: 9999; 
}


/* -------------------------------------------
   VHS JITTER ANIMATION (SUBDUED)
------------------------------------------- */
@keyframes vhs-jitter {
    0% {
        transform: translate(0, 0);
        box-shadow:
            0 0 10px var(--secondary-color),
            0 0 20px var(--secondary-color) inset;
    }
    30% {
        transform: translate(-0.2px, 0.2px); 
    }
    60% {
        transform: translate(0.2px, -0.2px); 
    }
    100% {
        transform: translate(0, 0);
        box-shadow:
            0 0 15px rgba(0, 255, 65, 0.8),
            0 0 25px var(--secondary-color) inset;
    }
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid var(--secondary-color);
    min-height: 80vh;
    border-radius: 5px;
    
    box-shadow:
        0 0 10px var(--secondary-color),
        0 0 20px var(--secondary-color) inset,
        0 0 40px rgba(0, 255, 65, 0.1);
    
    animation: vhs-jitter 1s infinite alternate; 
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

/* -------------------------------------------
   TEXT FLICKER ANIMATION
------------------------------------------- */
@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            0 0 5px var(--primary-color), 
            0 0 15px var(--primary-color), 
            0 0 25px var(--secondary-color), 
            0 0 45px var(--secondary-color); 
        opacity: 1;
    }
    20%, 24%, 55% {
        text-shadow: none;
        opacity: 0.8;
    }
}
.flicker-text {
    animation: flicker 4s linear infinite;
}

h1, h2, h3 {
    color: var(--primary-color);
    text-transform: uppercase;
    border-bottom: 1px dashed var(--secondary-color);
    text-shadow:
        0 0 8px var(--primary-color),
        0 0 15px rgba(0, 255, 65, 0.5); 
}
.retro-header h1, 
.retro-footer .footer-title {
    animation: flicker 3s linear infinite alternate;
}

p, ul, li, a {
    line-height: 1.6;
}

/* =========================================================
   RETRO HEADER
========================================================= */
/* ... (Header styles remain unchanged) ... */
.retro-header,
.retro-header * {
    all: revert;
    box-sizing: border-box;
}
.retro-header {
    width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    position: relative;
    z-index: 50;
    pointer-events: auto;
}
.retro-header-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px dashed var(--secondary-color);
}
.retro-header h1 {
    margin: 0;
    padding: 0;
    font-size: 1.6em;
    line-height: 1;
    color: var(--primary-color);
    border: none;
    text-shadow: 0 0 5px var(--primary-color);
}
.retro-header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
}
.retro-header nav a:not(.retro-button) {
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 8px;
    font-size: 1.05em;
}
.retro-header nav a:not(.retro-button):hover {
    background: var(--primary-color);
    color: var(--background-color);
}
/* Admin buttons in header */
.retro-header .retro-button {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    font-size: 0.8em;
    line-height: 1;
    border: 1px dashed var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
}
/* Disconnect button override */
.retro-header .admin-disconnect-btn,
.admin-disconnect-btn { 
    background-color: darkred; 
    border-color: red;
    color: var(--primary-color); 
}

/* =========================================================
   RETRO FOOTER
========================================================= */
.retro-footer {
    width: 100%;
    margin-top: 30px; 
    padding: 10px 0 20px 0;
    text-align: center;
    color: var(--secondary-color);
    font-size: 0.9em;
}
.retro-footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 20px;
    border-top: 1px dashed var(--secondary-color);
}
.footer-title {
    margin: 5px 0;
    font-size: 1.1em;
    color: var(--primary-color);
}
.retro-footer .social-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.2s;
}
.retro-footer .social-links a:hover {
    color: var(--primary-color);
}
.copyright-info {
    margin-top: 5px;
    font-size: 0.8em;
}

/* =========================================================
   BUTTONS & FORMS
========================================================= */
.retro-button {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer; /* Ensure buttons are clickable */
    box-shadow: 0 0 5px var(--primary-color);
    transition: all 0.1s;
}
.retro-button:hover {
    background: var(--primary-color);
    color: var(--background-color);
}

/* --- NEW RETRO INPUT STYLES --- */
.form-group {
    margin-bottom: 15px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.retro-input,
.retro-textarea,
.retro-select {
    width: 100%;
    padding: 8px 10px;
    
    /* Terminal Look */
    background-color: var(--background-color); 
    color: var(--primary-color);
    font-family: 'VT323', monospace;
    font-size: 1.1em;
    
    /* Retro Border */
    border: 1px dashed var(--secondary-color);
    box-shadow: none; /* Remove default shadow */
    box-sizing: border-box; 
}
.retro-input:focus,
.retro-textarea:focus,
.retro-select:focus {
    /* Focus state */
    outline: none;
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
}
.retro-textarea {
    resize: vertical; /* Allow resizing only vertically */
}
/* --- END NEW RETRO INPUT STYLES --- */
/* =========================================================
   NEWS & ARCHIVE ELEMENTS
========================================================= */
.secondary-text {
    color: var(--secondary-color);
    font-size: 0.8em;
}
.news-item-preview {
    border-left: 3px solid var(--secondary-color);
    padding-left: 15px;
    margin-bottom: 25px;
}
.full-archive-item {
    border-left: 3px solid var(--secondary-color);
    padding-left: 15px;
    margin-bottom: 30px;
    padding-bottom: 10px;
}
.full-archive-item .post-date {
    border-bottom: 1px dotted var(--secondary-color);
    padding-bottom: 5px;
    margin-bottom: 5px;
    display: block; 
}
.empty-feed-message {
    color: var(--secondary-color);
}
.archive-header-controls {
    margin-bottom: 20px;
}
.news-feed-footer {
    text-align: right;
    margin-top: 20px;
}

/* =========================================================
   MUSIC PAGE GALLERY
========================================================= */
.album-gallery {
    display: grid;
    /* Force exactly 3 columns, distributing space evenly */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px; 
    justify-content: space-between; 
    justify-items: center; 
    padding: 20px 0;
}
.album-card {
    display: block; 
    text-align: center;
    text-decoration: none;
    color: var(--primary-color); 
    transition: all 0.2s ease-out;
    max-width: 250px; 
    width: 100%;
}
.album-card:hover {
    color: var(--primary-color);
    opacity: 0.8;
}
.album-cover-gallery {
    width: 100%;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    line-height: 0; 
    padding: 1px; 
    margin-left: auto;
    margin-right: auto;
}
.album-card img {
    display: block;
    width: 100%; 
    height: auto;
    transition: transform 0.3s ease-in-out;
}
.album-card:hover img {
    transform: scale(1.05);
}
.retro-frame {
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 5px var(--primary-color);
    box-sizing: border-box;
}
.album-type {
    margin: 2px 0 0 0;
    font-size: 0.9em;
    color: var(--secondary-color);
}
@media (max-width: 850px) {
    .album-gallery {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
}
@media (max-width: 600px) {
    .album-gallery {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ALBUM DETAIL PAGE
========================================================= */
.album-detail-view {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    padding: 20px 0;
}
.album-detail-view .album-cover {
    flex-shrink: 0;
    width: 250px; 
}
.album-detail-view .album-cover img {
    width: 100%;
    height: auto;
}
.release-type-badge {
    color: var(--secondary-color);
    font-size: 0.8em;
    text-transform: uppercase;
    padding-left: 5px;
}
/* ... (Other detail page styles) ... */

/* =========================================================
   ADMIN PANEL STYLES (Final Migration)
========================================================= */

/* General Layout & Containers */
.admin-header-controls {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px dotted var(--secondary-color); 
    margin-bottom: 15px;
}
.admin-welcome-message {
    margin-bottom: 30px;
}
.admin-task-container {
    padding: 30px; 
    text-align: center;
}
.task-mode-grid {
    display: flex; 
    justify-content: space-around; 
    gap: 20px; 
    margin-top: 30px;
}
/* Task Mode Link (Styles were merged into this class) */
.task-mode-link {
    font-size: 1.2em; 
    padding: 15px 30px; 
    flex-grow: 1;
    border-color: var(--primary-color);
}
.admin-list-container,
.admin-form-wrapper {
    padding: 20px;
}

/* Forms and Messages */
.error-box {
    padding: 10px; 
    margin-bottom: 20px; 
    border: 1px dashed red; 
    background-color: rgba(255, 0, 0, 0.1);
    color: var(--primary-color);
}
.admin-login-form {
    padding: 20px; 
    max-width: 400px; 
    margin: 30px auto;
}
.admin-submit-button {
    margin-top: 15px;
}
.admin-save-controls {
    margin-top: 20px; 
    text-align: right;
}
.success-box {
    padding: 10px; 
    margin-bottom: 20px; 
    background-color: var(--secondary-color); 
    color: var(--background-color);
}
.admin-no-data {
    text-align: center; 
    padding: 10px; 
    color: red;
}
.admin-login-footer-text {
    text-align: center; 
    font-size: 0.8em; 
    color: var(--secondary-color); 
    margin-top: 30px;
}

/* Tables (Discography Admin) */
.admin-table-row {
    border-bottom: 1px dotted var(--secondary-color);
}
.admin-table-row td {
    padding: 8px;
}
.admin-table-id {
    color: var(--secondary-color);
}
.admin-table-title {
    font-weight: bold;
}
.admin-table-actions {
    text-align: right;
}
.admin-edit-btn {
    font-size: 0.8em; 
    padding: 3px 8px;
}
.admin-delete-btn {
    font-size: 0.8em; 
    padding: 3px 8px; 
    background-color: darkred; 
    border-color: red;
}

/* News Admin List */
.admin-list-reset {
    list-style-type: none; 
    padding-left: 0;
}
.admin-list-item {
    margin-bottom: 15px; 
    border-bottom: 1px dotted var(--secondary-color); 
    padding-bottom: 5px;
}
.admin-list-bold {
    font-weight: bold;
}
.admin-list-title {
    color: var(--primary-color);
}
.admin-list-content {
    margin-top: 5px; 
    font-size: 0.9em; 
    padding-left: 10px; 
    border-left: 1px solid var(--secondary-color);
}