:root {
    /* OFFICIAL LAST WAR PALETTE */
    --bg-primary: #f0f7ff;
    /* Very light baby blue brand bg */
    --bg-secondary: #ffffff;
    /* Pure white for cards/content */
    --accent-primary: #009dff;
    /* Official brand blue */
    --accent-gold: #f7b500;
    /* Official gold action color */
    --accent-gold-glow: rgba(247, 181, 0, 0.3);

    --text-header: #003a66;
    /* Deep blue for headings */
    --text-primary: #1a1a1a;
    /* Near black for body text */
    --text-secondary: #4a5a6a;
    /* Darker blue-gray for better contrast on light blue */
    --text-on-light: #004d80;
    /* Specific high-contrast blue for text on light backgrounds */

    --border-color: #d1e6ff;
    /* Soft blue borders */
    --card-shadow: 0 4px 20px rgba(0, 58, 102, 0.08);

    --font-heading: 'Outfit', 'Roboto Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 900px;
}

/* 1. TACTICAL HUD OVERLAY (ADAPTED FOR LIGHT THEME) */
.hud-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(0deg, rgba(0, 157, 255, 0.03) 0px, rgba(0, 157, 255, 0.03) 1px, transparent 1px, transparent 4px);
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

/* 4. OPERATIONAL PULSE ANIMATION */
@keyframes tactical-pulse {
    0% {
        filter: drop-shadow(0 0 2px var(--accent-glow));
    }

    50% {
        filter: drop-shadow(0 0 8px var(--accent-color));
    }

    100% {
        filter: drop-shadow(0 0 2px var(--accent-glow));
    }
}

.pulse-active {
    animation: tactical-pulse 3s infinite ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(at 0% 0%, rgba(0, 157, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 157, 255, 0.05) 0px, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    word-wrap: break-word;
}

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

header {
    padding: 15px 0;
    border-bottom: 2px solid var(--accent-primary);
    background: linear-gradient(135deg, #003a66 0%, #005699 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-helmet {
    filter: brightness(0) invert(1);
    /* Make the knight helmet white */
    width: 28px;
    height: 28px;
}

.language-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.lang-link:hover,
.lang-link.active {
    color: var(--accent-color);
    border-color: var(--accent-color);
    background: var(--accent-glow);
}

/* Hide the actual google translate widget */
#google_translate_element,
.skiptranslate,
.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0px !important;
}

.hero {
    text-align: center;
    padding: 60px 0;
}

.hero-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    margin-bottom: 15px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.card-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--accent-primary);
    opacity: 0.8;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 30px rgba(0, 157, 255, 0.15);
}

.card:active {
    transform: scale(0.98);
}

.card h3 {
    color: var(--text-header);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.hero p {
    color: var(--text-secondary) !important;
    font-size: 1.1rem;
    font-weight: 500;
}

.hero p strong {
    color: var(--text-on-light);
    font-weight: 800;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.tutorial-content {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.tutorial-content h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.2;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 157, 255, 0.08);
    color: var(--text-header);
    padding: 12px 20px;
    border-radius: 6px;
    margin: 40px 0 20px 0;
    font-family: var(--font-heading);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1rem;
    border-left: 4px solid var(--accent-primary);
}

.share-guide-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 157, 255, 0.05);
    border-left: 4px solid var(--accent-primary);
    padding: 12px 20px;
    margin-bottom: 30px;
    border-radius: 0 4px 4px 0;
}

.share-guide-label {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--text-header);
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.share-intel {
    background: var(--bg-primary);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    font-family: var(--font-heading);
    text-transform: uppercase;
    transition: all 0.2s;
}

.share-intel:hover {
    background: var(--accent-primary);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 157, 255, 0.2);
}

.share-intel::after {
    content: 'SHARE INTEL';
}

.share-intel.is-copied {
    background: #28a745;
    /* Green for success */
    border-color: #28a745;
    color: #ffffff;
}

.share-intel.is-copied::after {
    content: 'COPIED';
}

ul,
ol {
    padding-left: 20px;
    margin: 20px 0;
}

ul {
    list-style: none;
    padding-left: 0;
    /* Reset for custom bullet logic */
}

ol {
    list-style-position: outside;
    padding-left: 25px;
    /* Ensure numbers have room */
}

li {
    position: relative;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.6;
    text-align: left;
}

/* Default bullets for standard lists */
ul:not(.no-bullets) li:not(.has-icon) {
    padding-left: 25px;
}

ul:not(.no-bullets) li:not(.has-icon)::before {
    content: '•';
    color: var(--accent-primary);
    position: absolute;
    left: 0;
    font-weight: 800;
    font-size: 1.2rem;
    line-height: 1.1;
    /* Adjusted for better alignment */
}

/* Icon lists (automatic or manual) */
li.has-icon {
    padding-left: 0;
}

li.has-icon::before {
    display: none;
}

strong {
    color: var(--text-on-light);
    font-weight: 700;
}

/* Remove the problematic tutorial-specific overrides that were causing spacing issues */
.tutorial-content ul {
    margin: 15px 0;
}

.back-link {
    color: var(--accent-color);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
}

footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* TABLE STYLING */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 25px 0;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--card-bg);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 0.95em;
    font-family: var(--font-body);
}

table thead tr {
    background-color: rgba(247, 181, 0, 0.1);
    /* Subtle tactical amber tint */
    color: var(--accent-color);
    text-align: left;
    font-family: var(--font-heading);
    text-transform: uppercase;
}

table th,
table td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
}

table th {
    white-space: normal;
    /* Allow headers to wrap */
    vertical-align: bottom;
}

table td {
    white-space: nowrap;
    /* Prevent tactical data from wrapping */
    vertical-align: middle;
}

table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

table tbody tr:nth-of-type(even) {
    background-color: rgba(0, 157, 255, 0.03);
    /* Soft blue tint for zebra stripes */
}

table tbody tr:last-of-type {
    border-bottom: 2px solid var(--accent-color);
    /* Strong bottom border */
}

table tbody tr:hover {
    background-color: rgba(247, 181, 0, 0.05);
    /* Hover effect matching theme */
}

@media (max-width: 600px) {
    .card-grid {
        display: block;
    }

    .card {
        margin-bottom: 20px;
    }

    header .container {
        flex-direction: column;
        gap: 15px;
        padding: 15px 0;
    }

    .language-switcher {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .logo {
        flex-direction: column;
        text-align: center;
    }

    .logo-helmet {
        margin-right: 0;
        margin-bottom: 8px;
    }
}