:root {
    --colonial-green: #6b8c42;
    --para-gold: #a3cf62;
    /* Shifting to Vibrant Paragon Green */
    --para-accent: #b4db7d;
    --para-dark: #0b0f07;
    --para-white: #f0f0f0;
    --glass-bg: rgba(15, 20, 10, 0.7);
    --glass-border: rgba(163, 207, 98, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #0d0d0d;
    color: var(--para-white);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background: transparent;
    position: absolute;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 3%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-family: 'Black Ops One', cursive;
    font-size: 1.8rem;
    color: var(--para-gold);
    letter-spacing: 2px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

nav ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--para-gold);
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000 url('https://upload.wikimedia.org/wikipedia/commons/4/4e/British_field_artillery_moving_into_position_at_the_battle_of_The_Somme_1916.jpg') no-repeat center center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.8) 100%),
        linear-gradient(to bottom, transparent 60%, #0d0d0d 100%);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/asfalt-dark.png');
    opacity: 0.3;
    pointer-events: none;
    mix-blend-mode: overlay;
    animation: noiseShift 8s steps(10) infinite;
}

@keyframes noiseShift {
    0% {
        transform: translate(0, 0)
    }

    10% {
        transform: translate(-1%, -1%)
    }

    20% {
        transform: translate(1%, 1%)
    }

    30% {
        transform: translate(-2%, 1%)
    }

    40% {
        transform: translate(2%, -2%)
    }

    100% {
        transform: translate(0, 0)
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding-top: 80px;
    /* Space for the header */
}

.hero h1 {
    font-family: 'Black Ops One', cursive;
    font-size: clamp(3rem, 10vw, 7rem);
    /* Slightly larger */
    line-height: 0.85;
    margin-bottom: 2rem;
    text-transform: uppercase;
    text-shadow: 0 0 50px rgba(0, 0, 0, 0.9);
}

.epic-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(40px) scale(1.1);
    filter: blur(10px);
    animation: wordPop 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.epic-word:nth-child(1) {
    animation-delay: 0.2s;
}

.epic-word:nth-child(2) {
    animation-delay: 0.4s;
}

.epic-word:nth-child(3) {
    animation-delay: 0.6s;
}

.epic-word:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes wordPop {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

.hero-subtext {
    font-size: 1.5rem;
    color: var(--para-gold);
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 3.5rem;
    opacity: 0;
    animation: fadeInUp 1s ease-out 1.2s forwards, float 6s ease-in-out infinite 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-cta {
    opacity: 0;
    animation: fadeInUp 1s ease-out 0.8s forwards;
}

@keyframes epicFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1) translateY(20px);
        filter: blur(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.legion-slogan {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    letter-spacing: 5px;
}

.btn {
    display: inline-block;
    background: transparent;
    color: var(--para-gold);
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 2px;
    font-weight: 900;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--para-gold);
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 2px;
}

.btn:hover {
    background: var(--para-gold);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(197, 160, 89, 0.2);
}

.btn.primary {
    background: var(--colonial-green);
    border-color: var(--colonial-green);
    color: #fff;
}

.btn.primary:hover {
    background: var(--para-accent);
    border-color: var(--para-accent);
}

.epic-btn {
    padding: 1.2rem 3.5rem;
    font-size: 1.2rem;
    border-radius: 0;
    background: var(--para-gold);
    color: #000;
    border: none;
    box-shadow: 0 0 30px rgba(163, 207, 98, 0.4);
    animation: btnPulse 3s infinite;
}

@keyframes btnPulse {

    0%,
    100% {
        box-shadow: 0 0 30px rgba(163, 207, 98, 0.4);
    }

    50% {
        box-shadow: 0 0 50px rgba(163, 207, 98, 0.7);
        transform: scale(1.02);
    }
}

.epic-btn:hover {
    background: #fff;
    color: #000;
}

section {
    padding: 4rem 10%;
    scroll-margin-top: 80px;
    border-top: 1px solid rgba(163, 207, 98, 0.15);
    position: relative;
    background-color: #0b0f07;
}

section:nth-of-type(even) {
    background-color: #0d120a;
}

section h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2.5rem;
    color: var(--para-gold);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
}

.officer-list {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
}

@media (max-width: 900px) {
    .officer-list {
        grid-template-columns: 1fr;
    }
}

.officer-card {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(163, 207, 98, 0.1);
}

.officer-card:last-child {
    border-bottom: none;
}

.officer-card h3 {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--para-gold);
    margin: 0;
    letter-spacing: 1px;
}

.role {
    font-size: 0.8rem;
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 1rem 0;
}

.officer-body {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.officer-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 2px solid rgba(163, 207, 98, 0.3);
    flex-shrink: 0;
}

.officer-quote {
    font-style: italic;
    font-size: 1.25rem;
    color: #eee;
    line-height: 1.5;
    margin: 0;
    max-width: 700px;
}



.enlist-cta {
    text-align: center;
    background: linear-gradient(135deg, rgba(163, 207, 98, 0.05) 0%, rgba(10, 15, 8, 0.9) 100%);
    padding: 6rem 3rem;
    margin-top: 6rem;
    position: relative;
    border: 1px solid rgba(163, 207, 98, 0.1);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
}

.enlist-cta h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--para-gold);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(163, 207, 98, 0.3);
}

.enlist-cta p {
    font-size: 1.1rem;
    color: #999;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

/* Tactical Corner Accents */
.enlist-cta::before,
.enlist-cta::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 2px solid var(--para-gold);
}

.enlist-cta::before {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
}

.enlist-cta::after {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
}

.enlist-cta .btn.primary {
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    background: var(--para-gold);
    color: #000;
    border: none;
    font-weight: 900;
    box-shadow: 0 0 20px rgba(163, 207, 98, 0.4);
    letter-spacing: 3px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.enlist-cta .btn.primary:hover {
    background: #fff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(163, 207, 98, 0.6);
}

/* Gallery Styles */
.gallery-section {
    background-color: #050804;
}

.gallery-category {
    margin-bottom: 4rem;
    padding: 1rem 0;
    border: none;
    background: transparent;
}

.gallery-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--para-gold);
}

.gallery-category h3 {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 1.2rem;
    color: var(--para-gold);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gallery-category h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(163, 207, 98, 0.1), transparent);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.gallery-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border: 1px solid rgba(163, 207, 98, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-img:hover {
    transform: scale(1.02);
    border-color: var(--para-gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

#game {
    background: #050804;
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
}

.game-ui {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 2.5rem;
    margin-top: 2rem;
}

canvas {
    background: #0f140a;
    border: 2px solid rgba(163, 207, 98, 0.2);
    display: block;
    width: 540px;
    /* Matches 9 cols @ 60px */
    height: 600px;
    /* Matches 10 rows @ 60px */
}

.game-main {
    flex: 0 0 540px;
    position: relative;
    overflow: hidden;
}

#game-message {
    position: absolute;
    top: 15%;
    /* Higher up so it doesn't block the center as much */
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    text-align: center;
    pointer-events: none;
    font-family: 'Black Ops One', cursive;
    font-size: 2rem;
    /* Slightly smaller */
    text-transform: uppercase;
    letter-spacing: 5px;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

#game-message.active {
    opacity: 0.7;
    /* Semi-transparent */
    animation: tacticalGlitch 0.4s ease-out;
}

@keyframes tacticalGlitch {
    0% {
        transform: translate(-50%, -45%) scale(1.1);
        filter: blur(10px);
        opacity: 0;
    }

    50% {
        transform: translate(-50%, -52%) scale(0.95);
        filter: contrast(2);
        opacity: 0.8;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        filter: blur(0);
        opacity: 1;
    }
}

.game-controls {
    flex: 0 0 280px;
    background: transparent;
    padding: 0;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.stat-card.compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(163, 207, 98, 0.05);
    border: 1px solid rgba(163, 207, 98, 0.1);
}

.stat-card.compact label {
    margin-bottom: 0;
    font-size: 0.7rem;
    opacity: 0.6;
}

.stat-card.compact span {
    font-size: 1.2rem;
}

.input-group {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 0px;
    border: 1px solid rgba(163, 207, 98, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

#coords {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    padding: 0.8rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
}

#fireBtn {
    height: 100%;
    border-radius: 0;
    border: none;
    background: var(--para-gold);
    color: #000;
}

#startBtn {
    width: 100%;
}

.legend {
    background: transparent;
    padding: 0;
    border: none;
}

.legend h4 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--para-gold);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.legend ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.legend li {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 12px;
}

.dot.enemy {
    background: #3498db;
}

.dot.friendly {
    background: var(--colonial-green);
}

.dot.townhall {
    background: #fff;
    border: 1px solid var(--colonial-green);
}

/* Tab System */
.tab-view {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* Combat Archives Section */
.archive-section {
    background-color: #0d120a;
    padding-bottom: 2rem;
}

.archive-intro {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 3rem;
}

.archive-card {
    background: rgba(163, 207, 98, 0.03);
    border: 1px solid rgba(163, 207, 98, 0.1);
    border-radius: 4px;
    overflow: hidden;
    transition: var(--transition);
}

.archive-card:hover {
    border-color: var(--para-gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.archive-info {
    padding: 1.5rem;
}

.archive-info h4 {
    color: var(--para-gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.archive-info p {
    font-size: 0.9rem;
    color: #999;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .archive-grid {
        grid-template-columns: 1fr;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background: #050804;
    border-top: 1px solid #222;
    color: #666;
}