:root {
    --primary-color: #00d2ff;
    --accent-color: #ff3e3e;
    --bg-dark: #0b0e14;
    /* Deep gaming black */
    --bg-darker: #151922;
    /* Slightly lighter dark for cards */
    --text-main: #ffffff;
    /* White text */
    --text-muted: #cbd5e0;
    /* Light gray text */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Pixel-art image rendering */
img[src*="chars"],
.character-gallery img,
.community-char-bob,
.community-char-veil {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Typography */
h1,
h2,
h3,
h4,
.btn {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Header */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 5%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.logo-container {
    flex-shrink: 0;
    position: relative;
    padding: 10px 16px;
}

.logo-container::before {
    content: "";
    position: absolute;
    inset: -18px;
    background: rgba(0, 0, 0, 0.55);
    filter: blur(18px);
    opacity: 0.9;
    pointer-events: none;
    border-radius: 999px;
    z-index: -1;
}

.logo-link {
    display: block;
}

.logo-img {
    width: 200px;
    height: auto;
    display: block;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

.header-spacer {
    flex: 1;
}

.header-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 1.6rem;
}

.social-icon {
    color: white;
    transition: all 0.3s;
}

.social-icon:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transform: scale(1.1);
    transition: transform 0.1s ease-out;
}

.hero-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: block;
}

.play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #000;
    transition: all 0.3s;
    z-index: 10;
}

.play-btn:hover {
    background: white;
    transform: scale(1.1);
}

.hero-bottom-content {
    position: relative;
    z-index: 20;
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    padding-bottom: 100px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 3rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 5px;
}

.hero-newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 500px;
    max-width: 100%;
}

.newsletter-title {
    text-align: right;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.9);
    letter-spacing: 0.5px;
}

.newsletter-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.newsletter-input {
    width: 100%;
    padding: 18px 25px;
    border-radius: 6px;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 1rem;
    color: #333;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.newsletter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.newsletter-submit {
    padding: 15px 35px;
    background: #009ce6;
    color: white;
    font-weight: 800;
    font-family: var(--font-heading);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.newsletter-submit:hover {
    background: #007bb5;
    transform: translateY(-2px);
}

.newsletter-terms {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
    cursor: pointer;
    white-space: nowrap;
}

.newsletter-terms input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #009ce6;
    cursor: pointer;
}

.newsletter-terms a {
    color: #009ce6;
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    min-width: fit-content;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    background: #000;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
}

.btn-primary:hover {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: #00b359;
    color: white;
    border: none;
    font-weight: 700;
}

.btn-secondary:hover {
    background: #00cc55;
}

.btn-blue {
    background: #009ce6;
    color: white;
    border: none;
    font-weight: 700;
}

.btn-blue:hover {
    background: #007bb5;
}

/* SVG Shape Dividers */
.custom-shape-divider-bottom-1689947890,
.shape-divider {
    display: none !important;
}

.shape-divider-top {
    top: 0;
    transform: rotate(180deg);
}

.shape-divider-bottom {
    bottom: -1px;
}

.shape-divider svg {
    display: block;
    width: 100%;
    height: 100px;
}

.shape-fill {
    fill: transparent;
}

.shape-negative .shape-fill {
    fill: var(--bg-dark);
}

/* Welcome Section */
.welcome-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 0;
    /* More padding for breathing room */
}

.welcome-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/gallery/5.png') center/cover no-repeat;
    z-index: 1;
}

.welcome-video {
    display: none;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 14, 20, 0.3) 0%, rgba(11, 14, 20, 0.9) 100%);
    z-index: 2;
}

.welcome-content {
    position: relative;
    z-index: 3;
    text-align: center;
    /* Center the text */
    padding: 0 2rem;
    max-width: 900px;
    margin: 0 auto 4rem auto;
    /* Bottom margin for spacing from cards */
}

.welcome-title {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    color: white;
    /* White text for contrast */
}

.welcome-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

.welcome-text p {
    margin-bottom: 1rem;
}

.welcome-text strong {
    color: #ffd700;
}

/* Features Section */
.features-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--bg-dark), #151922);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    position: relative;
    /* Ensure it sits above overlay */
    z-index: 3;
}

.feature-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.feature-video {
    width: 100%;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    cursor: pointer;
}

.video-play-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #000;
    transition: all 0.3s;
}

.video-play-btn:hover {
    background: white;
    transform: scale(1.1);
}

.hosted-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hosted-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-img-static,
.feature-video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.feature-card:hover .feature-img-static,
.feature-card:hover .feature-video-element {
    transform: scale(1.05);
}

.feature-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 1px;
}

.feature-description {
    color: #cbd5e0;
    /* Light gray for readability on dark bg */
    font-size: 1rem;
    line-height: 1.6;
    flex: 1;
}

/* Characters Section */
/* Characters Section */
.characters-section {
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
    color: white;
    background-color: #0b0e14;
    /* Solid dark base behind the image */
}

.characters-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/gallery/5.png') center/cover no-repeat;
    opacity: 0.2;
    /* Faint image overlay */
    z-index: 0;
    pointer-events: none;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

.character-card {
    background: rgba(11, 14, 20, 0.8);
    /* Dark glass base */
    border: 1px solid rgba(0, 210, 255, 0.1);
    border-radius: 4px;
    /* Small radius, rely on clip-path for shape */
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    /* Chamfered edges for tactical look */
    clip-path: polygon(20px 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%, 0 20px);
    backdrop-filter: blur(10px);
}

/* Tech border corners */
.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 210, 255, 0.0);
    /* Invisible default */
    z-index: 1;
    pointer-events: none;
    transition: border-color 0.3s;
}

/* Active State / Hover State */
.character-card.active,
.character-card:hover {
    background: rgba(11, 14, 20, 0.95);
    border-color: rgba(0, 210, 255, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.15);
}

.character-card.active::after,
.character-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
    z-index: 2;
}

/* Add bottom right corner accent */
.card-glow {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    border-bottom: 2px solid transparent;
    border-right: 2px solid transparent;
    transition: all 0.3s;
    z-index: 2;
}

.character-card.active .card-glow,
.character-card:hover .card-glow {
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
}


.character-img-container {
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
    position: relative;
}

.character-card:hover .character-img-container,
.character-card.active .character-img-container {
    border-color: rgba(0, 210, 255, 0.8);
    box-shadow: inset 0 0 20px rgba(0, 210, 255, 0.2);
}

.character-portrait {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full character visibility */
    transition: transform 0.5s ease;
    filter: grayscale(0.4) contrast(1.1);
}

.character-card:hover .character-portrait,
.character-card.active .character-portrait {
    transform: scale(1.08);
    filter: grayscale(0) contrast(1.2) drop-shadow(0 0 10px rgba(0, 210, 255, 0.3));
}

.character-model {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.08), transparent 70%);
}

.character-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 3;
}

.character-loading.visible {
    opacity: 1;
}

/* Model Modal */
.model-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.model-modal.active {
    display: flex;
}

.model-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
}

.model-modal-body {
    position: relative;
    width: min(90vw, 900px);
    height: min(80vh, 700px);
    background: #05070a;
    border: 1px solid rgba(0, 210, 255, 0.25);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    border-radius: 10px;
    overflow: hidden;
    z-index: 1;
}

.model-modal-viewer {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 210, 255, 0.12), transparent 60%), #0b0e14;
}

.model-modal-controls {
    position: absolute;
    top: 5px;
    left: 723px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 3;
}

.model-modal-toggle,
.model-modal-close {
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.model-modal-close {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 1.2rem;
    line-height: 1;
}

.model-modal-toggle:hover,
.model-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.03);
}

.model-modal-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.5px;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.model-modal-loading.visible {
    opacity: 1;
}

.model-modal-close {
    position: absolute;
    top: 4px;
    left: 111px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2;
    transition: background 0.2s, transform 0.2s;
}

.model-modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.05);
}

.character-name {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.character-card.active .character-name,
.character-card:hover .character-name {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.character-role {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}

.character-card.active .character-role,
.character-card:hover .character-role {
    color: #fff;
    background: var(--primary-color);
}

.character-lore {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
}

.characters-section .container {
    position: relative;
    z-index: 1;
}

.section-divider {
    text-align: center;
    margin-bottom: 4rem;
}

.divider-title {
    font-size: 3rem;
    position: relative;
    display: inline-block;
    padding: 0 2rem;
}

.divider-title::before,
.divider-title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 100px;
    height: 2px;
    background: var(--text-muted);
    /* Auto-updates to light gray */
}

.divider-title::before {
    right: 100%;
    margin-right: 1rem;
}

.divider-title::after {
    left: 100%;
    margin-left: 1rem;
}

.characters-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 4rem;
}

.character-item {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.character-name {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.character-mobile-img {
    text-align: center;
}

.character-mobile-img img {
    width: 132px;
    height: 132px;
    object-fit: cover;
    border-radius: 8px;
}


.character-gallery {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 1rem;
}

.character-gallery .gallery-item {
    width: 132px;
    height: 132px;
    overflow: hidden;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s;
}

.character-gallery .gallery-item:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.character-gallery .gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.character-gallery .gallery-item:hover img {
    transform: scale(1.05);
}

.character-video {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.character-video-element {
    width: 100%;
    height: auto;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.character-description {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

.character-description strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Collect/Craft Section */
.collect-craft-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.slideshow-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slideshow-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.299s ease-in-out;
}

.slideshow-slide.active {
    opacity: 1;
}

.collect-craft-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 800px;
}

.collect-craft-content .section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.collect-craft-text {
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Media Gall/* Media Section */
.media-section {
    padding: 6rem 0;
    position: relative;
    background: url('/images/bg_media_action.webp') center/cover no-repeat fixed;
    text-align: center;
    overflow: hidden;
}

.media-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Dark overlay for text readability */
    z-index: 1;
}

.media-section .container {
    position: relative;
    z-index: 2;
}

.media-gallery {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    /* Increased gap */
    margin-top: 3rem;
    padding: 0 1rem;
}

.media-item {
    position: relative;
    display: block;
    width: 100%;
    /* Aspect Ratio 16:9 for consistent rectangles */
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #0b0e14;
    /* Dark bg for letterboxing */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/*
.media-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s;
}
*/

.media-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-item:hover .media-image {
    transform: scale(1.1);
}

.media-item:hover .media-overlay {
    opacity: 1;
}

/* Community Section */
.community-section {
    padding: 8rem 0 6rem 0;
    position: relative;
    overflow: hidden;
}

.community-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/bg_env_campfire.webp') center/cover no-repeat;
    opacity: 0.6;
    /* Slightly visible background */
    z-index: 0;
    pointer-events: none;
}

.community-section .container {
    position: relative;
    z-index: 20;
}

.community-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 3rem;
}

.community-left,
.community-right {
    flex: 1;
}

.community-characters {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.community-characters-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.community-char-bob,
.community-char-veil {
    width: 100px;
    height: 100px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.community-left .section-title,
.community-right .section-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.community-text {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.community-text strong {
    color: var(--text-main);
}

.community-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 2rem;
}

.community-socials .social-icon {
    color: var(--text-muted);
    transition: all 0.3s;
}

.community-socials .social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Social Icons */
.header-socials .social-icon {
    color: white;
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Improve visibility against bright background */
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.9));
}

.header-socials .social-icon:hover {
    color: var(--primary-color);
    transform: translateY(-3px) scale(1.1);
    filter: drop-shadow(0 4px 8px rgba(0, 195, 255, 0.6));
}

/* =========================================
   Footer (New Design)
   ========================================= */

.footer {
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95), rgba(5, 5, 5, 0.98)), url('/images/bg_env_ruins.webp') center/cover no-repeat;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5rem 0 2rem;
    position: relative;
    overflow: hidden;
}

/* Background Glow */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center top, rgba(0, 210, 255, 0.08), transparent 60%);
    pointer-events: none;
    z-index: 0;
    /* Explicitly lower */
}

/* Ensure content is above overlay */
.footer .container {
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

/* Brand Column */
.logo-img-sm {
    width: 150px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 210, 255, 0.3));
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-email-link {
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.footer-email-link:hover {
    color: var(--primary-color);
}

/* Headings */
.footer-heading {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

/* Social Grid */
.social-grid {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    /* Techy square */
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: var(--primary-color);
    color: black;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 210, 255, 0.4);
    border-color: var(--primary-color);
}

/* Legal Links */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
    /* Slide effect */
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Bottom Bar */
.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.copyright,
.disclaimer {
    color: #666;
    font-size: 0.85rem;
}

.disclaimer a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s;
}

.disclaimer a:hover {
    color: var(--primary-color);
}

/* Responsive Footer */
@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-desc {
        margin: 0 auto 1.5rem;
    }

    .social-grid {
        justify-content: center;
    }

    .footer-email-link {
        justify-content: center;
    }

    .footer-bottom-bar {
        flex-direction: column;
        text-align: center;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: none;
}

.lightbox-video {
    width: 80vw;
    max-width: 1200px;
    height: 45vw;
    max-height: 675px;
    display: none;
}

.lightbox-image.active,
.lightbox-video.active {
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 10001;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animations */
.fade-in-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .characters-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .community-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .community-characters {
        order: 2;
        margin: 2rem 0;
    }

    .community-left {
        order: 1;
    }

    .community-right {
        order: 3;
    }

    .media-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 5%;
    }

    .logo-img {
        width: 150px;
    }

    .header-socials {
        font-size: 1.2rem;
        gap: 1rem;
    }

    .hero-bottom-content {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 40px;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-newsletter {
        width: 100%;
        align-items: flex-start;
    }

    .newsletter-title {
        text-align: left;
        font-size: 1.8rem;
    }

    .welcome-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .divider-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .media-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-only {
        display: none;
    }
}

/* Utility Classes */
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.section {
    padding: 6rem 0;
}

/* Character Content Wrapper for Grid + Video Layout */
.characters-content-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    max-width: 1400px;
    margin: 3rem auto 0;
}

/* 1. Character List (Top Row) */
.left-character-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns equal width */
    gap: 1.5rem;
    /* Tighter gap */
}

/* 2. Compact Character Card Styles */
.character-card {
    background: rgba(11, 14, 20, 0.8);
    border: 1px solid rgba(0, 210, 255, 0.1);
    border-radius: 4px;
    padding: 1.5rem;
    /* Reduced padding */
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
    backdrop-filter: blur(10px);
    height: 100%;
    /* Uniform height */
    display: flex;
    flex-direction: column;
}

/* Tech border corners */
.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(0, 210, 255, 0.0);
    z-index: 1;
    pointer-events: none;
    transition: border-color 0.3s;
}

/* Active State / Hover State */
.character-card.active,
.character-card:hover {
    background: rgba(11, 14, 20, 0.95);
    border-color: rgba(0, 210, 255, 0.6);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.15);
}

/* Corner Accents */
.character-card.active::after,
.character-card:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 30px;
    height: 30px;
    border-top: 2px solid var(--primary-color);
    border-left: 2px solid var(--primary-color);
    z-index: 2;
}

.card-glow {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 30px;
    height: 30px;
    border-bottom: 2px solid transparent;
    border-right: 2px solid transparent;
    transition: all 0.3s;
    z-index: 2;
}

.character-card.active .card-glow,
.character-card:hover .card-glow {
    border-bottom: 2px solid var(--primary-color);
    border-right: 2px solid var(--primary-color);
}

.character-img-container {
    width: 100%;
    height: 180px;
    /* Reduced Height for Compactness */
    margin-bottom: 1rem;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s ease;
    background: radial-gradient(circle at center, rgba(0, 210, 255, 0.1) 0%, transparent 70%);
}

.character-card:hover .character-img-container,
.character-card.active .character-img-container {
    border-color: rgba(0, 210, 255, 0.8);
    box-shadow: inset 0 0 15px rgba(0, 210, 255, 0.2);
}

.character-portrait {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    filter: grayscale(0.4) contrast(1.1);
}

.character-card:hover .character-portrait,
.character-card.active .character-portrait {
    transform: scale(1.08);
    filter: grayscale(0) contrast(1.2) drop-shadow(0 0 10px rgba(0, 210, 255, 0.3));
}

.character-name {
    font-size: 1.4rem;
    /* Reduced Font Size */
    margin-bottom: 0.2rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.character-card.active .character-name,
.character-card:hover .character-name {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
}

.character-role {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    /* Reduced Font Size */
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.05);
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
}

.character-card.active .character-role,
.character-card:hover .character-role {
    color: #fff;
    background: var(--primary-color);
}

.character-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.character-lore {
    color: var(--text-muted);
    font-size: 0.85rem;
    /* Small text */
    line-height: 1.4;
    opacity: 0.7;
    margin-top: auto;
    /* Push to bottom if needed, or just flow */
}

/* 3. Character Video Wrapper (Bottom - Large) */
.character-video-wrapper {
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.video-frame-styled {
    position: relative;
    border-radius: 4px;
    /* Less rounded, more tech */
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    background: #000;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* "Main Screen" Monitor Look */
.video-frame-styled::before {
    content: 'SIGNAL: ONLINE';
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: var(--font-heading);
    color: #00ff00;
    font-size: 0.8rem;
    letter-spacing: 2px;
    z-index: 10;
    text-shadow: 0 0 5px #00ff00;
    pointer-events: none;
}

.video-frame-styled::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 10px;
    background: var(--primary-color);
    z-index: 10;
    pointer-events: none;
}


.video-frame-styled:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 25px 60px rgba(0, 210, 255, 0.15);
}

.char-featured-video {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 16/9;
    /* Cinematic Ratio */
    object-fit: cover;
}

.video-expand-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: white;
}

.video-expand-overlay i {
    font-size: 1.5rem;
}

.video-expand-overlay span {
    font-size: 0.8rem;
    white-space: nowrap;
}

.video-frame-styled:hover .video-expand-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}


/* Responsive Update */
@media (max-width: 1024px) {
    .characters-content-wrapper {
        gap: 2rem;
    }

    .left-character-list {
        grid-template-columns: repeat(1, 1fr);
        /* Stack cards on mobile/tablet */
    }

    .character-img-container {
        height: 250px;
        /* Larger image on mobile stack */
    }

    .character-video-wrapper {
        width: 100%;
    }

    .character-stage-viewer {
        height: 320px;
    }
}

/* =========================================
   Clean Premium Lightbox Refactor
   ========================================= */

/* Backdrop - Heavy Blur & Dark */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    /* Darker backdrop */
    backdrop-filter: blur(12px);
    /* Heavy Blur */
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

/* Modal Content Container - Clean, No Borders */
.lightbox-content {
    position: relative;
    width: 85%;
    /* Much larger width */
    max-width: 1400px;
    /* Wide cinematic width */
    max-height: 90vh;
    background: transparent;
    /* Transparent container */
    padding: 0;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.9);
    /* Deep shadow */
    border: none;
    clip-path: none;
    display: flex;
    justify-content: center;
}

/* Inner Frame for Video */
.lightbox-video,
.lightbox-local-video {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    /* Force 16:9 ratio */
    max-height: 85vh;
    display: block;
    background: #000;
    border-radius: 4px;
    object-fit: contain;
}

.lightbox-image {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    display: block;
    margin: 0 auto;
    border-radius: 4px;
    object-fit: contain;
}

/* Remove HUD Decor */
.lightbox-content::before,
.lightbox-content::after {
    display: none;
}

/* Close Button - Top Right Floating */
.lightbox-close {
    position: fixed;
    /* Fixed to viewport */
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 2rem;
    /* Larger Icon */
    transition: all 0.3s ease;
    clip-path: none;
    z-index: 10001;
    /* Above everything */
}

.lightbox-close:hover {
    color: #fff;
    transform: rotate(90deg) scale(1.1);
    background: transparent;
    box-shadow: none;
}

/* Navigation Buttons (Minimal) */
.lightbox-prev,
.lightbox-next {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    width: 60px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    /* Fixed to viewport */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 2rem;
    z-index: 10001;
    /* Above content */
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Page Entrance Animation */
@keyframes pageSlideUp {
    0% {
        opacity: 0;
        transform: translateY(80px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-animate-entrance {
    opacity: 0;
    animation: pageSlideUp 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* =========================================
   Media Query for Mobile
   ========================================= */

/* =========================================
   Legal Pages Styling (High-Tech Redesign)
   ========================================= */

.legal-page {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Background Variants */
.legal-page.privacy-bg {
    background: url('/images/bg_env_valley.webp') center/cover no-repeat fixed;
}

.legal-page.terms-bg {
    background: url('/images/hero-tank.webp') center/cover no-repeat fixed;
}

.legal-page.cookie-bg {
    background: url('/images/bg_env_valley.webp') center/cover no-repeat fixed;
}

/* Dark Overlay */
.legal-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 12, 0.85);
    /* Darker overlay */
    backdrop-filter: blur(8px);
    z-index: -1;
}

/* Tech Container */
.legal-container {
    flex: 1;
    max-width: 1000px;
    /* Optimal reading width */
    margin: 120px auto 4rem;
    padding: 4rem 5rem;
    background: linear-gradient(135deg, rgba(12, 20, 35, 0.95) 0%, rgba(20, 35, 50, 0.90) 100%);

    /* Chamfered Corners */
    clip-path: polygon(20px 0, 100% 0,
            100% calc(100% - 20px), calc(100% - 20px) 100%,
            0 100%, 0 20px);

    /* Tech Borders (Simulated via box-shadow inset since clip-path cuts borders) */
    box-shadow: inset 0 0 0 1px rgba(0, 195, 255, 0.2);

    position: relative;
    color: #fff;
}

/* Decorative Tech Corners (Pseudo-elements placed *outside* or differently is tricky with clip-path, 
   so we use a wrapper approach usually, but here we'll use a subtle inset glow) */
.legal-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    box-shadow: inset 0 0 60px rgba(0, 100, 150, 0.15);
    pointer-events: none;
    z-index: 1;
}

/* Header Styling */
.legal-title {
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 3px;
    text-align: center;
    width: 100%;
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 195, 255, 0.6);
    position: relative;
    padding-bottom: 1.5rem;
}

/* Decorative Underline */
.legal-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.legal-date {
    text-align: center;
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
    font-size: 0.9rem;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

/* Content Typography */
.legal-section {
    margin-bottom: 2.5rem;
}

.legal-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary-color);
    /* Orange accent */
    margin-bottom: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-left: 3px solid var(--primary-color);
    padding-left: 15px;
    background: linear-gradient(90deg, rgba(0, 195, 255, 0.1), transparent);
}

.legal-section p,
.legal-section ul li {
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    /* Slate-200ish */
    margin-bottom: 0.8rem;
    font-weight: 300;
}

.legal-section ul {
    list-style: none;
    padding-left: 10px;
}

.legal-section ul li {
    position: relative;
    padding-left: 25px;
}

.legal-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--primary-color);
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 195, 255, 0.5);
    transition: all 0.3s;
}

.legal-section a:hover {
    color: #fff;
    border-bottom-color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Floating Back Button (Top Left) */
.back-link {
    position: fixed;
    top: 110px;
    /* Below fixed header */
    left: 40px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-link:hover {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.4);
    transform: translateX(5px);
}

/* Adjust layout for mobile so fixed button doesn't overlap */
@media (max-width: 1200px) {
    .back-link {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 1rem;
        display: inline-flex;
        background: transparent;
        border: none;
        padding: 0;
    }

    .back-link:hover {
        background: transparent;
        color: var(--primary-color);
        box-shadow: none;
    }
}

.legal-section a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s;
}

.legal-section a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Back Link in Header */
.back-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Responsiveness for Legal Pages */
@media (max-width: 768px) {
    .legal-container {
        margin: 100px 1rem 2rem;
        padding: 1.5rem;
    }

    .legal-title {
        font-size: 2rem;
    }
}

/* =========================================
   Entrance Animations
   ========================================= */

/* Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation Classes - Triggered by .visible */
.anim-fade-down,
.anim-fade-up,
.anim-fade-left,
.anim-fade-right {
    opacity: 0;
    /* Hidden initially */
}

.anim-fade-down.visible {
    animation: fadeInDown 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-fade-up.visible {
    animation: fadeInUp 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.anim-fade-left.visible {
    animation: fadeInLeft 2.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

.delay-700 {
    animation-delay: 0.7s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-1000 {
    animation-delay: 1s;
}

.delay-2000 {
    animation-delay: 2s;
}

.delay-3000 {
    animation-delay: 3s;
}

.delay-800 {
    animation-delay: 0.8s;
}

.delay-900 {
    animation-delay: 0.9s;
}

.delay-1000 {
    animation-delay: 1.0s;
}

.delay-1100 {
    animation-delay: 1.1s;
}

.delay-1200 {
    animation-delay: 1.2s;
}

.delay-1300 {
    animation-delay: 1.3s;
}

.delay-1400 {
    animation-delay: 1.4s;
}

.delay-1600 {
    animation-delay: 1.6s;
}

.delay-1800 {
    animation-delay: 1.8s;
}

.delay-2000 {
    animation-delay: 2.0s;
}

.delay-2200 {
    animation-delay: 2.2s;
}

.delay-2400 {
    animation-delay: 2.4s;
}

.delay-2600 {
    animation-delay: 2.6s;
}

.delay-2800 {
    animation-delay: 2.8s;
}

.delay-3200 {
    animation-delay: 3.2s;
}

.delay-3600 {
    animation-delay: 3.6s;
}

.delay-4400 {
    animation-delay: 4.4s;
}

.delay-4800 {
    animation-delay: 4.8s;
}

/* =========================================
   Character Card Specific Animation
   ========================================= */

@keyframes cardZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(30px);
    }

    60% {
        transform: scale(1.05) translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Override fade-in-scroll for character cards */
.character-card.fade-in-scroll.visible {
    animation: cardZoomIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    /* Bouncy Effect */
}