/* Total Nuclear Annihilation - Retro Futuristic Style */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #000000;
    color: #31A6DC;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.6;
    padding: 20px;
}

/* Header Logo */
header {
    text-align: center;
    margin-bottom: 30px;
}

header img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Navigation */
nav {
    text-align: center;
    margin-bottom: 30px;
    border-top: 2px solid #E72087;
    border-bottom: 2px solid #E72087;
    padding: 15px 0;
}

nav ul {
    list-style-type: none;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding: 0;
    margin: 0;
}

nav ul li {
    flex: 0 0 calc((100% - 40px) / 5);
    min-width: 0;
    margin-bottom: 0px;
}

nav ul li a {
    color: #31A6DC;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: bold;
    padding: 8px 15px;
    border: 1px solid #31A6DC;
    display: block;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    nav ul li {
        flex: none;
        width: 100%;
    }
    
    nav ul li a {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        padding: 10px 15px;
    }
}

nav ul li a:hover {
    background-color: #31A6DC;
    color: #000000;
    box-shadow: 0 0 5px #31A6DC;
}

nav ul li a.active {
    background-color: #E72087;
    color: #000000;
    border-color: #E72087;
    box-shadow: 0 0 15px #E72087;
}

/* Main Content */
main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0px;
    text-align: left;
}

/* Headings */
h1 {
    color: #FFEE72;
    font-family: 'Impact', Arial-Black, Arial, sans-serif;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Multiple shadows: dark outline for readability, then glow */
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 8px #FFEE72,
        0 0 12px #FFEE72;
}

h2 {
    color: #E72087;
    font-family: 'Impact', Arial-Black, Arial, sans-serif;
    font-size: 22px;
    font-weight: 900;
    margin-top: 30px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    /* Multiple shadows: dark outline for readability, then glow */
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 6px #E72087,
        0 0 10px #E72087;
}

h3 {
    color: #00FF00;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Paragraphs and Text */
p {
    margin-bottom: 15px;
    color: #31A6DC;
}

/* Links */
a {
    color: #F08551;
    text-decoration: underline;
}

a:hover {
    color: #FFEE72;
    text-shadow: 0 0 5px #FFEE72;
}

/* Lists */
ul, ol {
    margin-left: 30px;
    margin-bottom: 20px;
    color: #31A6DC;
}

li {
    margin-bottom: 8px;
}

/* Articles/Posts */
article {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #0080FF;
    background-color: rgba(0, 128, 255, 0.05);
    overflow-x: hidden;
    box-sizing: border-box;
}

article h2 {
    margin-top: 0;
}

article .date {
    color: #F08551;
    font-size: 12px;
    font-style: italic;
    margin-bottom: 10px;
}

/* Code/Updates List */
.update-list {
    list-style: none;
    margin-left: 0;
}

.update-list li {
    padding: 10px;
    margin-bottom: 15px;
    border-left: 3px solid #00FF00;
    padding-left: 15px;
    background-color: rgba(0, 255, 0, 0.05);
}

.update-list li strong {
    color: #FFEE72;
}

/* Changelog Code Blocks */
.update-list pre {
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #00FF00;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #31A6DC;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.update-list pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    color: inherit;
}

/* General Code Blocks (for use in articles and other areas) */
article pre,
pre {
    margin: 15px 0;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #00FF00;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
    color: #31A6DC;
    white-space: pre-wrap;
    word-wrap: break-word;
}

article pre code,
pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    color: inherit;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #8000FF;
    color: #8000FF;
    font-size: 12px;
}

/* Horizontal Rules */
hr {
    border: none;
    border-top: 1px solid #0080FF;
    margin: 30px 0;
}

/* Special Accent Colors */
.neon-pink {
    color: #E72087;
    text-shadow: 0 0 5px #E72087;
}

.neon-yellow {
    color: #FFEE72;
    text-shadow: 0 0 5px #FFEE72;
}

.neon-green {
    color: #00FF00;
    text-shadow: 0 0 5px #00FF00;
}

.neon-orange {
    color: #F08551;
    text-shadow: 0 0 5px #F08551;
}

/* Simple early 90s aesthetic - minimal styling */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    visibility: visible; /* Default to visible - will be hidden by class if needed */
}

/* Hide container initially while components load - removed by JavaScript */
.container-loading {
    visibility: hidden;
}

/* Fallback: if JavaScript is disabled, ensure content is visible */
noscript .container-loading {
    visibility: visible !important;
}

/* Gallery Styles */
.gallery-section {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #0080FF;
    background-color: rgba(0, 128, 255, 0.05);
}

.gallery-section h2 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #E72087;
}

/* Masonry Grid Layout */
.masonry-grid {
    column-count: 3;
    column-gap: 15px;
    width: 100%;
    line-height: 0;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
    page-break-inside: avoid;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #31A6DC;
    transition: all 0.3s ease;
    vertical-align: top;
    line-height: 1.4;
}

.masonry-item:hover {
    border-color: #E72087;
    box-shadow: 0 0 10px rgba(231, 32, 135, 0.5);
    transform: translateY(-2px);
}

.gallery-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.image-caption {
    padding: 10px;
    color: #31A6DC;
    font-size: 12px;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-top: 1px solid #31A6DC;
    font-family: Arial, Helvetica, sans-serif;
}

.gallery-image-link:hover .image-caption {
    color: #FFEE72;
    border-top-color: #E72087;
}

/* Responsive Masonry Grid */
@media (max-width: 768px) {
    .masonry-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    .masonry-item {
        margin-bottom: 10px;
    }
}

@media (max-width: 480px) {
    .masonry-grid {
        column-count: 1;
    }
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90vh;
    margin-top: 50px;
    border: 2px solid #E72087;
    box-shadow: 0 0 20px rgba(231, 32, 135, 0.8);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #FFEE72;
    padding: 20px 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    text-shadow: 0 0 5px #FFEE72;
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #FFEE72;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 0 0 10px #FFEE72;
    z-index: 10000;
}

.lightbox-close:hover {
    color: #E72087;
    text-shadow: 0 0 10px #E72087;
    transform: scale(1.2);
}

.lightbox-prev,
.lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: #FFEE72;
    font-weight: bold;
    font-size: 30px;
    transition: all 0.3s ease;
    user-select: none;
    text-shadow: 0 0 10px #FFEE72;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid #FFEE72;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(231, 32, 135, 0.8);
    border-color: #E72087;
    color: #E72087;
    text-shadow: 0 0 10px #E72087;
}

@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        margin-top: 30px;
    }
    
    .lightbox-caption {
        font-size: 14px;
        padding: 15px 0;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 24px;
        padding: 12px;
    }
}

/* Button Styles */
.button-primary {
    display: inline-block;
    padding: 12px 24px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    text-align: center;
    border: 2px solid #E72087;
    color: #E72087;
    background-color: rgba(231, 32, 135, 0.1);
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.button-primary:hover {
    background-color: #E72087;
    color: #000000;
    box-shadow: 0 0 15px #E72087;
    text-shadow: none;
}

.button-center {
    text-align: center;
    margin: 30px 0;
}

/* Content Sections - Standardized styling for consistent boxes */
.content-section {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #0080FF;
    background-color: rgba(0, 128, 255, 0.05);
}

.content-section h2 {
    margin-top: 0;
}

.content-section h3 {
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Merch Banner */
.merch-banner {
    margin: 0 0 25px 0;
    width: 100%;
}

.merch-banner img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .merch-banner {
        margin: 0 0 20px 0;
    }
}

/* Leaderboard Styles */
.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.leaderboard-header .fullscreen-link {
    font-size: 14px;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
    text-shadow: none;
    margin-left: auto;
}

.leaderboard-embed {
    width: 100%;
    min-height: 600px;
    border: 1px solid #31A6DC;
    background-color: rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .leaderboard-embed {
        min-height: 500px;
    }
    
    .leaderboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .leaderboard-header .fullscreen-link {
        margin-left: 0;
    }
}

/* GIF Content Wrapper */
.gif-content-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-top: 10px;
}

.construction-gif {
    flex-shrink: 0;
    max-width: 200px;
    height: auto;
}

.gif-content-text {
    flex: 1;
}

.gif-content-text p {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .gif-content-wrapper {
        flex-direction: column;
    }
    
    .construction-gif {
        max-width: 100%;
        width: auto;
    }
}

/* 1990s-Style Visitor Counter */
.visitor-counter-wrapper {
    text-align: center;
    margin: 30px auto;
    max-width: 500px;
}

.visitor-counter-label {
    margin: 0 0 10px 0;
    color: #E72087;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    text-shadow: 0 0 5px #E72087;
}

.visitor-counter {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 6px;
    background-color: #000000;
    border: 2px solid #31A6DC;
    box-shadow: 0 0 12px rgba(49, 166, 220, 0.5);
}

.counter-digit {
    display: inline-block;
    width: 28px;
    height: 42px;
    line-height: 42px;
    background-color: #000000;
    border: 1px solid #31A6DC;
    color: #31A6DC;
    font-family: 'Courier New', Courier, monospace;
    font-size: 26px;
    font-weight: bold;
    text-align: center;
    text-shadow: 
        0 0 8px #31A6DC,
        0 0 16px #31A6DC,
        0 0 24px rgba(49, 166, 220, 0.5);
    box-shadow: 
        inset 0 0 8px rgba(49, 166, 220, 0.2),
        0 0 4px rgba(49, 166, 220, 0.3);
}

@media (max-width: 768px) {
    .visitor-counter-wrapper {
        max-width: 90%;
        margin: 25px auto;
    }
    
    .visitor-counter-label {
        font-size: 11px;
        margin-bottom: 10px;
    }
    
    .counter-digit {
        width: 24px;
        height: 36px;
        line-height: 36px;
        font-size: 22px;
    }
    
    .visitor-counter {
        gap: 2px;
        padding: 5px;
    }
}

@media (max-width: 480px) {
    .counter-digit {
        width: 20px;
        height: 30px;
        line-height: 30px;
        font-size: 18px;
    }
    
    .visitor-counter {
        gap: 2px;
        padding: 4px;
    }
}

/* Clickable Headers with IDs */
h1[id].clickable-header,
h2[id].clickable-header,
h3[id].clickable-header,
h4[id].clickable-header,
h5[id].clickable-header,
h6[id].clickable-header {
    cursor: pointer;
    position: relative;
    transition: opacity 0.2s ease;
}

h1[id].clickable-header:hover,
h2[id].clickable-header:hover,
h3[id].clickable-header:hover,
h4[id].clickable-header:hover,
h5[id].clickable-header:hover,
h6[id].clickable-header:hover {
    opacity: 0.85;
}

/* Copy Feedback Message */
.copy-feedback {
    display: inline-block;
    margin-left: 10px;
    color: #00FF00;
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    text-shadow: 0 0 5px #00FF00;
    animation: fadeInOut 2s ease-in-out;
    opacity: 0;
    font-weight: normal;
    vertical-align: baseline;
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    20% {
        opacity: 1;
        transform: translateX(0);
    }
    80% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-10px);
    }
}

