/* Arcade Theme CSS */
:root {
    --crt-bg: #111;
    --crt-scanline: rgba(18, 16, 16, 0.5);
    --neon-green: #39ff14;
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    /* Reduced text shadow for better readability */
    --text-shadow: 0 0 2px var(--neon-green);
}

/* Global Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

body.arcade-mode {
    background-color: #000;
    color: var(--neon-green);
    font-family: 'VT323', monospace;
    margin: 0;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.crt-container {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1000px;
    /* Removed max-height to allow full vertical expansion per user request */
    background: var(--crt-bg);
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: turnOn 0.4s ease-in-out;
}

/* CRT Scanline Effect */
/* CRT Scanline Effect - REMOVED for readability */
.crt-overlay {
    display: none;
}

.crt-flicker {
    animation: flicker 0.15s infinite;
}

/* Game Content */
.game-screen {
    text-align: center;
    z-index: 20;
    /* Ensure this is above overlay */
    width: 100%;
    height: 100%;
    /* Fix collapsed height */
    position: relative;
    /* Needed for z-index */
    display: flex;
    /* Help vertically center content */
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title-screen h1 {
    font-size: 3rem;
    /* Removed text-shadow to prevent 'opacity' ghosting effect */
    text-shadow: none;
    margin-bottom: 2rem;
    letter-spacing: 5px;
    animation: pulse 2s infinite;
}

.insert-coin {
    font-size: 1.2rem;
    margin-top: 3rem;
    color: var(--neon-blue);
    animation: blink 1s step-end infinite;
}

.menu-screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu {
    display: block;
    /* Ensure list is visible when parent is visible */
    list-style: none;
    padding: 0;
    margin-top: 2rem;
}

.menu li {
    margin: 1.5rem 0;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu li.active {
    color: var(--neon-pink);
    text-shadow: 0 0 10px var(--neon-pink);
    transform: scale(1.1);
}

.menu li.active::before {
    content: "> ";
    margin-right: 10px;
}

.menu li a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.footer-credits {
    position: absolute;
    bottom: 20px;
    font-size: 0.8rem;
    color: #666;
}

/* Content Page Layout */
.content-screen {
    overflow-y: auto;
    /* Allow scrolling for long content */
    padding: 2rem;
    box-sizing: border-box;
    /* Hide scrollbar for webkit */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.content-screen::-webkit-scrollbar {
    display: none;
}

.arcade-content {
    max-width: 800px;
    width: 100%;
    text-align: left;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 8rem;
    /* Extra padding for mobile browsers */
}

.arcade-content h1 {
    color: var(--neon-pink);
    /* Removed text-shadow to prevent 'opacity' ghosting effect */
    text-shadow: none;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.content-body {
    flex: 1;
    font-family: 'Courier New', monospace;
    /* readable monospace */
    font-size: 1.1rem;
    line-height: 1.6;
    color: #ccffcc;
    /* phosphor green tint */
}

.content-body p {
    margin-bottom: 1.5rem;
}

.content-body a {
    color: var(--neon-blue);
    text-decoration: underline;
}

.content-body a:hover {
    color: var(--neon-pink);
    background-color: rgba(255, 0, 255, 0.1);
}

.navigation-footer {
    margin-top: 3rem;
    text-align: center;
    padding-bottom: 2rem;
}

.back-link {
    font-family: 'VT323', monospace;
    color: var(--neon-green);
    text-decoration: none;
    font-size: 1.2rem;
    border: 2px solid var(--neon-green);
    padding: 10px 20px;
    transition: all 0.2s;
}

.back-link:hover {
    background: var(--neon-green);
    color: #000;
}

.blink-text {
    animation: blink 2s infinite;
}

/* List Views */
.list-menu li {
    font-size: 1rem;
    text-align: left;
    border-bottom: 1px dashed #333;
    padding-bottom: 0.5rem;
}

.list-date {
    color: #666;
    margin-right: 1rem;
    font-size: 0.8rem;
}

.pagination {
    margin-top: 2rem;
    text-align: center;
}

.pagination a {
    color: var(--neon-blue);
    text-decoration: none;
}

/* Search */
.search-container {
    width: 100%;
    margin-bottom: 2rem;
    text-align: center;
}

#arcade-search-input {
    background: transparent;
    border: 2px solid var(--neon-green);
    color: var(--neon-green);
    font-family: 'VT323', monospace;
    padding: 1rem;
    width: 80%;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 0 10px var(--neon-green);
}

#arcade-search-input:focus {
    outline: none;
    box-shadow: 0 0 20px var(--neon-pink);
    border-color: var(--neon-pink);
}

/* 8-bit Image Processing */
/* 8-bit Image Processing - REMOVED */
.content-body img {
    max-width: 100%;
    height: auto;
    border: 2px solid #333;
}

/* Animations */
@keyframes flicker {
    0% {
        opacity: 0.97;
    }

    5% {
        opacity: 0.95;
    }

    10% {
        opacity: 0.9;
    }

    15% {
        opacity: 0.95;
    }

    20% {
        opacity: 0.99;
    }

    25% {
        opacity: 0.95;
    }

    30% {
        opacity: 0.9;
    }

    35% {
        opacity: 0.96;
    }

    40% {
        opacity: 0.98;
    }

    45% {
        opacity: 0.95;
    }

    50% {
        opacity: 0.99;
    }

    55% {
        opacity: 0.93;
    }

    60% {
        opacity: 0.9;
    }

    65% {
        opacity: 0.96;
    }

    70% {
        opacity: 1;
    }

    75% {
        opacity: 0.97;
    }

    80% {
        opacity: 0.94;
    }

    85% {
        opacity: 0.92;
    }

    90% {
        opacity: 0.96;
    }

    95% {
        opacity: 1;
    }

    100% {
        opacity: 0.98;
    }
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes turnOn {
    0% {
        transform: scale(1, 0.002);
        opacity: 0;
        filter: brightness(30);
    }

    50% {
        transform: scale(1, 0.002);
        opacity: 1;
    }

    75% {
        transform: scale(1.2, 0.002);
        opacity: 1;
    }

    100% {
        transform: scale(1, 1);
        opacity: 1;
        filter: brightness(1);
    }
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .title-screen h1 {
        font-size: 1.5rem;
    }

    .menu li {
        font-size: 1rem;
    }
}

/* Post Cover Styles */
.post-cover {
    margin-bottom: 2rem;
    text-align: center;
    border: 2px solid #555;
    padding: 0.5rem;
    background: #000;
    max-width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.post-cover img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border: 2px solid #333;
}

.cover-caption {
    font-size: 0.7rem;
    color: #888;
    margin-top: 0.5rem;
    font-style: italic;
}