/* ========================================
   OPHELIA ROLEPLAY - CSS Design System
   ======================================== */

/* ---------- CSS Variables ---------- */
:root {
    --red-primary: #B91C1C;
    --red-light: #DC2626;
    --red-dark: #7F1D1D;
    --red-glow: rgba(185, 28, 28, 0.5);
    --red-deep: #991B1B;

    --bg-primary: #0A0A0A;
    --bg-secondary: #111111;
    --bg-card: #161616;
    --bg-card-hover: #1A1A1A;
    --bg-glass: rgba(20, 20, 20, 0.75);

    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    --text-muted: #6B6B6B;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(185, 28, 28, 0.3);

    --font-display: 'Orbitron', sans-serif;
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;

    --nav-height: 72px;
    --container-max: 1280px;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    cursor: default;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

::selection {
    background: var(--red-primary);
    color: white;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--red-primary);
}

/* ---------- Utility ---------- */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.text-red {
    color: var(--red-primary);
}

/* ---------- Preloader ---------- */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    text-align: center;
}

.preloader-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    animation: pulse-glow 1.5s infinite alternate;
}

.preloader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 16px;
}

.preloader-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--red-dark), var(--red-light));
    border-radius: 2px;
    animation: preloader-fill 2s ease-in-out forwards;
}

.preloader-text {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 4px;
    color: var(--text-secondary);
    animation: text-blink 1s infinite alternate;
}

@keyframes preloader-fill {
    to { width: 100%; }
}

@keyframes text-blink {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

@keyframes pulse-glow {
    from {
        filter: drop-shadow(0 0 8px var(--red-glow));
        transform: scale(1);
    }
    to {
        filter: drop-shadow(0 0 24px var(--red-glow));
        transform: scale(1.05);
    }
}

/* ---------- Cursor Glow ---------- */
#cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(185, 28, 28, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
    opacity: 0;
}

body:hover #cursor-glow {
    opacity: 1;
}

/* ---------- Navigation ---------- */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    transition: all 0.4s var(--ease-out-expo);
}

#navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 101;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 8px var(--red-glow));
    transition: transform 0.3s var(--ease-spring);
}

.nav-logo:hover .nav-logo-img {
    transform: rotate(10deg) scale(1.1);
}

.nav-logo-text {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 3px;
}

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

.nav-link {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 8px 16px;
    border-radius: 6px;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background: var(--red-primary);
    border-radius: 1px;
    transition: transform 0.3s var(--ease-out-expo);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
    color: white;
    box-shadow: 0 4px 20px rgba(185, 28, 28, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(185, 28, 28, 0.5);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--red-primary);
    background: rgba(185, 28, 28, 0.1);
    transform: translateY(-2px);
}

.btn-discord {
    background: #5865F2;
    color: white;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.3);
}

.btn-discord:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(88, 101, 242, 0.5);
}

.btn-nav {
    padding: 8px 20px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    border-radius: 10px;
}

.btn-xl {
    padding: 16px 36px;
    font-size: 16px;
    border-radius: 12px;
}

/* ---------- Hamburger ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease-out-expo);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Mobile Menu ---------- */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(10, 10, 10, 0.97);
    backdrop-filter: blur(30px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--ease-out-expo);
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-link {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--text-secondary);
    padding: 12px 24px;
    transition: all 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

.mobile-menu.active .mobile-link {
    transform: translateY(0);
    opacity: 1;
}

.mobile-menu.active .mobile-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu.active .mobile-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-link:hover {
    color: var(--red-primary);
}

.mobile-menu-actions {
    margin-top: 24px;
    transform: translateY(20px);
    opacity: 0;
}

.mobile-menu.active .mobile-menu-actions {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.35s;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: opacity 1.5s ease;
    animation: hero-bg-zoom 20s ease-in-out infinite alternate;
}

@keyframes hero-bg-zoom {
    from { transform: scale(1.05); }
    to { transform: scale(1.15); }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, rgba(10,10,10,0.6) 0%, rgba(10,10,10,0.4) 40%, rgba(10,10,10,0.7) 80%, var(--bg-primary) 100%),
        radial-gradient(ellipse at center top, rgba(185, 28, 28, 0.15) 0%, transparent 60%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(185, 28, 28, 0.5);
    border-radius: 50%;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 24px;
    max-width: 900px;
}

.hero-logo-3d {
    margin: 0 auto 20px;
    width: 120px;
    height: 120px;
    animation: float-logo 4s ease-in-out infinite;
}

.logo-3d-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px var(--red-glow));
}

@keyframes float-logo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* Hero Title */
.hero-title {
    font-family: var(--font-display);
    font-weight: 900;
    margin-bottom: 16px;
    line-height: 1.1;
}

.title-line {
    display: block;
    font-size: clamp(48px, 10vw, 96px);
    letter-spacing: 8px;
}

.title-line-2 {
    font-size: clamp(32px, 6vw, 60px);
    letter-spacing: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(60px) rotateX(-90deg);
    animation: char-reveal 0.8s var(--ease-out-expo) forwards;
    animation-delay: calc(0.05s * var(--i) + 0.5s);
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.1);
}

.char.text-red {
    text-shadow: 0 0 40px var(--red-glow), 0 0 80px var(--red-glow);
    filter: drop-shadow(0 0 20px var(--red-glow));
}

@keyframes char-reveal {
    to {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(16px, 2.5vw, 22px);
    letter-spacing: 6px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    opacity: 0;
    animation: fade-in-up 0.8s var(--ease-out-expo) 1.2s forwards;
    text-transform: uppercase;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 40px;
    opacity: 0;
    animation: fade-in-up 0.8s var(--ease-out-expo) 1.5s forwards;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    color: var(--red-light);
    line-height: 1;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-family: var(--font-heading);
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hero CTA */
.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-in-up 0.8s var(--ease-out-expo) 1.8s forwards;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fade-in-up 0.8s var(--ease-out-expo) 2.2s forwards;
}

.scroll-indicator span {
    font-family: var(--font-heading);
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
}

.scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
}

.scroll-wheel {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 8px;
    background: var(--red-primary);
    border-radius: 2px;
    animation: scroll-wheel 1.5s ease-in-out infinite;
}

@keyframes scroll-wheel {
    0% { transform: translateX(-50%) translateY(0); opacity: 1; }
    100% { transform: translateX(-50%) translateY(12px); opacity: 0; }
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.section-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(185, 28, 28, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(185, 28, 28, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 5px;
    color: var(--red-primary);
    margin-bottom: 12px;
    padding: 6px 16px;
    border: 1px solid rgba(185, 28, 28, 0.3);
    border-radius: 20px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: 4px;
    line-height: 1.2;
}

.section-line {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), var(--red-dark));
    margin: 16px auto 0;
    border-radius: 2px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- About Section ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-text-block h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.about-text-block p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}

.about-features-mini {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.mini-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mini-feature:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.mini-feature-icon {
    color: var(--red-primary);
    display: flex;
}

.mini-feature span {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* About Image */
.about-image {
    position: relative;
}

.about-img-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.about-img-wrapper:hover .about-img {
    transform: scale(1.05);
}

.about-img-border {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 16px;
    pointer-events: none;
}

.about-img-glow {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 40px;
    background: var(--red-primary);
    filter: blur(40px);
    opacity: 0.3;
}

.about-logo-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 2px solid rgba(185, 28, 28, 0.3);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    animation: float-logo 3s ease-in-out infinite;
}

.badge-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ---------- Gallery Section ---------- */
.gallery {
    background: var(--bg-secondary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: all 0.6s var(--ease-out-expo);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-item:nth-child(1),
.gallery-item:nth-child(6),
.gallery-item:nth-child(11) {
    grid-column: span 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--ease-out-expo);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 10, 0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-frame {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover .gallery-item-frame {
    border-color: var(--red-primary);
    box-shadow: inset 0 0 20px rgba(185, 28, 28, 0.15);
}

.gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 48px;
    height: 48px;
    background: rgba(185, 28, 28, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: transform 0.4s var(--ease-spring);
}

.gallery-item:hover .gallery-zoom-icon {
    transform: translate(-50%, -50%) scale(1);
}

/* Corner decorations on gallery items */
.gallery-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--red-primary);
    border-style: solid;
    border-width: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-corner {
    opacity: 1;
}

.gallery-corner.tl { top: 8px; left: 8px; border-top-width: 2px; border-left-width: 2px; }
.gallery-corner.tr { top: 8px; right: 8px; border-top-width: 2px; border-right-width: 2px; }
.gallery-corner.bl { bottom: 8px; left: 8px; border-bottom-width: 2px; border-left-width: 2px; }
.gallery-corner.br { bottom: 8px; right: 8px; border-bottom-width: 2px; border-right-width: 2px; }

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(185, 28, 28, 0.2);
    transition: transform 0.4s var(--ease-out-expo);
}

.lightbox.active .lightbox-content img {
    animation: lightbox-zoom-in 0.4s var(--ease-out-expo);
}

@keyframes lightbox-zoom-in {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    z-index: 2;
}

.lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-nav:hover {
    background: rgba(185, 28, 28, 0.4);
    border-color: var(--red-primary);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-secondary);
}

/* ---------- Features Section ---------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out-expo);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(185, 28, 28, 0.05);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(185, 28, 28, 0.1);
    border: 1px solid rgba(185, 28, 28, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red-light);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: rgba(185, 28, 28, 0.2);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(185, 28, 28, 0.2);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.feature-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------- Join Section ---------- */
.join {
    position: relative;
    padding: 120px 0;
}

.join-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.join-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.3);
}

.join-overlay {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(180deg, var(--bg-primary) 0%, rgba(10,10,10,0.5) 30%, rgba(10,10,10,0.5) 70%, var(--bg-primary) 100%),
        radial-gradient(ellipse at center, rgba(185, 28, 28, 0.1) 0%, transparent 60%);
}

.join-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.join-logo {
    width: 100px;
    margin: 0 auto 24px;
    filter: drop-shadow(0 0 20px var(--red-glow));
    animation: float-logo 3s ease-in-out infinite;
}

.join-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 6vw, 56px);
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 16px;
}

.join-desc {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.7;
}

.join-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 24px;
}

.footer-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 2px;
    background: var(--red-primary);
    filter: blur(20px);
    opacity: 0.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-logo {
    width: 40px;
    height: 40px;
}

.footer-logo-text {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 3px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 360px;
}

.footer-col-title {
    font-family: var(--font-display);
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.footer-link {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--red-primary);
    padding-left: 8px;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: white;
    border-color: var(--red-primary);
    background: rgba(185, 28, 28, 0.1);
    transform: translateY(-3px);
}

/* ---------- Scroll Animations ---------- */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s var(--ease-out-expo);
}

[data-animate="fade-right"] {
    transform: translateX(-40px);
}

[data-animate="fade-left"] {
    transform: translateX(40px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0, 0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-item:nth-child(1),
    .gallery-item:nth-child(6),
    .gallery-item:nth-child(11) {
        grid-column: span 1;
    }

    .about-grid {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 64px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .btn-nav {
        display: none;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-number {
        font-size: 28px;
    }

    .hero-logo-3d {
        width: 90px;
        height: 90px;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .join-buttons {
        flex-direction: column;
    }

    .join-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .section {
        padding: 80px 0;
    }

    .section-header {
        margin-bottom: 48px;
    }

    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .title-line {
        letter-spacing: 4px;
    }

    .title-line-2 {
        letter-spacing: 8px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .about-features-mini {
        flex-direction: column;
    }
}

/* ---------- Special Animation Classes ---------- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer-text {
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--red-light) 50%, var(--text-primary) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s ease-in-out infinite;
}

/* Tilt effect on feature cards */
.feature-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* Glitch effect on hover for hero title */
.hero-title:hover .char.text-red {
    animation: glitch 0.3s ease;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-1px, -1px); }
    80% { transform: translate(1px, 1px); }
    100% { transform: translate(0); }
}

/* Scan line effect */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 4;
}

/* ---------- Team Section ---------- */
.team {
    position: relative;
    background: var(--bg-primary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.team-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center top, rgba(185, 28, 28, 0.1), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.team-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--red-primary), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out-expo);
}

.team-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(185, 28, 28, 0.08);
}

.team-card:hover::before {
    opacity: 1;
}

.team-card:hover::after {
    transform: scaleX(1);
}

.team-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: translateZ(30px);
}

/* Avatar Container */
.team-avatar-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 8px;
}

.team-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    position: relative;
    background: var(--bg-secondary);
    padding: 8px;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.5s var(--ease-spring);
}

.team-card:hover .team-avatar {
    transform: scale(1.08) rotate(5deg);
}

.team-avatar-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: var(--red-primary);
    filter: blur(12px);
    opacity: 0.15;
    transition: all 0.4s ease;
}

.team-card:hover .team-avatar-glow {
    opacity: 0.5;
    transform: scale(1.1);
}

.team-avatar-border {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.4s ease;
    z-index: 1;
}

.team-card:hover .team-avatar-border {
    border-color: var(--red-primary);
    box-shadow: 0 0 15px var(--red-glow);
}

/* Staff Info styling */
.team-info {
    width: 100%;
}

.team-role-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.badge-owner {
    background: rgba(185, 28, 28, 0.2);
    color: #EF4444;
    border: 1px solid rgba(185, 28, 28, 0.4);
    box-shadow: 0 0 10px rgba(185, 28, 28, 0.2);
}

.badge-headadmin {
    background: rgba(220, 38, 38, 0.15);
    color: #F87171;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

.badge-developer {
    background: rgba(255, 255, 255, 0.08);
    color: #E5E7EB;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-modder {
    background: rgba(185, 28, 28, 0.12);
    color: #F87171;
    border: 1px solid rgba(185, 28, 28, 0.25);
}

.team-name {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.team-card:hover .team-name {
    color: var(--red-light);
}

.team-bio {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Social icons on card */
.team-socials {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.team-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.team-social-icon:hover {
    background: #5865F2;
    border-color: #5865F2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4);
}

/* Responsive updates for Team Section */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
}
