/* STH Portal Theme - 90s Arcade Edition (Global Base) */
:root {
    --crt-bg: #111;
    --crt-scanline: rgba(0, 0, 0, 0.5);

    /* Default Fallbacks (Overridden by Publication Theme) */
    --theme-primary: #0000AA;
    /* Retro Blue */
    --theme-secondary: #FF0000;
    /* Retro Red */
    --theme-accent: #FFD700;
    /* Retro Gold */
    --theme-bg-gradient: radial-gradient(circle at top, #002F32 0%, #001f21 100%);

    --retro-gray: #c0c0c0;
    --retro-dark: #404040;
    --retro-text: #fff;

    /* Font */
    --font-retro: "Courier New", Courier, monospace;
}

body {
    background-color: var(--crt-bg);
    color: var(--retro-text);
    font-family: var(--font-retro);
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    /* CRT Scanline Effect */
    background: linear-gradient(rgba(18, 16, 16, 0) 50%,
            rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg,
            rgba(255, 0, 0, 0.06),
            rgba(0, 255, 0, 0.02),
            rgba(0, 0, 255, 0.06));
    background-size: 100% 4px, 6px 100%;
    /* Layer Publication Gradient behind CRT effect if possible, but body bg is complex. 
       Instead, we apply theme bg to the main container or specific boxes. */
}

/* Utilities */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Retro UI Components */
.retro-box {
    /* Publication Specific Layer */
    background: var(--theme-primary);
    /* Fallback or Darkened Primary */
    background: linear-gradient(180deg, var(--theme-primary) 0%, rgba(0, 0, 0, 0.8) 100%);

    border: 4px solid var(--retro-text);
    box-shadow:
        inset 4px 4px 0px rgba(255, 255, 255, 0.3),
        inset -4px -4px 0px rgba(0, 0, 0, 0.5),
        5px 5px 0px rgba(0, 0, 0, 0.5);
    padding: 20px;
    margin-bottom: 30px;
    position: relative;
}

.retro-header h1 {
    font-size: 48px;
    text-transform: uppercase;
    text-align: center;
    color: var(--theme-secondary);
    text-shadow: 2px 2px #000;
    margin: 0;
    letter-spacing: 4px;
    border-bottom: 4px solid var(--retro-text);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.retro-subtitle {
    text-align: center;
    font-size: 18px;
    text-transform: uppercase;
    margin-bottom: 30px;
    color: var(--retro-text);
    background: #000;
    display: inline-block;
    padding: 5px 15px;
    border: 2px solid var(--theme-primary);
}

/* Inputs & Buttons - CHUNKY */
input[type="email"] {
    width: 100%;
    background: #000;
    color: var(--theme-accent);
    border: 4px inset #666;
    padding: 15px;
    font-family: var(--font-retro);
    font-size: 18px;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 15px;
    text-transform: uppercase;
}

input[type="email"]::placeholder {
    color: #666;
}

button {
    width: 100%;
    background: var(--theme-secondary);
    color: var(--retro-text);
    font-family: var(--font-retro);
    font-size: 24px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 15px;
    border: 4px outset rgba(255, 255, 255, 0.4);
    cursor: pointer;
    box-shadow: 3px 3px 0px #000;
    text-shadow: 2px 2px 0px #000;
}

button:active {
    border-style: inset;
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #000;
}

button:disabled {
    background: #555;
    border-color: #777;
    color: #aaa;
}

/* Archives as Stats Table */
.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #000;
    border: 4px solid var(--retro-text);
}

.stats-table th {
    background: var(--retro-text);
    color: #000;
    text-transform: uppercase;
    padding: 10px;
    font-size: 18px;
}

.stats-table td {
    padding: 10px;
    border-bottom: 2px solid #333;
    font-size: 16px;
    color: var(--retro-text);
}

.stats-table tr:hover {
    background: #222;
    cursor: pointer;
}

.stats-table a {
    color: inherit;
    text-decoration: none;
    display: block;
}

/* Tags */
.pixel-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    text-transform: uppercase;
    border: 2px solid;
    margin-right: 5px;
}

.tag-pre {
    border-color: var(--theme-accent);
    color: var(--theme-accent);
}

.tag-post {
    border-color: var(--theme-secondary);
    color: var(--theme-secondary);
    background: rgba(255, 255, 255, 0.1);
}

/* Grid for Landing Page */
.arcade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.arcade-card {
    background: #222;
    border: 4px outset #444;
    padding: 2px;
    text-decoration: none;
    display: block;
    transition: transform 0.1s;
}

.arcade-card:hover {
    transform: scale(1.05);
    background: #333;
    border-color: var(--retro-text);
}

.arcade-card-inner {
    border: 2px solid #000;
    padding: 20px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.insert-coin {
    animation: blink 1s infinite;
    color: var(--theme-secondary);
    margin-top: 20px;
    font-size: 14px;
    text-transform: uppercase;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}