/* === AUGMENTED DEFENSE - Dark Military-Tech Theme === */

/* --- Base --- */
body {
    background-color: #0d1117;
    color: #c9d1d9;
}

.body-content {
    margin-top: 25px;
    padding-left: 15px;
    padding-right: 15px;
}

@media screen and (min-width: 768px) {
    .body-content {
        padding: 0;
    }
}

a {
    color: #00d4ff;
}
a:hover {
    color: #33e0ff;
}

hr {
    border-color: #30363d;
    opacity: 0.5;
}

/* --- Navbar --- */
.navbar {
    background-color: #010409 !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15);
}

.navbar-brand {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00d4ff !important;
    font-size: 1.1rem;
}

.navbar-nav .nav-link {
    color: #8b949e !important;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.navbar-nav .nav-link:hover {
    color: #c9d1d9 !important;
}

/* --- Cards --- */
.card {
    background-color: #161b22;
    border: 1px solid #30363d;
    color: #c9d1d9;
}

.card-header {
    background-color: #1c2128;
    border-bottom-color: #30363d;
    color: #c9d1d9;
}

.card-header.bg-primary {
    background-color: rgba(0, 212, 255, 0.15) !important;
    border-left: 3px solid #00d4ff;
    color: #00d4ff;
}

.card-header.bg-danger {
    background-color: rgba(255, 107, 53, 0.15) !important;
    border-left: 3px solid #ff6b35;
    color: #ff6b35;
}

/* --- List Groups --- */
.list-group-item {
    background-color: #161b22;
    border-color: #30363d;
    color: #c9d1d9;
}

.list-group-item:hover {
    background-color: #1c2128;
}

/* --- Buttons --- */
.btn-primary {
    background-color: #00d4ff;
    border-color: #00d4ff;
    color: #0d1117;
    font-weight: 600;
}
.btn-primary:hover {
    background-color: #33e0ff;
    border-color: #33e0ff;
    color: #0d1117;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.btn-outline-primary {
    border-color: #00d4ff;
    color: #00d4ff;
}
.btn-outline-primary:hover {
    background-color: #00d4ff;
    color: #0d1117;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.btn-danger {
    background-color: #ff6b35;
    border-color: #ff6b35;
    color: #0d1117;
    font-weight: 600;
}
.btn-danger:hover {
    background-color: #ff8555;
    border-color: #ff8555;
    color: #0d1117;
}

.btn-outline-danger {
    border-color: #ff6b35;
    color: #ff6b35;
}
.btn-outline-danger:hover {
    background-color: #ff6b35;
    color: #0d1117;
    box-shadow: 0 0 12px rgba(255, 107, 53, 0.3);
}

.btn-success {
    background-color: #2ea043;
    border-color: #2ea043;
}
.btn-success:hover {
    background-color: #3fb950;
    border-color: #3fb950;
    box-shadow: 0 0 8px rgba(46, 160, 67, 0.3);
}

.btn-outline-success {
    border-color: #2ea043;
    color: #2ea043;
}
.btn-outline-success:hover {
    background-color: #2ea043;
    color: #ffffff;
}

.btn-outline-secondary {
    border-color: #484f58;
    color: #8b949e;
}
.btn-outline-secondary:hover {
    background-color: #484f58;
    color: #c9d1d9;
}

.btn-warning {
    background-color: #d29922;
    border-color: #d29922;
    color: #0d1117;
}

.btn-outline-light {
    border-color: #484f58;
    color: #c9d1d9;
}
.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: #8b949e;
}

/* --- Forms --- */
.form-control, .form-select {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}
.form-control:focus, .form-select:focus {
    background-color: #0d1117;
    border-color: #00d4ff;
    color: #c9d1d9;
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.15);
}

.form-label {
    color: #8b949e;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="select"] {
    max-width: 280px;
}

/* --- Badges --- */
.badge.bg-secondary {
    background-color: #30363d !important;
    color: #c9d1d9;
}

.badge.bg-info {
    background-color: rgba(0, 212, 255, 0.2) !important;
    color: #00d4ff;
}

.badge.bg-warning {
    background-color: rgba(210, 153, 34, 0.2) !important;
    color: #d29922;
}

.badge.bg-success {
    background-color: rgba(46, 160, 67, 0.2) !important;
    color: #3fb950;
}

.badge.bg-danger {
    background-color: rgba(255, 107, 53, 0.2) !important;
    color: #ff6b35;
}

/* --- Alerts --- */
.alert-danger {
    background-color: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
    color: #ff6b35;
}

.alert-warning {
    background-color: rgba(210, 153, 34, 0.1);
    border-color: rgba(210, 153, 34, 0.3);
    color: #d29922;
}

/* --- Footer --- */
footer p {
    color: #484f58;
}

/* --- Landing Page --- */
.landing-hero {
    text-align: center;
    padding: 80px 0 40px;
}

.landing-hero h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #00d4ff;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.landing-hero .lead {
    color: #8b949e;
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.landing-hero .btn {
    padding: 12px 40px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.feature-strip {
    padding: 40px 0;
    border-top: 1px solid #30363d;
}

.feature-strip h3 {
    color: #c9d1d9;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-strip .feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

.feature-strip p {
    color: #8b949e;
    font-size: 0.9rem;
}

/* --- Game HUD Bar --- */
#gameHud {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 8px 16px;
    font-family: 'Consolas', 'Courier New', monospace;
}

#gameHud .badge {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    padding: 5px 10px;
}

/* --- Game Canvas --- */
#gameCanvas {
    border-left: 1px solid #30363d;
    border-right: 1px solid #30363d;
}

/* --- Game Bottom Toolbar --- */
#gameToolbar {
    background-color: #161b22;
    border: 1px solid #30363d;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 8px 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: 52px;
}

#towerInfoPanel {
    flex: 0 0 auto;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

#towerInfoPanel .tower-stats {
    color: #8b949e;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.8rem;
}

#towerInfoPanel .tower-actions {
    display: flex;
    gap: 6px;
}

#towerInfoPanel .tower-next {
    color: #484f58;
    font-size: 0.75rem;
}

#shopPanel {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

#shopPanel .shop-section-label {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 8px;
}

#shopPanel .shop-divider {
    width: 1px;
    align-self: stretch;
    background-color: #30363d;
    margin: 0 8px;
}

/* --- GameRoom --- */
.team-card-friendly .card-header {
    background-color: rgba(0, 212, 255, 0.1) !important;
    border-left: 3px solid #00d4ff;
    color: #00d4ff !important;
}

.team-card-enemy .card-header {
    background-color: rgba(255, 107, 53, 0.1) !important;
    border-left: 3px solid #ff6b35;
    color: #ff6b35 !important;
}

/* --- GCD Sweep Overlay (WoW-style radial cooldown) --- */
@property --gcd-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.gcd-active .btn {
    position: relative;
    overflow: hidden;
}

.gcd-active .btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: conic-gradient(from -90deg, transparent var(--gcd-angle), rgba(0, 0, 0, 0.5) var(--gcd-angle));
    pointer-events: none;
    animation: gcd-sweep 1s linear forwards;
}

@keyframes gcd-sweep {
    from { --gcd-angle: 0deg; }
    to { --gcd-angle: 360deg; }
}

/* --- Fullscreen Game Mode === */
#gameContainer:fullscreen,
#gameContainer:-webkit-full-screen {
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#gameContainer:fullscreen #gameCanvas,
#gameContainer:-webkit-full-screen #gameCanvas {
    border: none;
}

#gameContainer:fullscreen #gameHud,
#gameContainer:-webkit-full-screen #gameHud {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    margin: 0;
    background-color: rgba(22, 27, 34, 0.85);
    border: 1px solid #30363d;
    border-radius: 6px;
}

#gameContainer:fullscreen #gameToolbar,
#gameContainer:-webkit-full-screen #gameToolbar {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    margin: 0;
    background-color: rgba(22, 27, 34, 0.85);
    border: 1px solid #30363d;
    border-radius: 6px;
    max-width: 90%;
}

/* --- Misc --- */
.dl-horizontal dt {
    white-space: normal;
}

.text-muted {
    color: #484f58 !important;
}

/* === About Page - Hypermodern === */
.about-page {
    position: relative;
    padding: 40px 0 80px;
    color: #c9d1d9;
}

.about-page::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 80%);
    z-index: 0;
}

.about-page > * {
    position: relative;
    z-index: 1;
}

.about-eyebrow {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #00d4ff;
    opacity: 0.85;
    margin-bottom: 12px;
}

.about-eyebrow::before {
    content: '// ';
    opacity: 0.5;
}

/* --- Hero --- */
.about-hero {
    text-align: center;
    padding: 60px 0 40px;
}

.about-hero h1 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin: 0 0 20px;
    background: linear-gradient(100deg, #00d4ff 0%, #c9d1d9 45%, #00d4ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: about-shimmer 8s linear infinite;
    text-shadow: 0 0 60px rgba(0, 212, 255, 0.15);
}

@keyframes about-shimmer {
    to { background-position: 200% center; }
}

.about-hero .lead {
    color: #8b949e;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.6;
}

.about-hero-rule {
    width: 120px;
    height: 1px;
    margin: 32px auto 0;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.5);
}

/* --- Section --- */
.about-section {
    padding: 48px 0;
    border-top: 1px solid rgba(48, 54, 61, 0.6);
}

.about-section h2 {
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 0.04em;
    color: #c9d1d9;
    margin: 0 0 20px;
}

.about-section p {
    color: #8b949e;
    line-height: 1.7;
    max-width: 820px;
}

.about-section p strong {
    color: #c9d1d9;
    font-weight: 600;
}

/* --- Stat row --- */
.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin: 32px 0 8px;
}

.about-stat {
    padding: 20px 18px;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0.9), rgba(13, 17, 23, 0.9));
    border: 1px solid #30363d;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.about-stat::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    opacity: 0.6;
}

.about-stat-value {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
    line-height: 1;
    letter-spacing: 0.02em;
}

.about-stat-label {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #484f58;
    margin-top: 10px;
}

/* --- Triptych (role cards) --- */
.about-triptych {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.about-role-card {
    padding: 26px 24px;
    background: rgba(22, 27, 34, 0.75);
    border: 1px solid #30363d;
    border-left: 3px solid #00d4ff;
    border-radius: 4px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.about-role-card:hover {
    transform: translateY(-3px);
    border-left-color: #33e0ff;
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.12);
}

.about-role-card.role-human {
    border-left-color: #ff6b35;
}
.about-role-card.role-human:hover {
    border-left-color: #ff8555;
    box-shadow: 0 8px 32px rgba(255, 107, 53, 0.12);
}

.about-role-card.role-both {
    border-left-color: #d29922;
}
.about-role-card.role-both:hover {
    border-left-color: #e6b04a;
    box-shadow: 0 8px 32px rgba(210, 153, 34, 0.12);
}

.about-role-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #c9d1d9;
}

.about-role-card p {
    color: #8b949e;
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

/* --- Protocol block (terminal-styled) --- */
.about-protocol {
    background: #010409;
    border: 1px solid #30363d;
    border-radius: 6px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.92rem;
    padding: 0;
    margin-top: 24px;
    overflow: hidden;
}

.about-protocol-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #161b22;
    border-bottom: 1px solid #30363d;
}

.about-protocol-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #484f58;
}

.about-protocol-header .dot.active {
    background: #00d4ff;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}

.about-protocol-header .label {
    margin-left: auto;
    color: #484f58;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.about-protocol-body {
    padding: 20px 24px;
}

.about-protocol-step {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(48, 54, 61, 0.6);
}

.about-protocol-step:last-child {
    border-bottom: none;
}

.about-protocol-step .step-num {
    color: #484f58;
    font-weight: 700;
}

.about-protocol-step .step-cmd {
    color: #c9d1d9;
}

.about-protocol-step .step-cmd .verb {
    color: #00d4ff;
    margin-right: 8px;
}

.about-protocol-step .step-cmd .path {
    color: #c9d1d9;
}

.about-protocol-step .step-cmd .payload {
    color: #8b949e;
}

.about-protocol-step .step-note {
    grid-column: 2;
    color: #484f58;
    font-size: 0.82rem;
    margin-top: 4px;
}

/* --- Game grid --- */
.about-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.about-game-card {
    padding: 16px 18px;
    background: rgba(22, 27, 34, 0.7);
    border: 1px solid #30363d;
    border-radius: 4px;
    transition: border-color 0.2s, background 0.2s;
}

.about-game-card:hover {
    border-color: rgba(0, 212, 255, 0.5);
    background: rgba(22, 27, 34, 0.95);
}

.about-game-card .game-name {
    font-weight: 700;
    color: #c9d1d9;
    font-size: 0.98rem;
    margin-bottom: 4px;
}

.about-game-card .game-kind {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #00d4ff;
}

.about-game-card.kind-human .game-kind { color: #ff6b35; }
.about-game-card.kind-sim .game-kind { color: #d29922; }

/* --- CTA row --- */
.about-cta {
    text-align: center;
    padding: 56px 0 20px;
}

.about-cta .btn {
    padding: 12px 36px;
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 8px 12px;
}

/* --- Signal footer --- */
.about-signal {
    text-align: center;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #484f58;
    padding: 32px 0 0;
    border-top: 1px solid rgba(48, 54, 61, 0.4);
    margin-top: 40px;
}

.about-signal span {
    display: inline-block;
    padding: 0 14px;
}

.about-signal span + span {
    border-left: 1px solid #30363d;
}
