/* ==========================================================================
   TEXAS ALLIANCE OF GAMERS - MAIN STYLESHEET
   Change the colors in :root below to re-theme the whole site.
   ========================================================================== */

:root {
    --bg:           #08080d;   /* page background (near black) */
    --card:         #12121a;   /* card / panel background */
    --muted:        #20202b;   /* inputs, subtle panels */
    --border:       #2a2a33;   /* lines and borders */
    --text:         #e6ebf0;   /* main text */
    --text-muted:   #838c96;   /* secondary text */

    --blue:         #00d4ff;   /* primary accent (light blue) */
    --red:          #ff1a1a;   /* secondary accent (red) */
    --green:        #34d399;
    --discord:      #5865f2;
    --gold:         #facc15;
    --silver:       #d1d5db;
    --bronze:       #d97706;

    --font-display: 'Orbitron', 'Inter', sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, monospace;

    --radius:       4px;
    --max-width:    1200px;
}


/* ---------- Base ---------- */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

svg.icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: -0.125em;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.text-blue  { color: var(--blue); }
.text-red   { color: var(--red); }
.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }

.glow-text-blue {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
}

.glow-text-red {
    text-shadow: 0 0 10px rgba(255, 26, 26, 0.5), 0 0 30px rgba(255, 26, 26, 0.2);
}

/* Faint blue grid used behind most sections */
.grid-bg {
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}


/* ---------- Navigation bar ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(8, 8, 13, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(42, 42, 51, 0.5);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: filter 0.25s;
}

.brand:hover img {
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6));
}

.brand span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a.active {
    color: var(--blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.nav-links a.nav-discord {
    margin-left: 8px;
    color: var(--discord);
}

.nav-links a.nav-discord:hover {
    color: #7289da;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    padding: 8px;
    cursor: pointer;
}

.menu-toggle:hover {
    color: var(--text);
}

@media (max-width: 1023px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        background: rgba(8, 8, 13, 0.97);
        border-top: 1px solid rgba(42, 42, 51, 0.5);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a.nav-discord {
        margin-left: 0;
    }
}


/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.25s;
}

.btn-primary {
    background: var(--blue);
    color: var(--bg);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3), 0 0 30px rgba(0, 212, 255, 0.1);
}

.btn-primary:hover {
    background: rgba(0, 212, 255, 0.9);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4), 0 0 60px rgba(0, 212, 255, 0.15);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-discord-outline {
    color: var(--discord);
    border-color: rgba(88, 101, 242, 0.4);
}

.btn-discord-outline:hover {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.6);
}

.btn-discord {
    background: var(--discord);
    color: #fff;
    padding: 10px 24px;
}

.btn-discord:hover {
    background: #4752c4;
}


/* ---------- Hero (home page) ---------- */

.hero {
    position: relative;
    min-height: 63vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.hero-orb.blue {
    top: 25%;
    left: 25%;
    width: 384px;
    height: 384px;
    background: rgba(0, 212, 255, 0.05);
}

.hero-orb.red {
    bottom: 25%;
    right: 25%;
    width: 320px;
    height: 320px;
    background: rgba(255, 26, 26, 0.05);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 64px;
}

.hero-logo {
    width: 192px;
    height: 192px;
    margin: 0 auto 32px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(0, 212, 255, 0.35));
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(36px, 7vw, 72px);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-tagline {
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: clamp(16px, 2vw, 20px);
    letter-spacing: 0.3em;
    color: var(--text-muted);
}

.hero-buttons {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}


/* ---------- Stat strip (home page) ---------- */

.stats {
    background: rgba(32, 32, 43, 0.3);
    border-top: 1px solid rgba(42, 42, 51, 0.5);
    border-bottom: 1px solid rgba(42, 42, 51, 0.5);
    padding: 40px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(28px, 4vw, 40px);
    color: var(--blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5), 0 0 30px rgba(0, 212, 255, 0.2);
}

.stat-label {
    margin-top: 4px;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ---------- Sections and page headers ---------- */

.section {
    padding: 80px 0;
}

.section-alt {
    background: rgba(32, 32, 43, 0.2);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(24px, 3vw, 30px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header p {
    margin-top: 4px;
    font-size: 14px;
    color: var(--text-muted);
}

.view-all {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--blue);
}

.view-all:hover {
    opacity: 0.8;
}

.page {
    min-height: 100vh;
    padding: 80px 0 64px;
}

.page-header {
    padding: 40px 0;
}

.page-header h1 {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(30px, 4vw, 36px);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header p {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-muted);
}


/* ---------- Cards ---------- */

.card {
    background: var(--card);
    border: 1px solid rgba(42, 42, 51, 0.5);
    border-radius: var(--radius);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.card:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

.card.glow-on-hover:hover {
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3), 0 0 30px rgba(0, 212, 255, 0.1);
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}


/* ---------- Game cards ---------- */

.game-card {
    overflow: hidden;
}

.game-image {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--muted);
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.game-card:hover .game-image img {
    transform: scale(1.05);
}

.game-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 13, 0.85), transparent 60%);
}

.game-info {
    padding: 16px;
}

.game-info h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
}

.game-meta {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}


/* ---------- Badges / tags ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.05em;
    border: 1px solid;
    border-radius: 2px;
}

.badge-blue  { color: var(--blue);  background: rgba(0, 212, 255, 0.1);  border-color: rgba(0, 212, 255, 0.3); }
.badge-red   { color: var(--red);   background: rgba(255, 26, 26, 0.1);  border-color: rgba(255, 26, 26, 0.3); }
.badge-green { color: var(--green); background: rgba(52, 211, 153, 0.1); border-color: rgba(52, 211, 153, 0.3); }


/* ---------- Members ---------- */

.member-card {
    padding: 20px;
    text-align: center;
}

.member-avatar {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: rgba(131, 140, 150, 0.5);
    font-size: 30px;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    word-break: break-word;
}

.member-card .badge {
    margin-top: 8px;
}


/* ---------- News & events ---------- */

.news-card {
    padding: 24px;
}

.news-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.news-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.news-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 17px;
    letter-spacing: 0.02em;
}

.news-card p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.news-card.small {
    padding: 20px;
}

.news-card.small h3 {
    font-size: 14px;
}

.news-card.small p {
    font-size: 12px;
}


/* ---------- Filter buttons (news page) ---------- */

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 32px;
    color: var(--text-muted);
}

.filter-btn {
    padding: 6px 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: none;
    border: 1px solid rgba(42, 42, 51, 0.5);
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    color: var(--text);
    border-color: var(--border);
}

.filter-btn.active {
    color: var(--blue);
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.4);
}

.hidden {
    display: none !important;
}


/* ---------- Leaderboard ---------- */

.leaderboard {
    overflow: hidden;
}

.lb-row {
    display: grid;
    grid-template-columns: 70px 1fr 110px 110px 90px;
    gap: 8px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(42, 42, 51, 0.3);
    border-left: 2px solid transparent;
    font-size: 14px;
}

.lb-row:hover {
    background: rgba(32, 32, 43, 0.3);
}

.lb-head {
    background: rgba(32, 32, 43, 0.5);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.lb-head:hover {
    background: rgba(32, 32, 43, 0.5);
}

.lb-rank {
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.lb-name {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.05em;
    word-break: break-word;
}

.lb-num {
    font-family: var(--font-mono);
}

.lb-row.gold   { background: rgba(250, 204, 21, 0.08); border-left-color: var(--gold); }
.lb-row.silver { background: rgba(209, 213, 219, 0.08); border-left-color: var(--silver); }
.lb-row.bronze { background: rgba(217, 119, 6, 0.08);   border-left-color: var(--bronze); }

.lb-row.gold   .lb-rank,
.lb-row.gold   .lb-name { color: var(--gold); }
.lb-row.silver .lb-rank,
.lb-row.silver .lb-name { color: var(--silver); }
.lb-row.bronze .lb-rank,
.lb-row.bronze .lb-name { color: var(--bronze); }

@media (max-width: 639px) {
    .lb-row {
        grid-template-columns: 50px 1fr 70px;
    }

    .lb-row .lb-hide-mobile {
        display: none;
    }
}


/* ---------- Join page ---------- */

.join-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 1024px) {
    .join-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.join-grid h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
}

.benefit {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    margin-bottom: 16px;
}

.benefit-icon {
    padding: 8px;
    font-size: 20px;
    color: var(--blue);
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 2px;
    display: flex;
}

.benefit h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
}

.benefit p {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.requirements {
    margin-top: 24px;
    padding: 16px;
    background: rgba(32, 32, 43, 0.3);
    border: 1px solid rgba(42, 42, 51, 0.5);
    border-radius: var(--radius);
}

.requirements h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.requirements li {
    list-style: none;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.requirements li::before {
    content: '• ';
}

.join-form {
    padding: 24px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 10px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text);
    background: rgba(32, 32, 43, 0.5);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s;
    resize: none;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(131, 140, 150, 0.5);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(0, 212, 255, 0.5);
}

.join-form .btn {
    width: 100%;
}

.form-note {
    margin-top: 16px;
    text-align: center;
    font-size: 10px;
    color: rgba(131, 140, 150, 0.6);
}

.form-error {
    margin-bottom: 16px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--red);
    background: rgba(255, 26, 26, 0.08);
    border: 1px solid rgba(255, 26, 26, 0.3);
    border-radius: var(--radius);
}

.form-success {
    padding: 40px;
    text-align: center;
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3), 0 0 30px rgba(0, 212, 255, 0.1);
}

.form-success .success-icon {
    font-size: 48px;
    color: var(--blue);
    margin-bottom: 16px;
}

.form-success h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.05em;
}

.form-success p {
    margin: 8px 0 24px;
    font-size: 14px;
    color: var(--text-muted);
}


/* ---------- Footer ---------- */

.footer {
    background: var(--bg);
    border-top: 1px solid rgba(42, 42, 51, 0.5);
    padding: 40px 0;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.1em;
}

.footer-links {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--text-muted);
}

.footer-links a {
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: rgba(131, 140, 150, 0.6);
}

@media (max-width: 767px) {
    .footer-top {
        flex-direction: column;
    }
}


/* ---------- Scroll-in animation ---------- */

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ---------- Scrollbar ---------- */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.5);
}
