/* ===== CSS Custom Properties ===== */
:root {
    --bg-primary: #080B09;
    --bg-secondary: #0D120F;
    --bg-card: #111813;
    --color-primary-green: #5CF2FF;
    --color-secondary-green: #B05CFF;
    --color-text-main: #F5F7F5;
    --color-text-muted: #A0AAA3;
    --color-border: rgba(100, 255, 145, 0.16);
    --color-border-hover: rgba(100, 255, 145, 0.32);
    
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-mono: 'Monaco', 'Menlo', 'Courier New', monospace;
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

body {
    background-color: var(--bg-primary);
    color: var(--color-text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-muted);
}

a {
    color: var(--color-primary-green);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-secondary-green);
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===== Navigation ===== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(8, 11, 9, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    align-items: center;
}

.nav-link {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.discord-link {
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-primary-green);
    border-radius: var(--radius-md);
    color: var(--color-primary-green) !important;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.discord-link:hover {
    background: rgba(92, 242, 255, 0.1);
    border-color: var(--color-secondary-green);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-primary-green);
    border-radius: 1px;
    transition: var(--transition);
}

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

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-menu a {
        display: block;
        padding: var(--space-md) var(--space-lg);
    }

    .discord-link {
        border: none;
        border-radius: 0;
        margin: var(--space-md) var(--space-lg) 0;
        width: auto;
    }
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

.hero-content {
    max-width: 800px;
}

.hero-label {
    display: inline-block;
    color: var(--color-primary-green);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-lg);
    padding: var(--space-xs) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-lg);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-2xl);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: var(--font-family);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--color-primary-green);
    color: var(--bg-primary);
    border: 2px solid var(--color-primary-green);
}

.btn-primary:hover {
    background: var(--color-secondary-green);
    border-color: var(--color-secondary-green);
    box-shadow: 0 0 20px rgba(92, 242, 255, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary-green);
    border: 2px solid var(--color-primary-green);
}

.btn-secondary:hover {
    background: rgba(92, 242, 255, 0.1);
    border-color: var(--color-secondary-green);
    color: var(--color-secondary-green);
}

.btn-accent {
    background: var(--color-primary-green);
    color: var(--bg-primary);
    border: none;
    font-size: 1.1rem;
    padding: 1.25rem 3rem;
}

.btn-accent:hover {
    background: var(--color-secondary-green);
    box-shadow: 0 0 30px rgba(92, 242, 255, 0.3);
}

/* ===== Section Headers ===== */
.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    position: relative;
    display: inline-block;
}

.header-accent {
    width: 60px;
    height: 3px;
    background: var(--color-primary-green);
    margin: var(--space-md) auto 0;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto var(--space-2xl);
}

/* ===== About Section ===== */
.about {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-primary);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.about-card {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.about-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.about-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.about-card h3 {
    color: var(--color-primary-green);
    margin-bottom: var(--space-md);
}

.about-card p {
    margin: 0;
    line-height: 1.7;
}

/* ===== Survival Section ===== */
.survival {
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--color-border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.feature-box {
    padding: var(--space-xl);
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.feature-box::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary-green), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-box:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.feature-box:hover::before {
    opacity: 1;
}

.feature-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-primary-green);
    opacity: 0.2;
    margin-bottom: var(--space-md);
    line-height: 1;
}

.feature-box h3 {
    color: var(--color-text-main);
    margin-bottom: var(--space-md);
}

.feature-box p {
    margin: 0;
}

/* ===== Ranks Section ===== */
.ranks {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-primary);
    border-top: 1px solid var(--color-border);
}

.ranks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.rank-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.rank-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
}

.rank-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--bg-secondary);
}

.rank-image-placeholder {
    width: 100%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.rank-image-text {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.8;
    z-index: 1;
}

.rank-content {
    padding: var(--space-lg);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.rank-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text-main);
}

.rank-price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary-green);
    margin-bottom: var(--space-md);
    letter-spacing: -0.02em;
}

.rank-description {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    flex-grow: 1;
}

.rank-perks {
    margin-bottom: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.rank-perks h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary-green);
    margin-bottom: var(--space-md);
    margin-top: 0;
}

.perks-list {
    list-style: none;
    font-size: 0.9rem;
    line-height: 1.8;
}

.perks-list li {
    color: var(--color-text-muted);
}

.perks-list li::before {
    content: '✓ ';
    color: var(--color-primary-green);
    font-weight: 700;
    margin-right: 0.5rem;
}

.rank-button {
    width: 100%;
    margin-top: auto;
}

/* ===== Join Section ===== */
.join {
    padding: var(--space-2xl) var(--space-lg);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--color-border);
}

.join-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.step {
    padding: var(--space-lg);
    background: var(--bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.step:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: rgba(92, 242, 255, 0.1);
    border: 2px solid var(--color-primary-green);
    border-radius: 50%;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary-green);
    margin-bottom: var(--space-md);
}

.step h3 {
    color: var(--color-text-main);
}

.step p {
    margin-bottom: var(--space-md);
}

.step .btn {
    width: 100%;
}

/* ===== Community Section ===== */
.community {
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-primary);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.community-content {
    max-width: 800px;
    margin: 0 auto;
}

.community-content h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: var(--space-lg);
}

.community-content p {
    font-size: 1.1rem;
    margin-bottom: var(--space-2xl);
    max-width: 100%;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2xl) var(--space-lg);
    margin-top: var(--space-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.footer-section h3,
.footer-section h4 {
    color: var(--color-primary-green);
    margin-bottom: var(--space-md);
}

.footer-section p {
    margin: 0;
    font-size: 0.95rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-sm);
}

.footer-section a {
    color: var(--color-text-muted);
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--color-primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }

    .hero {
        min-height: auto;
        padding: var(--space-xl) var(--space-md);
    }

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

    .btn {
        width: 100%;
    }

    .about-grid,
    .features-grid,
    .ranks-grid,
    .join-steps {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

/* ===== Accessibility ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-primary-green);
    outline-offset: 2px;
}

/* ===== Utilities ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===== Brand Artwork ===== */
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: inherit;
}

.brand-link:hover { color: inherit; }

.brand-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    display: block;
    margin-bottom: var(--space-sm);
}

/* ===== Hero Banner ===== */
.hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.hero-banner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(8, 11, 9, 0.55) 0%, rgba(8, 11, 9, 0.35) 40%, rgba(8, 11, 9, 0.92) 100%),
        radial-gradient(ellipse at center, rgba(8, 11, 9, 0.5) 0%, rgba(8, 11, 9, 0) 70%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
    .hero-banner {
        object-position: 62% center;
    }
    .hero-overlay {
        background: linear-gradient(180deg, rgba(8, 11, 9, 0.6) 0%, rgba(8, 11, 9, 0.5) 45%, rgba(8, 11, 9, 0.95) 100%);
    }
}

/* ===== Survival Screenshot ===== */
.spawn-figure {
    max-width: 720px;
    margin: 0 auto var(--space-2xl);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
}

.spawn-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* ===== Community Icon ===== */
.community-icon {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin: 0 auto var(--space-lg);
    display: block;
}

/* ===== Rank Artwork ===== */
.rank-card {
    border-top: 2px solid var(--rank-color, var(--color-primary-green));
}

.rank-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    background:
        radial-gradient(ellipse at center, color-mix(in srgb, var(--rank-color, #5CF2FF) 14%, transparent) 0%, transparent 70%),
        var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    overflow: hidden;
}

.rank-media .rank-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    image-rendering: auto;
}

.rank-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bg-primary);
    background: var(--rank-color, var(--color-primary-green));
    border-radius: var(--radius-sm);
}

.rank-card:hover .rank-media .rank-image {
    transform: scale(1.02);
}

.rank-media .rank-image {
    transition: transform 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
    .rank-card:hover .rank-media .rank-image {
        transform: none;
    }
}


/* ===== Design Tokens: Glass & Motion ===== */
:root {
    --glass-bg: rgba(11, 23, 16, 0.62);
    --glass-bg-strong: rgba(8, 17, 11, 0.9);
    --glass-border: rgba(92, 242, 255, 0.16);
    --glass-blur: 16px;
    --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Fallback for browsers without backdrop-filter: more opaque surface */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root { --glass-bg: rgba(11, 23, 16, 0.94); --glass-bg-strong: rgba(8, 17, 11, 0.98); }
}

/* ===== Glass Surface ===== */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
}

.navbar.glass {
    background: rgba(5, 9, 6, 0.55);
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.navbar.glass.is-scrolled {
    background: var(--glass-bg-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.rank-card.glass {
    border-top: 2px solid var(--rank-color, var(--color-primary-green));
}

/* Hero ambient light (slow, restrained) */
.hero::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(circle at 50% 40%, rgba(92, 242, 255, 0.12), transparent 55%);
    z-index: -1;
    pointer-events: none;
    animation: ambient-drift 16s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
    from { transform: translate3d(-2%, 0, 0) scale(1); }
    to   { transform: translate3d(2%, -2%, 0) scale(1.05); }
}

/* Hero entrance: staggered */
.hero-content > * { animation: rise 0.8s var(--ease-out) both; }
.hero-content > *:nth-child(1) { animation-delay: 0.05s; }
.hero-content > *:nth-child(2) { animation-delay: 0.15s; }
.hero-content > *:nth-child(3) { animation-delay: 0.25s; }
.hero-content > *:nth-child(4) { animation-delay: 0.35s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}

/* Nav underline indicator */
.nav-link { padding-bottom: 4px; }
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    height: 2px;
    width: 0;
    background: var(--color-primary-green);
    transition: width 0.3s var(--ease-out);
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Button feedback */
.btn { transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(0.98); }

/* Scroll reveals: hidden only when JS has run, so content is never lost without it */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    transition-delay: var(--delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (hover: hover) {
    .glass:hover { border-color: rgba(92, 242, 255, 0.3); }
}

@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero-content > * { animation: none !important; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn:hover, .btn:active { transform: none; }
}


/* ===== Stronger Glass Hierarchy ===== */
.glass-strong {
    background: var(--glass-bg-strong);
    border: 1px solid var(--glass-border);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    backdrop-filter: blur(24px) saturate(140%);
}

/* Server IP panel */
.server-ip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.5rem 0.5rem 0.5rem var(--space-md);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
}
.server-ip[hidden] { display: none; }
.server-ip-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.server-ip code {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--color-text-main);
}
.btn-small { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* FAQ */
.faq { padding: var(--space-2xl) var(--space-lg); background: var(--bg-secondary); border-top: 1px solid var(--color-border); }
.faq-list { max-width: 800px; margin: 0 auto; display: grid; gap: var(--space-md); }
.faq-item { border-radius: var(--radius-lg); padding: 0 var(--space-lg); }
.faq-item summary {
    cursor: pointer;
    padding: var(--space-lg) 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text-main);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    color: var(--color-primary-green);
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 2px solid var(--color-primary-green); outline-offset: 4px; border-radius: var(--radius-sm); }
.faq-item p { padding-bottom: var(--space-lg); margin: 0; }

/* Footer legal line */
.footer-bottom .legal { font-size: 0.8rem; margin-top: var(--space-xs); opacity: 0.8; }

/* Tighter section rhythm on small screens */
@media (max-width: 768px) {
    .faq { padding: var(--space-xl) var(--space-md); }
    .server-ip { padding: var(--space-sm); margin-bottom: var(--space-lg); }
}


/* ===== Professional Discord Panel ===== */
.community { position: relative; padding: var(--space-2xl) var(--space-lg); overflow: hidden; }
.community::before {
    content: '';
    position: absolute;
    left: 50%; top: 50%;
    width: min(900px, 120%); height: 420px;
    transform: translate(-50%, -50%);
    background: radial-gradient(ellipse at center, rgba(92, 242, 255, 0.14), transparent 65%);
    pointer-events: none;
    animation: ambient-drift 18s ease-in-out infinite alternate;
    z-index: 0;
}
.community .container { position: relative; z-index: 1; }
.community-panel {
    max-width: 760px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-xl);
    border-radius: 20px;
    text-align: center;
    border-top: 2px solid var(--color-primary-green);
    box-shadow: 0 0 0 1px rgba(92, 242, 255, 0.06), 0 24px 60px rgba(0, 0, 0, 0.45);
}
.community-panel h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: var(--space-md); }
.community-panel p { max-width: 560px; margin: 0 auto var(--space-xl); }
.discord-badge {
    width: 96px; height: 96px;
    margin: 0 auto var(--space-lg);
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(5, 9, 6, 0.6);
    border: 1px solid var(--color-border);
    position: relative;
}
.discord-badge::after {
    content: '';
    position: absolute; inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(92, 242, 255, 0.35);
    animation: pulse-ring 2.8s ease-out infinite;
}
.discord-badge img { width: 52px; height: 52px; object-fit: contain; }
.community-note { font-size: 0.9rem; margin: var(--space-md) auto 0 !important; color: var(--color-text-muted); opacity: 0.85; }

.btn-shimmer { position: relative; overflow: hidden; }
.btn-shimmer::after {
    content: '';
    position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3.6s ease-in-out infinite;
}

@keyframes shimmer { 0%, 60% { left: -75%; } 100% { left: 125%; } }

/* ===== Rank Buttons: color-based styling with shimmer ===== */
.rank-button {
    background: linear-gradient(135deg, var(--rank-color), color-mix(in srgb, var(--rank-color) 75%, black)) !important;
    color: rgba(8, 11, 9, 0.95) !important;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 12px color-mix(in srgb, var(--rank-color) 35%, transparent), 
                inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
    transition: all 0.35s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.rank-button::before {
    content: '';
    position: absolute; top: 0; left: -75%;
    width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    animation: shimmer 3.6s ease-in-out infinite;
}

.rank-button:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.6), 0 0 20px color-mix(in srgb, var(--rank-color) 55%, transparent),
                inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
}

.rank-button:active {
    transform: translateY(-1px) scale(0.98) !important;
}

@media (prefers-reduced-motion: reduce) {
    .rank-button { transition: none; }
    .rank-button::before { animation: none !important; }
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.25); opacity: 0; }
}

/* ===== How to Join: clean 3-up row on desktop ===== */
.join-steps { grid-template-columns: repeat(3, 1fr); }
.step { display: flex; flex-direction: column; align-items: center; height: 100%; }
.step p { flex-grow: 1; }
.step:hover { transform: translateY(-4px); }
.step { transition: var(--transition); }
@media (max-width: 900px) { .join-steps { grid-template-columns: 1fr; } }

/* ===== Footer with banner background ===== */
.footer {
    position: relative;
    background:
        linear-gradient(180deg, rgba(5, 9, 6, 0.9) 0%, rgba(5, 9, 6, 0.96) 100%),
        url('assets/images/footer-banner.jpg') center / cover no-repeat;
    border-top: 1px solid var(--color-border);
}

@media (prefers-reduced-motion: reduce) {
    .community::before, .discord-badge::after, .btn-shimmer::after { animation: none !important; }
    .btn-shimmer::after { display: none; }
}

@media (max-width: 768px) {
    .community { padding: var(--space-xl) var(--space-md); }
    .community-panel { padding: var(--space-xl) var(--space-md); }
    .discord-badge { width: 80px; height: 80px; }
}


/* ===== Rainbow Animated Pill (HERO "Coming Soon" label) ===== */
@keyframes rainbow-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-label {
    display: inline-block;
    padding: 10px 26px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #1a1a1a;
    text-shadow: none;
    background: linear-gradient(
        90deg,
        #FFE58A,
        #B8FFB0,
        #8FF0FF,
        #C9A8FF,
        #FF9AC8,
        #FFC48A,
        #FFE58A
    );
    background-size: 300% 100%;
    animation: rainbow-flow 6s ease-in-out infinite;
    box-shadow: 0 4px 18px rgba(255, 180, 200, 0.25);
}

/* ===== Survival SMP Section: Moving Green Neon Blurred Background ===== */
#survival {
    position: relative;
    overflow: hidden;
    background: #080B09;
}

#survival::before {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(
        ellipse 600px 500px at 50% 50%,
        rgba(92, 242, 255, 0.15),
        rgba(92, 242, 255, 0.05) 40%,
        transparent 70%
    );
    animation: neon-flow 8s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
    filter: blur(40px);
}

#survival::after {
    content: '';
    position: absolute;
    inset: -20%;
    background: radial-gradient(
        ellipse 700px 400px at 40% 60%,
        rgba(100, 255, 150, 0.1),
        transparent 60%
    );
    animation: neon-shift 12s ease-in-out infinite reverse;
    z-index: 0;
    pointer-events: none;
    filter: blur(50px);
}

#survival .container {
    position: relative;
    z-index: 1;
}

@keyframes neon-flow {
    0%   { transform: translate(-50px, -50px) scale(0.9);  opacity: 0.4; }
    25%  { transform: translate(30px, -80px) scale(1.1);   opacity: 0.6; }
    50%  { transform: translate(50px, 50px) scale(1);      opacity: 0.5; }
    75%  { transform: translate(-40px, 60px) scale(0.95);  opacity: 0.6; }
    100% { transform: translate(-50px, -50px) scale(0.9);  opacity: 0.4; }
}

@keyframes neon-shift {
    0%   { transform: translate(80px, 40px) scale(1.1);   opacity: 0.3; }
    50%  { transform: translate(-60px, -80px) scale(0.9); opacity: 0.5; }
    100% { transform: translate(80px, 40px) scale(1.1);   opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-label,
    #survival::before,
    #survival::after {
        animation: none !important;
    }
}

@media (max-width: 768px) {
    #survival { padding: var(--space-xl) var(--space-md); }
}


/* ===== Survival SMP: Steve, rocket, phone layout ===== */
#survival .features-grid {
    grid-template-columns: repeat(2, 1fr);
}

.feature-steve {
    width: 120px;
    height: auto;
    display: block;
    margin-bottom: var(--space-sm);
    filter: drop-shadow(0 8px 16px rgba(92, 242, 255, 0.25));
    animation: steve-float 3.2s ease-in-out infinite;
}

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

.rocket-slot {
    height: 120px;
    display: flex;
    align-items: flex-end;
    margin-bottom: var(--space-sm);
}

.rocket {
    width: 64px;
    height: auto;
    filter: drop-shadow(0 0 14px rgba(92, 242, 255, 0.55));
    animation: rocket-jiggle 2.4s ease-in-out infinite;
    transform-origin: 50% 80%;
}

.rocket .flame {
    transform-origin: 50% 0;
    animation: flame-flicker 0.4s ease-in-out infinite alternate;
}

@keyframes rocket-jiggle {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    20%      { transform: translate(-2px, -6px) rotate(-3deg); }
    40%      { transform: translate(2px, -12px) rotate(3deg); }
    60%      { transform: translate(-2px, -6px) rotate(-2deg); }
    80%      { transform: translate(1px, -2px) rotate(2deg); }
}

@keyframes flame-flicker {
    from { transform: scaleY(0.85); opacity: 0.8; }
    to   { transform: scaleY(1.2);  opacity: 1; }
}

/* Phone: single column, compact, Steve smaller */
@media (max-width: 640px) {
    #survival .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    .feature-steve { width: 96px; }
    .rocket-slot { height: 96px; }
    .rocket { width: 70px; }
    #survival .feature-box { padding: var(--space-lg); }
}

@media (prefers-reduced-motion: reduce) {
    .feature-steve, .rocket, .rocket .flame { animation: none !important; }
}

/* Pixel tools (pickaxe, axe) replacing box numbers */
.feature-tool {
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 14px rgba(92, 242, 255, 0.25));
}

/* ===== Rank card: button + Steve side by side ===== */
.rank-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}
.rank-actions .rank-button {
    flex: 1;
    min-width: 0;
}
.rank-steve {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(92, 242, 255, 0.25));
    animation: steve-float 3.2s ease-in-out infinite;
}
@media (max-width: 640px) {
    .rank-steve { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
    .rank-steve { animation: none !important; }
}

/* ===== Neon green animated gradient text (brand + hero title) ===== */
@keyframes neon-text-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.brand-text,
.hero-title {
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFB8E8, #5CF2FF, #B05CFF);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: neon-text-flow 5s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(92, 242, 255, 0.35));
}

@media (prefers-reduced-motion: reduce) {
    .brand-text, .hero-title { animation: none !important; }
}

/* ===== Phone: slimmer navbar, bigger readable hero ===== */
@media (max-width: 640px) {
    .nav-container {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
    .navbar .brand-logo { width: 30px !important; height: 30px !important; }
    .brand-text { font-size: 1.05rem; letter-spacing: 1px; }
    .hero-title { font-size: clamp(2.4rem, 11vw, 3.2rem); line-height: 1.1; }
    .hero-subtitle { font-size: 1.05rem; }
    .hero-label { font-size: 0.75rem; padding: 8px 18px; }
}

/* ===== Breathing section dividers ===== */
.section-divider {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5CF2FF, #FFB8E8, #5CF2FF, transparent);
    background-size: 200% 100%;
    box-shadow: 0 0 12px rgba(92, 242, 255, 0.5);
    animation: divider-breathe 4s ease-in-out infinite, divider-flow 6s linear infinite;
}
@keyframes divider-breathe {
    0%, 100% { opacity: 0.35; box-shadow: 0 0 6px rgba(92, 242, 255, 0.25); }
    50%      { opacity: 1;    box-shadow: 0 0 18px rgba(92, 242, 255, 0.8); }
}
@keyframes divider-flow {
    from { background-position: 0% 50%; }
    to   { background-position: 200% 50%; }
}
@media (min-width: 1024px) {
    .section-divider { height: 4px; box-shadow: 0 0 24px rgba(92, 242, 255, 0.6); }
    @keyframes divider-breathe-lg {
        0%, 100% { opacity: 0.35; }
        50%      { opacity: 1; }
    }
}
@media (prefers-reduced-motion: reduce) {
    .section-divider { animation: none !important; }
}

/* ===== Phone: proper scale and alignment ===== */
@media (max-width: 640px) {
    .container { padding-left: 16px !important; padding-right: 16px !important; }
    section { padding-top: 56px !important; padding-bottom: 56px !important; }
    h2 { font-size: 1.75rem !important; line-height: 1.2; }
    .section-header { margin-bottom: 32px !important; }
    .section-header p, section > .container > p { font-size: 0.95rem; }
    .hero-title { font-size: 2.2rem !important; }
    .hero-subtitle { font-size: 0.98rem !important; padding: 0 4px; }
    .hero-content { padding: 0 16px; }
    .hero-label { font-size: 0.7rem !important; letter-spacing: 1.2px; }
    .btn { font-size: 0.95rem; padding: 12px 20px; }
    .feature-box, .about-card, .step, .faq-item { padding: 20px !important; }
    .feature-box h3, .about-card h3, .step h3 { font-size: 1.15rem; }
    .feature-box p, .about-card p, .step p { font-size: 0.92rem; }
    .rank-card { padding: 18px !important; }
    .rank-card h3 { font-size: 1.3rem; }
    .community-panel { padding: 28px 18px !important; }
    .footer-grid { gap: 28px !important; }
}

/* ===== Short heading accent lines: breathe (grow / shrink) ===== */
.header-accent {
    transform-origin: center;
    animation: accent-breathe 3.2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(92, 242, 255, 0.5);
}
@keyframes accent-breathe {
    0%, 100% { transform: scaleX(0.7); opacity: 0.6; }
    50%      { transform: scaleX(1.35); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .header-accent { animation: none !important; }
}


/* ===== HACKER rank: neon crimson moving gradient text + red ticks ===== */
@keyframes crimson-flow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 250% 50%; }
}
.rank-card.rank-hacker .perks-list li,
.rank-card.rank-hacker .perks-list li::before {
    background: linear-gradient(90deg, #8B0000, #DC143C, #FF2A2A, #FF6B6B, #DC143C, #8B0000);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: crimson-flow 3s linear infinite;
}
.rank-card.rank-hacker .perks-list li::before {
    filter: drop-shadow(0 0 4px rgba(255, 42, 42, 0.7));
}

/* ===== All ranks: hover / tap animation ===== */
.rank-card .rank-name {
    background: linear-gradient(90deg, currentColor 0%, #ffffff 50%, currentColor 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-position: 100% 50%;
    transition: background-position 0.8s ease;
}
.rank-card:hover .rank-name,
.rank-card.is-active .rank-name {
    background-position: 0% 50%;
}
@keyframes perk-in {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}
.rank-card:hover .perks-list li,
.rank-card.is-active .perks-list li {
    animation: perk-in 0.45s ease both;
    animation-delay: calc(var(--i, 0) * 45ms);
}
.rank-card.rank-hacker:hover .perks-list li,
.rank-card.rank-hacker.is-active .perks-list li {
    animation: perk-in 0.45s ease both, crimson-flow 3s linear infinite;
    animation-delay: calc(var(--i, 0) * 45ms), 0s;
}
.rank-card:hover .rank-button,
.rank-card.is-active .rank-button {
    box-shadow: 0 0 26px color-mix(in srgb, var(--rank-color) 65%, transparent);
}
@media (prefers-reduced-motion: reduce) {
    .rank-card .rank-name, .rank-card .perks-list li, .rank-card.rank-hacker .perks-list li,
    .rank-card.rank-hacker .perks-list li::before { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
    .rank-actions .rank-button { font-size: 0.85rem; padding: 12px 10px; white-space: nowrap; }
}

/* ===== PHONE OPTIMISATION (final pass) ===== */
@media (max-width: 768px) {
    /* Every card grid becomes one clean column on phones */
    .about-grid,
    .features-grid,
    .ranks-grid,
    .join-steps,
    #survival .features-grid,
    .faq-list,
    .community-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Readable, properly scaled type */
    body { font-size: 16px; }
    h1 { font-size: 2.1rem !important; line-height: 1.15; }
    h2 { font-size: 1.7rem !important; }
    h3 { font-size: 1.15rem; }
    p  { font-size: 0.97rem; line-height: 1.6; }

    /* Section rhythm */
    section { padding-top: 48px !important; padding-bottom: 48px !important; }
    .section-header { margin-bottom: 28px !important; }

    /* Cards: comfortable padding, full width */
    .about-card, .feature-box, .step, .rank-card, .faq-item, .community-panel {
        width: 100%;
        padding: 22px !important;
    }

    /* Buttons: full width, touch-friendly */
    .btn { min-height: 48px; width: 100%; max-width: 420px; margin-left: auto; margin-right: auto; display: flex; align-items: center; justify-content: center; }
    .hero-content .btn { max-width: 100%; }
    .rank-actions .btn { width: auto; max-width: none; flex: 1; }

    /* Ranks: image fits card, no tiny preview */
    .rank-image { max-height: 360px; width: auto; margin: 0 auto; display: block; }
    .rank-card { max-width: 480px; margin: 0 auto; }

    /* Navbar: slim and aligned */
    .nav-container { padding-left: 16px; padding-right: 16px; }
    .brand-text { font-size: 1.05rem; }

    /* Hero spacing */
    .hero-content { padding-top: 40px; padding-bottom: 40px; }
    .hero-subtitle { font-size: 1rem !important; }
}

@media (max-width: 380px) {
    h1 { font-size: 1.85rem !important; }
    h2 { font-size: 1.5rem !important; }
    .about-card, .feature-box, .step, .rank-card { padding: 18px !important; }
}

/* Keep rank button label on one line in every rank card */
.rank-button { white-space: nowrap; }
.rank-actions { flex-wrap: nowrap; }

/* ===== Neon stats strip (under hero) ===== */
.stats-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: -40px auto 0;
    padding: 0 20px;
}
.stat-tile {
    position: relative;
    text-align: center;
    padding: 22px 16px;
    border-radius: 14px;
    background: rgba(11, 23, 16, 0.75);
    border: 1px solid rgba(92, 242, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.35s var(--ease-out), border-color 0.35s ease;
}
.stat-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(92, 242, 255, 0.6);
}
.stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFB8E8, #5CF2FF);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: neon-text-flow 6s linear infinite;
}
.stat-label {
    display: block;
    margin-top: 6px;
    font-size: 0.8rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
@media (max-width: 640px) {
    .stats-strip { grid-template-columns: 1fr; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .stat-value { animation: none !important; }
}

/* ===== Performance: drop heavy blur filters on large background layers ===== */
#survival::before,
#survival::after {
    filter: none !important;
    will-change: transform;
}
.section-divider { will-change: opacity; }

/* ===== Cart + Rules ===== */
.cart-toggle {
    position: relative;
    background: transparent;
    border: 1px solid rgba(92, 242, 255, 0.4);
    color: var(--color-primary-green);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.cart-toggle:hover { box-shadow: 0 0 18px rgba(92, 242, 255, 0.5); transform: translateY(-1px); }
.cart-count {
    display: inline-block; min-width: 20px; padding: 0 6px; margin-left: 4px;
    border-radius: 999px; background: var(--color-primary-green); color: #080B09;
    font-size: 0.75rem; font-weight: 800; line-height: 20px; text-align: center;
}
.cart-add {
    background: transparent;
    border: 1px solid rgba(92, 242, 255, 0.45);
    color: var(--color-primary-green);
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 14px;
    transition: box-shadow 0.3s ease, transform 0.3s var(--ease-out);
}
.cart-add:hover { box-shadow: 0 0 16px rgba(92, 242, 255, 0.45); transform: translateY(-2px); }

.cart-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 900;
}
.cart-drawer {
    position: fixed; top: 0; right: 0; height: 100%; width: min(380px, 100%);
    background: #0B1710; border-left: 1px solid rgba(92, 242, 255, 0.25);
    z-index: 901; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.4s var(--ease-out);
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid var(--color-border); }
.cart-head h3 { margin: 0; font-size: 1.2rem; }
.cart-close { background: none; border: 0; color: var(--color-text-main); font-size: 1.8rem; cursor: pointer; line-height: 1; }
.cart-items { list-style: none; margin: 0; padding: 12px 20px; flex: 1; overflow-y: auto; }
.cart-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.cart-item-name { flex: 1; font-weight: 600; }
.cart-item-price { color: var(--color-primary-green); font-weight: 700; }
.cart-remove { background: none; border: 0; color: var(--color-text-muted); font-size: 1.3rem; cursor: pointer; }
.cart-remove:hover { color: #FF6B6B; }
.cart-empty { padding: 24px 20px; color: var(--color-text-muted); margin: 0; }
.cart-foot { padding: 20px; border-top: 1px solid var(--color-border); }
.cart-field { display: block; font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 14px; }
.cart-field input {
    display: block; width: 100%; margin-top: 6px; padding: 12px; border-radius: 10px;
    background: #080B09; border: 1px solid var(--color-border); color: var(--color-text-main);
}
.cart-total { display: flex; justify-content: space-between; font-size: 1.1rem; margin-bottom: 14px; }
.cart-total strong { color: var(--color-primary-green); }
.cart-checkout { width: 100%; min-height: 48px; }
.cart-checkout:disabled { opacity: 0.45; cursor: not-allowed; }
.cart-note { font-size: 0.8rem; color: var(--color-text-muted); margin: 12px 0 0; }

.rules { padding: var(--space-2xl) var(--space-lg); }
.rules-list { max-width: 760px; margin: 0 auto; padding-left: 0; list-style: none; counter-reset: rule; }
.rules-list li {
    counter-increment: rule; position: relative; padding: 16px 16px 16px 56px; margin-bottom: 12px;
    border: 1px solid var(--color-border); border-radius: 12px; background: rgba(11, 23, 16, 0.6);
    color: var(--color-text-muted); line-height: 1.6;
}
.rules-list li::before {
    content: counter(rule); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px;
    border-radius: 50%; border: 1px solid var(--color-primary-green); color: var(--color-primary-green);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.rules-list strong { color: var(--color-text-main); }
.rules-note { text-align: center; color: var(--color-text-muted); margin-top: 20px; font-size: 0.9rem; }

/* Cart drawer must sit above the sticky navbar */
.cart-overlay { z-index: 1090 !important; }
.cart-drawer { z-index: 1100 !important; }

/* ===== Rules page ===== */
.rules-page { background: #080B09; }
.rules-main { padding: 130px 0 80px; }
.rules-hero { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.rules-kicker { color: var(--color-primary-green); font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; margin: 0 0 10px; }
.rules-hero h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0 0 14px; }
.rules-lede { color: var(--color-text-muted); line-height: 1.7; margin: 0; }

.rules-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.rule-card {
    background: rgba(13, 22, 17, 0.85);
    border: 1px solid rgba(92, 242, 255, 0.16);
    border-radius: 16px;
    padding: 24px;
    display: flex; flex-direction: column;
    transition: transform 0.35s var(--ease-out), border-color 0.35s ease, box-shadow 0.35s ease;
}
.rule-card:hover { transform: translateY(-4px); border-color: rgba(92, 242, 255, 0.5); box-shadow: 0 0 26px rgba(92, 242, 255, 0.15); }
.rule-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.rule-num {
    width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: rgba(92, 242, 255, 0.1); border: 1px solid rgba(92, 242, 255, 0.35);
    color: var(--color-primary-green); font-weight: 800; font-size: 0.85rem;
}
.rule-tag { color: var(--color-text-muted); font-size: 0.78rem; letter-spacing: 1px; font-weight: 700; }
.rule-sev { margin-left: auto; font-size: 0.7rem; font-weight: 700; letter-spacing: 1px; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.sev-critical { color: #FF6B6B; border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.08); }
.sev-high     { color: #FFD166; border-color: rgba(255, 209, 102, 0.5); background: rgba(255, 209, 102, 0.08); }
.sev-moderate { color: #7CC4FF; border-color: rgba(124, 196, 255, 0.5); background: rgba(124, 196, 255, 0.08); }
.rule-title { font-size: 1.1rem; margin: 0 0 10px; color: var(--color-text-main); }
.rule-body { color: var(--color-text-muted); line-height: 1.65; margin: 0 0 18px; font-size: 0.95rem; flex: 1; }
.rule-enforce {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    border-top: 1px solid var(--color-border); padding-top: 14px; font-size: 0.78rem;
}
.rule-enforce span { color: var(--color-text-muted); letter-spacing: 1px; font-weight: 700; }
.rule-enforce em { font-style: normal; color: var(--color-primary-green); font-family: ui-monospace, Menlo, Consolas, monospace; text-align: right; }

.appeal-box {
    margin-top: 40px; padding: 32px; border-radius: 18px;
    background: rgba(13, 22, 17, 0.9); border: 1px solid rgba(92, 242, 255, 0.25);
    box-shadow: 0 0 36px rgba(92, 242, 255, 0.08);
}
.appeal-kicker { color: var(--color-primary-green); font-size: 0.78rem; letter-spacing: 2px; font-weight: 700; margin: 0 0 10px; text-transform: uppercase; }
.appeal-box h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 12px; }
.appeal-box p { color: var(--color-text-muted); line-height: 1.7; max-width: 680px; }
.appeal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn-secondary { background: transparent; border: 1px solid rgba(92, 242, 255, 0.4); color: var(--color-primary-green); }

@media (max-width: 760px) {
    .rules-grid { grid-template-columns: 1fr; }
    .rules-main { padding-top: 110px; }
    .appeal-box { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .rule-card { transition: none; }
}

/* Skip link: hidden until keyboard focus */
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 2000; background: var(--color-primary-green); color: #080B09; padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip-link:focus { left: 12px; }

/* ===== Rules toolbar, tabs, banner, terms ===== */
.rules-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.rules-tabs { display: inline-flex; gap: 6px; padding: 5px; border-radius: 12px; background: rgba(11, 23, 16, 0.8); border: 1px solid var(--color-border); }
.rules-tab {
    background: transparent; border: 0; color: var(--color-text-muted); padding: 10px 16px; border-radius: 9px;
    font-weight: 700; cursor: pointer; transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.rules-tab.is-active { background: var(--color-primary-green); color: #080B09; box-shadow: 0 0 18px rgba(92, 242, 255, 0.35); }
.tab-count { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-size: 0.72rem; }
.rules-search { flex: 1; max-width: 340px; }
.rules-search input {
    width: 100%; padding: 11px 14px; border-radius: 10px; background: #0B1710; border: 1px solid var(--color-border); color: var(--color-text-main);
}
.rules-search input:focus { outline: none; border-color: var(--color-primary-green); box-shadow: 0 0 14px rgba(92, 242, 255, 0.25); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rules-banner {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; margin-bottom: 22px;
    background: rgba(92, 242, 255, 0.06); border: 1px solid rgba(92, 242, 255, 0.25);
}
.rules-banner-icon { color: var(--color-primary-green); font-size: 1.2rem; line-height: 1.2; }
.rules-banner p { margin: 4px 0 0; color: var(--color-text-muted); font-size: 0.92rem; }
.terms-body h2 { font-size: 1.1rem; margin: 22px 0 8px; color: var(--color-text-main); }
.terms-body h2:first-child { margin-top: 0; }
.terms-body p { color: var(--color-text-muted); line-height: 1.7; }

/* ===== Discord buttons: subtle professional animation ===== */
@keyframes discord-glow {
    0%, 100% { box-shadow: 0 0 0 rgba(88, 101, 242, 0); }
    50%      { box-shadow: 0 0 22px rgba(88, 101, 242, 0.55); }
}
.discord-link,
.btn-discord,
a[href*="discord.gg"].btn {
    animation: discord-glow 3.6s ease-in-out infinite;
    transition: transform 0.3s var(--ease-out), background-color 0.3s ease;
}
.discord-link:hover,
a[href*="discord.gg"].btn:hover {
    transform: translateY(-2px);
    background-color: rgba(88, 101, 242, 0.12);
}
.discord-link::after { content: none; }
@media (prefers-reduced-motion: reduce) {
    .discord-link, .btn-discord, a[href*="discord.gg"].btn { animation: none !important; }
}

/* ===== Rules page: heading, notice, footer summary ===== */
.rules-badge {
    display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
    letter-spacing: 2px; color: var(--color-primary-green); border: 1px solid rgba(92, 242, 255, 0.35);
    background: rgba(92, 242, 255, 0.06); margin-bottom: 18px;
}
.rules-heading { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; letter-spacing: -1px; line-height: 1.05; margin: 0 0 16px; }
.rules-heading .hw { color: #FFFFFF; }
.rules-heading .grad {
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFB8E8, #5CF2FF, #B05CFF);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: neon-text-flow 5s linear infinite;
    filter: drop-shadow(0 0 12px rgba(92, 242, 255, 0.35));
}
.rules-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

.rules-sign { text-align: center; color: var(--color-text-muted); font-size: 0.8rem; letter-spacing: 1.5px; margin: 34px 0 0; }

/* Important notice: red flash on click */
.notice {
    display: flex; gap: 16px; align-items: flex-start; width: 100%; text-align: left; cursor: pointer;
    margin-top: 34px; padding: 22px; border-radius: 16px; color: var(--color-text-main);
    background: rgba(255, 60, 60, 0.06); border: 1px solid rgba(255, 90, 90, 0.45);
    font: inherit;
}
.notice:focus-visible { outline: 2px solid #FF6B6B; outline-offset: 3px; }
.notice-icon {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: #FF4D4D; color: #fff; font-weight: 900; box-shadow: 0 0 14px rgba(255, 77, 77, 0.6);
}
.notice-body strong { display: block; color: #FF6B6B; letter-spacing: 1.5px; margin-bottom: 6px; font-size: 0.9rem; }
.notice-body span { color: var(--color-text-muted); line-height: 1.65; }
@keyframes notice-red-flash {
    0%   { background-color: rgba(255, 60, 60, 0.06); box-shadow: 0 0 0 rgba(255, 60, 60, 0); }
    30%  { background-color: rgba(255, 40, 40, 0.38); box-shadow: 0 0 40px rgba(255, 40, 40, 0.5); }
    100% { background-color: rgba(255, 60, 60, 0.06); box-shadow: 0 0 0 rgba(255, 60, 60, 0); }
}
.notice.flash { animation: notice-red-flash 0.9s ease-out; }

/* Footer quick rules (home page) */
.footer-rules {
    margin: 30px auto 0; max-width: 900px; text-align: center; padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.footer-rules-title { font-size: 0.8rem; letter-spacing: 2px; color: var(--color-primary-green); font-weight: 700; margin: 0 0 8px; }
.footer-rules p { color: var(--color-text-muted); font-size: 0.88rem; line-height: 1.7; margin: 0 0 10px; }
.footer-rules-link { color: var(--color-primary-green); font-weight: 600; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
    .rules-heading .grad, .notice.flash { animation: none !important; }
}

/* ===== Fix: hidden rule grids must stay hidden ===== */
.rules-grid[hidden] { display: none !important; }

/* ===== Scroll reveal (staggered) for rule cards and stat tiles ===== */
.reveal-item {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s var(--ease-out);
    transition-delay: var(--d, 0ms);
}
.reveal-item.is-in { opacity: 1; transform: none; }

/* ===== Rule card hover: neon edge sweep + lift ===== */
.rule-card { position: relative; overflow: hidden; }
.rule-card::before {
    content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 0;
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFB8E8);
    transition: width 0.5s var(--ease-out);
}
.rule-card:hover::before { width: 100%; }
.rule-card:hover .rule-num {
    background: rgba(92, 242, 255, 0.2);
    box-shadow: 0 0 14px rgba(92, 242, 255, 0.45);
}
.rule-num { transition: background 0.3s ease, box-shadow 0.3s ease; }

/* ===== Primary button: shine on hover ===== */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
    content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg); transition: left 0.6s ease;
}
.btn-primary:hover::after { left: 130%; }

/* ===== Navbar: subtle sheen when scrolled ===== */
.navbar.is-scrolled { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }

@media (prefers-reduced-motion: reduce) {
    .reveal-item { opacity: 1 !important; transform: none !important; transition: none !important; }
    .btn-primary::after { display: none; }
}

/* ===== Rule headings: green gradient like the "RULES" title ===== */
.rule-title {
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFB8E8, #5CF2FF, #B05CFF);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: neon-text-flow 5s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .rule-title { animation: none !important; }
}


/* ===== CHECKLIST PASS: light neon, sleek nav, footer brand, cart, click effects ===== */

/* Footer brand: bold moving gradient, same as rules heading */
.footer-brand-name {
    display: inline-block;
    font-weight: 900 !important;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFD6F5, #5CF2FF, #B05CFF);
    background-size: 250% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: neon-text-flow 5s linear infinite;
}

/* Navbar: sleeker */
.navbar { border-bottom: 1px solid rgba(92, 242, 255, 0.12); }
.nav-container { padding-top: 12px !important; padding-bottom: 12px !important; }
.nav-link { font-size: 0.9rem; letter-spacing: 0.2px; }
.navbar .btn, .nav-cta { padding: 8px 18px !important; border-radius: 999px !important; }

/* Cart: polish */
.cart-count { transition: transform 0.3s var(--ease-out); }
.cart-item { animation: cart-item-in 0.35s var(--ease-out) both; }
@keyframes cart-item-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
.cart-item:hover { background: rgba(92, 242, 255, 0.04); }
.cart-checkout { box-shadow: 0 0 22px rgba(92, 242, 255, 0.35); transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease; }
.cart-checkout:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 0 34px rgba(92, 242, 255, 0.55); }

/* Click ripple on buttons */
.btn { position: relative; overflow: hidden; }
.ripple {
    position: absolute; border-radius: 50%; pointer-events: none;
    background: rgba(255, 255, 255, 0.45);
    transform: scale(0); animation: ripple-out 0.6s ease-out forwards;
}
@keyframes ripple-out { to { transform: scale(4); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
    .footer-brand-name { animation: none !important; }
    .cart-item, .ripple { animation: none !important; }
}

/* ===================================================================
   ALIGNMENT + ELEMENTS + RULES PREMIUM PASS
   =================================================================== */

/* ---- Navbar: no crowding ---- */
.nav-container { gap: 28px; }
.brand-link { flex-shrink: 0; }
.nav-menu { gap: 22px !important; flex-wrap: nowrap; }
.nav-link, .cart-toggle { white-space: nowrap; }

/* ---- About grid: 4 even columns, no orphan card ---- */
.about-grid { grid-template-columns: repeat(4, 1fr) !important; align-items: stretch; }
@media (min-width: 769px) and (max-width: 1000px) { .about-grid { grid-template-columns: repeat(2, 1fr) !important; } }
.about-card { display: flex; flex-direction: column; }
.about-icon { height: 72px; display: flex; align-items: center; }
.about-icon img { width: 64px; height: 64px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(92, 242, 255, 0.2)); transition: transform 0.4s var(--ease-out); }
.about-card:hover .about-icon img { transform: translateY(-4px) scale(1.08) rotate(-3deg); }

/* ---- Stats tiles: icons ---- */
.stat-icon { display: block; width: 44px; height: 44px; margin: 0 auto 8px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(92, 242, 255, 0.25)); }

/* ---- Ranks grid: centred last row, equal width cards ---- */
.ranks-grid { display: flex !important; flex-wrap: wrap; justify-content: center; align-items: stretch; gap: var(--space-lg); }
.ranks-grid .rank-card { flex: 0 0 calc((100% - 2 * var(--space-lg)) / 3); max-width: calc((100% - 2 * var(--space-lg)) / 3); }
@media (max-width: 1000px) { .ranks-grid .rank-card { flex-basis: calc((100% - var(--space-lg)) / 2); max-width: calc((100% - var(--space-lg)) / 2); } }
@media (max-width: 768px)  { .ranks-grid { max-width: 480px; margin-left: auto; margin-right: auto; } .ranks-grid .rank-card { flex-basis: 100%; max-width: 100%; } }
.rank-content { flex: 1; display: flex; flex-direction: column; }
.rank-actions { margin-top: auto; padding-top: var(--space-md); }

/* ---- Rank armor icon + cart icon ---- */
.rank-title-row { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.rank-title-row .rank-name { margin: 0; }
.rank-armor { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--rank-color) 50%, transparent)); transition: transform 0.4s var(--ease-out); }
.rank-card:hover .rank-armor, .rank-card.is-active .rank-armor { transform: translateY(-3px) rotate(-6deg) scale(1.1); }
.cart-armor { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }

/* ---- Rules page: premium finish ---- */
.read-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 1300; background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFD6F5); box-shadow: 0 0 12px rgba(92, 242, 255, 0.7); transition: width 0.1s linear; }
.rules-main .container { position: relative; }
.rules-main { background:
    radial-gradient(ellipse 700px 380px at 50% 0%, rgba(92, 242, 255, 0.10), transparent 70%); }
.rules-decor { position: absolute; top: 24px; width: 96px; height: 96px; object-fit: contain; pointer-events: none; opacity: 0.95; filter: drop-shadow(0 10px 22px rgba(92, 242, 255, 0.25)); animation: steve-float 4s ease-in-out infinite; }
.decor-left { left: 24px; }
.decor-right { right: 24px; animation-delay: 1.2s; }
@media (max-width: 1000px) { .rules-decor { display: none; } }

.rules-stats { display: flex; justify-content: center; gap: 12px; list-style: none; padding: 0; margin: 24px 0 0; flex-wrap: wrap; }
.rules-stats li { min-width: 140px; padding: 12px 18px; border-radius: 12px; text-align: center; background: rgba(11, 23, 16, 0.7); border: 1px solid rgba(92, 242, 255, 0.18); }
.rules-stats strong { display: block; font-size: 1.4rem; color: var(--color-primary-green); line-height: 1.1; }
.rules-stats span { font-size: 0.72rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--color-text-muted); }

.rules-toolbar { position: sticky; top: 82px; z-index: 50; padding: 12px 0; background: linear-gradient(180deg, #080B09 72%, rgba(8, 11, 9, 0)); }
.rules-search input { height: 46px; }
.rules-tab { min-height: 44px; }

.rule-card { padding: 24px; min-height: 100%; background: linear-gradient(160deg, rgba(16, 28, 21, 0.95), rgba(10, 17, 13, 0.95)); }
.rule-head { flex-wrap: nowrap; }
.rule-icon { margin-left: auto; width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(92, 242, 255, 0.22)); transition: transform 0.45s var(--ease-out); }
.rule-card:hover .rule-icon { transform: translateY(-4px) rotate(-6deg) scale(1.12); }
.rule-card::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(92, 242, 255, 0.10), transparent 70%); opacity: 0; transition: opacity 0.4s ease; pointer-events: none; }
.rule-card:hover::after { opacity: 1; }
.rule-title { font-size: 1.15rem; line-height: 1.3; }
.rule-body { font-size: 0.95rem; }

.rules-empty { text-align: center; color: var(--color-text-muted); padding: 40px 0; }
.rules-sign { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sign-heart { width: 18px; height: 18px; object-fit: contain; }
.notice { transition: transform 0.3s var(--ease-out), border-color 0.3s ease; }
.notice:hover { transform: translateY(-2px); border-color: rgba(255, 90, 90, 0.75); }

@media (prefers-reduced-motion: reduce) {
    .rules-decor, .read-progress { animation: none !important; transition: none !important; }
}

/* ---- Rank cards: aligned separators + roomy action row ---- */
.rank-description { flex-grow: 0 !important; line-height: 1.6; min-height: 4.8em; }
.rank-perks { flex-grow: 1; }
.rank-actions { flex-wrap: wrap !important; gap: 10px 12px; align-items: center; }
.rank-actions .rank-button { flex: 1 1 0 !important; min-width: 0; padding: 12px 10px; font-size: 0.85rem; white-space: nowrap; }
.rank-actions .rank-steve { order: 2; width: 48px; height: 48px; }
.rank-actions .cart-add { order: 3; flex: 1 1 100% !important; width: 100%; }

/* ===================================================================
   PREMIUM 3D LOADING INTRO (home page, once per session)
   Smooth build: only transform + opacity are animated (GPU friendly).
   =================================================================== */
.intro {
    position: fixed; inset: 0; z-index: 2000;
    display: none; align-items: center; justify-content: center;
    background: #060908; overflow: hidden; cursor: pointer;
    transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}
html.intro-pending .intro { display: flex; }
html.intro-pending { overflow: hidden; }
html.intro-pending .hero, html.intro-pending .hero * { animation-play-state: paused !important; }
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.intro-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 55% 48% at 50% 44%, rgba(92, 242, 255, 0.20), transparent 70%),
        linear-gradient(rgba(92, 242, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px,
        linear-gradient(90deg, rgba(92, 242, 255, 0.05) 1px, transparent 1px) 0 0 / 48px 48px;
}

.intro-stage {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 18px;
    transition: transform 0.7s var(--ease-out);
    will-change: transform;
}
.intro.is-done .intro-stage { transform: scale(1.15); }

.intro-scene { position: relative; width: clamp(170px, 20vw, 240px); height: clamp(170px, 20vw, 240px); perspective: 900px; margin-bottom: 26px; }
.intro-halo {
    position: absolute; inset: -35%; border-radius: 50%;
    background: radial-gradient(circle, rgba(92, 242, 255, 0.36), transparent 65%);
    animation: intro-halo 2.6s ease-in-out infinite;
    will-change: transform, opacity;
}
@keyframes intro-halo { 0%, 100% { transform: scale(0.92); opacity: 0.7; } 50% { transform: scale(1.08); opacity: 1; } }
.intro-parallax {
    position: absolute; inset: 0; transform-style: preserve-3d;
    transform: rotateX(var(--px, 0deg)) rotateY(var(--py, 0deg));
    transition: transform 0.25s ease-out;
    will-change: transform;
}
.intro-logo3d { position: absolute; inset: 0; transform-style: preserve-3d; animation: intro-enter 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) both; will-change: transform, opacity; }
@keyframes intro-enter {
    from { opacity: 0; transform: translateY(40px) scale(0.5) rotateY(-120deg); }
    to   { opacity: 1; transform: none; }
}
.intro-swing { position: absolute; inset: 0; transform-style: preserve-3d; animation: intro-swing 3.4s ease-in-out 1.1s infinite alternate; will-change: transform; }
@keyframes intro-swing {
    0%   { transform: rotateY(-30deg) rotateX(6deg); }
    100% { transform: rotateY(30deg) rotateX(-4deg); }
}
.intro-layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.intro-shine {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
    -webkit-mask: url('assets/images/logo-intro.webp') center / contain no-repeat;
            mask: url('assets/images/logo-intro.webp') center / contain no-repeat;
}
.intro-shine i {
    position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: translateX(-130%) skewX(-18deg);
    animation: intro-shine 2s linear infinite;
    will-change: transform;
}
@keyframes intro-shine { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(330%) skewX(-18deg); } }

.intro-ring {
    position: absolute; left: 50%; top: 50%; border-radius: 50%;
    border: 1px solid rgba(92, 242, 255, 0.35);
    will-change: transform;
}
.intro-ring::after {
    content: ''; position: absolute; top: -5px; left: 50%; width: 10px; height: 10px; margin-left: -5px;
    background: #5CF2FF; border-radius: 50%; box-shadow: 0 0 10px 2px rgba(92, 242, 255, 0.85);
}
.ring-a { width: 150%; height: 150%; margin: -75% 0 0 -75%; animation: intro-orbit-a 3.6s linear infinite; }
.ring-b { width: 190%; height: 190%; margin: -95% 0 0 -95%; border-color: rgba(92, 242, 255, 0.2); animation: intro-orbit-b 5.4s linear infinite; }
@keyframes intro-orbit-a { from { transform: rotateX(74deg) rotateZ(0deg); }  to { transform: rotateX(74deg) rotateZ(360deg); } }
@keyframes intro-orbit-b { from { transform: rotateX(74deg) rotateY(18deg) rotateZ(360deg); } to { transform: rotateX(74deg) rotateY(18deg) rotateZ(0deg); } }

/* Brand: static gradient slices per letter (no per-frame repaint) */
.intro-brand { position: relative; display: flex; gap: 3px; font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 900; letter-spacing: 0.04em; }
.intro-brand::before {
    content: ''; position: absolute; inset: -40% -12%; z-index: -1;
    background: radial-gradient(ellipse, rgba(92, 242, 255, 0.22), transparent 70%);
}
.intro-brand span {
    display: inline-block;
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFD6F5, #5CF2FF, #B05CFF);
    background-size: 900% 100%;
    background-position: calc(var(--d, 0) * 12.5%) 50%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: intro-letter 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(0.9s + var(--d, 0) * 60ms);
}
.intro-brand .sp { width: 0.5em; background: none; animation: none; }
@keyframes intro-letter { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.intro-sub { margin: -6px 0 6px; font-size: 0.72rem; letter-spacing: 0.5em; color: rgba(223, 255, 234, 0.7); animation: intro-fade 0.8s ease 1.7s both; }
@keyframes intro-fade { from { opacity: 0; } to { opacity: 1; } }
.intro-bar { width: clamp(180px, 22vw, 260px); height: 4px; border-radius: 99px; background: rgba(92, 242, 255, 0.15); overflow: hidden; position: relative; }
.intro-bar i {
    position: absolute; inset: 0; width: 100%;
    background: linear-gradient(90deg, #B05CFF, #5CF2FF, #FFD6F5);
    border-radius: inherit; transform: scaleX(0); transform-origin: left center;
    will-change: transform;
}
.intro-meta { display: flex; justify-content: space-between; width: clamp(180px, 22vw, 260px); margin: 0; font-size: 0.72rem; letter-spacing: 0.15em; color: rgba(223, 255, 234, 0.6); font-variant-numeric: tabular-nums; }
.intro-skip { opacity: 0.55; }

@media (prefers-reduced-motion: reduce) {
    .intro *, .intro *::before, .intro *::after { animation: none !important; }
    .intro-brand span, .intro-sub, .intro-logo3d { opacity: 1; transform: none; }
}


/* ===================================================================
   INTRO -> SITE HANDOFF: smooth fade-out, then hero fades up in
   =================================================================== */
html.intro-pending .hero-content,
html.intro-pending .hero-content > * {
    opacity: 0 !important;
    animation: none !important;
}
html.hero-ready .hero-content > * {
    animation: hero-fade-up 0.9s var(--ease-out) both;
}
html.hero-ready .hero-content > *:nth-child(1) { animation-delay: 0.05s; }
html.hero-ready .hero-content > *:nth-child(2) { animation-delay: 0.15s; }
html.hero-ready .hero-content > *:nth-child(3) { animation-delay: 0.25s; }
html.hero-ready .hero-content > *:nth-child(4) { animation-delay: 0.35s; }
html.hero-ready .hero-content > *:nth-child(5) { animation-delay: 0.45s; }
@keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(22px); filter: blur(4px); }
    to   { opacity: 1; transform: none; filter: blur(0); }
}
/* Intro fades out slower and softer */
.intro { transition: opacity 0.9s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.9s; }
.intro.is-done { opacity: 0; }
.intro.is-done .intro-stage { transform: scale(1.06); filter: blur(6px); transition: transform 0.9s var(--ease-out), filter 0.9s ease; }
@media (prefers-reduced-motion: reduce) {
    html.hero-ready .hero-content > * { animation: none !important; }
    html.intro-pending .hero-content, html.intro-pending .hero-content > * { opacity: 1 !important; }
}


/* ===== Green WebGL ribbon field behind the Discord "Next Adventure" section ===== */
.community-fx {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none; opacity: 0.7;
}
.community .container { position: relative; z-index: 1; }


/* ===================================================================
   LIQUID GLASS: "Your Next Adventure Starts Here" card
   Refraction via SVG displacement (Chromium), frosted fallback elsewhere.
   =================================================================== */
.community-panel {
    position: relative; isolation: isolate; overflow: hidden;
    background:
        linear-gradient(155deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.015) 42%, rgba(92, 242, 255, 0.07)),
        rgba(255, 255, 255, 0.32) !important;
    -webkit-backdrop-filter: blur(14px) saturate(175%) brightness(1.05);
            backdrop-filter: blur(14px) saturate(175%) brightness(1.05);
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -1px 0 rgba(255, 255, 255, 0.07),
        inset 1px 0 0 rgba(255, 255, 255, 0.12),
        0 30px 70px rgba(0, 0, 0, 0.45) !important;
}
/* Specular sheen across the glass */
.community-panel::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(115deg, transparent 22%, rgba(255, 255, 255, 0.16) 36%, transparent 48%, transparent 70%, rgba(255, 255, 255, 0.08) 82%, transparent 92%);
    border-radius: inherit;
}
/* Refraction (only where the browser supports SVG url() backdrop filters) */
@supports (backdrop-filter: url(#liquid-glass)) {
    .community-panel {
        -webkit-backdrop-filter: url(#liquid-glass) saturate(175%) brightness(1.05);
                backdrop-filter: url(#liquid-glass) saturate(175%) brightness(1.05);
    }
}

/* Stop any 1px sideways drift on phones */
body { overflow-x: clip; }

/* Rules page: ribbon field behind the content, same as the Discord section */
.rules-main > .container { position: relative; z-index: 1; }

/* Sticky toolbar: soft glass so the ribbons show through but text stays readable */
.rules-toolbar {
    background: rgba(8, 11, 9, 0.55) !important;
    -webkit-backdrop-filter: blur(12px) saturate(160%);
            backdrop-filter: blur(12px) saturate(160%);
    border-radius: 16px;
    padding-left: 10px !important; padding-right: 10px !important;
}

/* ===================================================================
   NAVBAR: clean, floating liquid glass
   =================================================================== */
.navbar {
    position: fixed !important;
    top: 14px; left: 50%; transform: translateX(-50%);
    width: min(1180px, calc(100% - 28px));
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    z-index: 1000;
    isolation: isolate;
}
.navbar::before {
    content: ''; position: absolute; inset: 0; border-radius: 999px; z-index: -1;
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02)), rgba(8, 20, 13, 0.30);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
            backdrop-filter: blur(14px) saturate(170%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(255,255,255,0.06), 0 14px 40px rgba(0,0,0,0.35);
}
html.lg-chromium .navbar::before {
    -webkit-backdrop-filter: url(#liquid-nav) saturate(170%);
            backdrop-filter: url(#liquid-nav) saturate(170%);
}
.nav-container {
    display: flex !important; align-items: center; justify-content: space-between;
    max-width: none !important; padding: 10px 18px !important; box-sizing: border-box;
}
.cart-toggle,
.navbar .discord-link {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 18px; box-sizing: border-box;
    border-radius: 999px; font-size: 0.9rem; font-weight: 700; white-space: nowrap;
    color: #E8FFF1; cursor: pointer;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0.03)), rgba(60, 170, 255, 0.20);
    border: 1px solid rgba(92, 242, 255, 0.50);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.40), 0 8px 22px rgba(92,242,255,0.16);
    -webkit-backdrop-filter: blur(10px) saturate(170%);
            backdrop-filter: blur(10px) saturate(170%);
    animation: nav-float 6s ease-in-out infinite;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.35s ease, background 0.35s ease;
}
.navbar .discord-link { animation-delay: -3s; }
.cart-toggle:hover,
.navbar .discord-link:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 12px 30px rgba(92,242,255,0.32);
}
.cart-toggle:active, .navbar .discord-link:active { transform: scale(0.95); transition-duration: 0.12s; }
.cart-count { display: inline-block; min-width: 20px; height: 20px; line-height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 999px; background: #5CF2FF; color: #120018; font-size: 0.75rem; text-align: center; }
@keyframes nav-float {
    0%, 100% { translate: 0 0; }
    50%      { translate: 0 -3px; }
}
@media (max-width: 760px) {
    .navbar { width: calc(100% - 16px); top: 8px; }
    .nav-container { padding: 8px 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .cart-toggle, .navbar .discord-link { animation: none !important; transition: none !important; }
}

/* ===================================================================
   NAVBAR v2: rounded rectangle (curved edges), not a pill
   =================================================================== */
.navbar { top: 12px; width: min(1200px, calc(100% - 32px)); }
.navbar::before {
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.015)), rgba(8, 20, 13, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.nav-container {
    padding: 10px 14px !important;
    gap: 16px;
}
.brand-link { gap: 10px; padding: 4px 6px; border-radius: 12px; }
.brand-logo { width: 36px !important; height: 36px !important; }
.brand-text { font-size: 1.05rem; }

/* Nav links: soft rounded hover chip instead of an underline-only look */
.nav-menu { gap: 6px !important; align-items: center; }
.nav-link {
    padding: 8px 12px; border-radius: 10px;
    transition: background 0.25s ease, color 0.25s ease;
}
.nav-link:hover { background: rgba(92, 242, 255, 0.08); color: #FFD6F5; }
.nav-link.active { background: rgba(92, 242, 255, 0.12); color: #FFD6F5; }
.nav-link::after { display: none !important; }

/* Cart and Discord: rounded rectangles with curved edges */
.cart-toggle,
.navbar .discord-link {
    border-radius: 12px !important;
    height: 38px; min-height: 38px;
    padding: 0 16px;
}
.cart-count { border-radius: 8px; min-width: 22px; height: 20px; line-height: 20px; }

@media (max-width: 760px) {
    .navbar { top: 8px; width: calc(100% - 16px); }
    .nav-container { padding: 8px 10px !important; gap: 8px; }
    .nav-link { padding: 6px 8px; }
}

/* ===================================================================
   Smooth scroll + page change fade
   =================================================================== */
html { scroll-behavior: smooth; }
@keyframes hmc-page-in { from { opacity: 0; } to { opacity: 1; } }
body { animation: hmc-page-in 0.45s ease both; }
body.page-leave { opacity: 0; transition: opacity 0.24s ease; animation: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body { animation: none; }
}

/* ===================================================================
   NAVBAR: iOS 26 style liquid glass (research-based)
   1) strong specular top edge  2) slow light sheen that travels across
   3) springy press on the glass buttons   (refraction comes from the
   Chromium SVG filter already on the bar)
   =================================================================== */
.nav-container { position: relative; z-index: 1; }

/* Specular rim: bright top edge, faint bottom edge, like light entering glass */
.navbar::before {
    box-shadow:
        inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(255, 255, 255, 0.10),
        0 14px 40px rgba(0, 0, 0, 0.35) !important;
}

/* Glass buttons: springy press, like iOS */
.cart-toggle:active,
.navbar .discord-link:active {
    transform: scale(0.92, 0.96);
    transition: transform 0.12s ease-out;
}
.cart-toggle, .navbar .discord-link {
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease, background 0.35s ease;
}


/* ===================================================================
   NAVBAR: cursor-following specular + paint isolation + low-transparency fallback
   (from the liquid glass spec). Light shows only while hovering.
   =================================================================== */
.navbar { contain: layout style; }
.navbar::after {
    content: ''; position: absolute; inset: 0; z-index: 0; border-radius: 18px;
    pointer-events: none; opacity: 0;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.20), transparent 62%);
    transition: opacity 0.35s ease;
}
.navbar:hover::after { opacity: 1; }

@media (prefers-reduced-transparency: reduce) {
    .navbar::before {
        background: rgba(255, 255, 255, 0.96) !important;
        -webkit-backdrop-filter: none !important;
                backdrop-filter: none !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .navbar::after { transition: none; }
}


/* ===================================================================
   NAVBAR FINAL: fully transparent, blur only
   =================================================================== */
.navbar::before {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(10px) !important;
            backdrop-filter: blur(10px) !important;
}
html.lg-chromium .navbar::before {
    -webkit-backdrop-filter: blur(10px) !important;
            backdrop-filter: blur(10px) !important;
}
.navbar::after { display: none !important; }
.navbar .cart-toggle,
.navbar .discord-link,
.navbar .nav-link {
    -webkit-backdrop-filter: none !important;
            backdrop-filter: none !important;
}


/* ===================================================================
   SIFT CLUB: neon rainbow brand gradient (headings, brand, footer)
   =================================================================== */
.brand-text, .hero-title, .footer-brand-name, .stat-value,
.rules-heading .grad, .intro-brand span {
    background: linear-gradient(90deg, #FF5CD6, #FFB85C, #FFF45C, #FF9A5C, #5CF2FF, #B05CFF, #FF5CD6) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
}


/* ===================================================================
   NAVBAR: embossed (raised bevel) feel
   =================================================================== */
.navbar::before {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.20) 0%, rgba(255,255,255,0.03) 45%, rgba(0,0,0,0.20) 100%),
        rgba(20, 24, 30, 0.82) !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.40),
        inset 0 -2px 0 rgba(0,0,0,0.55),
        inset 0 0 0 1px rgba(255,255,255,0.04),
        0 5px 0 rgba(0,0,0,0.45),
        0 14px 30px rgba(0,0,0,0.45) !important;
}
.nav-link {
    text-shadow: 0 -1px 0 rgba(0,0,0,0.7), 0 1px 0 rgba(255,255,255,0.12);
}
.nav-link:hover, .nav-link.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), inset 0 -2px 0 rgba(0,0,0,0.4);
}
.cart-toggle, .navbar .discord-link {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.02) 50%, rgba(0,0,0,0.25) 100%),
        rgba(46, 196, 255, 0.28) !important;
    border: 1px solid rgba(255,255,255,0.22) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.45),
        inset 0 -2px 0 rgba(0,0,0,0.35),
        0 4px 0 rgba(0,0,0,0.45),
        0 8px 16px rgba(0,0,0,0.35) !important;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
}
.cart-toggle:active, .navbar .discord-link:active {
    transform: translateY(2px);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 1px 0 rgba(0,0,0,0.45) !important;
}


/* ===================================================================
   NAVBAR FINAL: transparent, embossed with light only (no black)
   =================================================================== */
.navbar::before {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.05) 45%, rgba(255,255,255,0.00) 100%) !important;
    border: 1px solid rgba(255,255,255,0.22) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.70),
        inset 0 0 0 1px rgba(255,255,255,0.06),
        0 8px 24px rgba(255,255,255,0.06) !important;
    -webkit-backdrop-filter: blur(12px) !important;
            backdrop-filter: blur(12px) !important;
}
.nav-link { text-shadow: 0 1px 2px rgba(255,255,255,0.25); }
.nav-link:hover, .nav-link.active {
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04)) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55) !important;
}
.cart-toggle, .navbar .discord-link {
    background: linear-gradient(180deg, rgba(255,255,255,0.30) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.00) 100%) !important;
    border: 1px solid rgba(255,255,255,0.40) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 4px 14px rgba(255,255,255,0.08) !important;
    text-shadow: 0 1px 2px rgba(255,255,255,0.35);
}
.cart-toggle:active, .navbar .discord-link:active {
    box-shadow: inset 0 2px 5px rgba(255,255,255,0.25) !important;
}


/* ===================================================================
   NO GREEN ANYWHERE: shift the green tones in the artwork to pink/violet
   (hue-rotate on the images only; the layout and colours stay the same)
   =================================================================== */
.hero-banner { filter: none; }
.footer::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url('assets/images/footer-banner.jpg') center / cover no-repeat;
    filter: grayscale(1) sepia(1) hue-rotate(250deg) saturate(2.2);
    opacity: 0.55;
}
.footer { position: relative; isolation: isolate; background-image: none !important; }
.rank-card[class*="vip"] .rank-image, .rank-card.rank-vip .rank-image { filter: grayscale(1) sepia(1) hue-rotate(250deg) saturate(2.2); }


/* ===================================================================
   THEME TOGGLE: small round button in the navbar
   =================================================================== */
.theme-toggle {
    width: 38px; height: 38px; border-radius: 12px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(255,255,255,0.04));
    border: 1px solid rgba(255,255,255,0.35); color: inherit;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.2s ease;
}
.theme-toggle:hover { transform: scale(1.08); }
.theme-toggle:active { transform: scale(0.94); }
.theme-icon { font-size: 1.1rem; line-height: 1; }

/* ---------- LIGHT THEME ---------- */
html.theme-light, html.theme-light body { background: #FFF6DC !important; color: #111 !important; }
html.theme-light h1, html.theme-light h2, html.theme-light h3,
html.theme-light .about-card h3, html.theme-light .feature-box h3, html.theme-light .step h3,
html.theme-light .rule-title, html.theme-light .rank-name, html.theme-light .stat-value,
html.theme-light .nav-link, html.theme-light .brand-text { color: #111 !important; }
html.theme-light p, html.theme-light li, html.theme-light .rule-body,
html.theme-light .about-card p, html.theme-light .feature-box p, html.theme-light .step p,
html.theme-light .rank-description, html.theme-light .stat-label { color: #333 !important; }
html.theme-light section, html.theme-light .rules-main, html.theme-light .footer-section { background: transparent !important; }
html.theme-light .section-divider { background: #111 !important; box-shadow: none !important; }
html.theme-light .about-card, html.theme-light .feature-box, html.theme-light .step,
html.theme-light .rank-card, html.theme-light .faq-item, html.theme-light .stat-tile,
html.theme-light .rule-card, html.theme-light .community-panel, html.theme-light .rules-toolbar,
html.theme-light .appeal-box, html.theme-light .rules-search input {
    background: #FFFFFF !important; color: #111 !important; border: 2px solid #111 !important;
    box-shadow: 5px 5px 0 #111 !important;
}
html.theme-light .rules-search input { color: #111 !important; }
html.theme-light .navbar::before {
    background: rgba(255,255,255,0.85) !important;
    border: 2px solid #111 !important;
    box-shadow: 5px 5px 0 #111 !important;
}
html.theme-light .nav-link, html.theme-light .brand-text { text-shadow: none !important; }
html.theme-light .nav-link:hover, html.theme-light .nav-link.active { background: #FFD23F !important; color: #111 !important; }
html.theme-light .theme-toggle { color: #111; border-color: #111; background: #FFD23F; }
html.theme-light .hero-overlay { background: rgba(255,246,220,0.0) !important; }
html.theme-light .footer { background: #FFD23F !important; color: #111 !important; }
html.theme-light .footer * { color: #111 !important; }
html.theme-light .footer::before { display: none !important; }
html.theme-light .intro { background: #FFF6DC !important; }
html.theme-light .intro-sub, html.theme-light .intro-meta { color: #111 !important; }
html.theme-light .cart-toggle, html.theme-light .navbar .discord-link {
    color: #111 !important; background: #2EC4FF !important; border: 2px solid #111 !important;
    box-shadow: 3px 3px 0 #111 !important; text-shadow: none !important;
}
html.theme-light .cart-count { background: #FF4FA3 !important; color: #111 !important; border: 2px solid #111; }


/* =====================================================================
   THEME SYSTEM (design tokens). Dark = default. .theme-light overrides.
   Same layout in both themes; only colour, surface, border, shadow change.
   ===================================================================== */
:root {
    --brand-violet: #8B5CF6;
    --brand-cyan: #38BDF8;
    --brand-pink: #F472B6;
    --accent: #8B5CF6;
    --accent-hover: #7C3AED;
    --accent-text: #FFFFFF;
}
html.theme-light {
    --bg: #F7F5FC;
    --bg-alt: #EFEBF8;
    --surface: #FFFFFF;
    --surface-2: #F3F0FA;
    --text: #1B1A24;
    --text-2: #3D3B4D;
    --text-muted: #6B6880;
    --border: rgba(27, 26, 36, 0.10);
    --shadow: 0 1px 2px rgba(27,26,36,0.06), 0 8px 24px rgba(27,26,36,0.08);
    --accent: #7C3AED;
    --accent-hover: #6D28D9;
}
html:not(.theme-light) {
    --bg: #17161D;
    --bg-alt: #1E1C26;
    --surface: #221F2B;
    --surface-2: #2A2736;
    --text: #F3F1F8;
    --text-2: #D6D2E3;
    --text-muted: #9A96AD;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 1px 2px rgba(0,0,0,0.30), 0 10px 28px rgba(0,0,0,0.35);
}

/* Apply the tokens (both themes) */
html, body { background: var(--bg) !important; color: var(--text) !important; }
h1, h2, h3, .rule-title, .about-card h3, .feature-box h3, .step h3, .rank-name, .stat-value { color: var(--text) !important; }
p, li, .rule-body, .about-card p, .feature-box p, .step p, .rank-description, .stat-label, .faq-item p { color: var(--text-2) !important; }
.about-card, .feature-box, .step, .rank-card, .faq-item, .stat-tile, .rule-card, .community-panel, .rules-toolbar, .appeal-box, .rules-search input {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    border-radius: 16px !important;
    color: var(--text) !important;
}
.about-card:hover, .feature-box:hover, .step:hover, .rank-card:hover, .rule-card:hover, .stat-tile:hover, .faq-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.08), 0 14px 32px rgba(124,58,237,0.14) !important;
    border-color: rgba(124,58,237,0.35) !important;
    transform: translateY(-2px) !important;
}
.navbar::before {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    -webkit-backdrop-filter: blur(10px) !important; backdrop-filter: blur(10px) !important;
}
.nav-link { color: var(--text-2) !important; text-shadow: none !important; }
.nav-link:hover, .nav-link.active { color: var(--text) !important; background: var(--surface-2) !important; box-shadow: none !important; }
.brand-text { color: var(--text) !important; }
.btn-primary { background: var(--accent) !important; color: var(--accent-text) !important; border: none !important; box-shadow: 0 4px 14px rgba(124,58,237,0.30) !important; }
.btn-primary:hover { background: var(--accent-hover) !important; }
.btn-secondary { background: transparent !important; color: var(--text) !important; border: 1px solid var(--border) !important; box-shadow: none !important; }
.section-divider { background: var(--border) !important; box-shadow: none !important; height: 1px !important; }
.footer { background: var(--bg-alt) !important; color: var(--text-2) !important; border-top: 1px solid var(--border) !important; }
.footer * { color: var(--text-2) !important; }
.footer::before { display: none !important; }
.intro { background: var(--bg) !important; }
.intro-sub, .intro-meta { color: var(--text-2) !important; }

/* Hero stays the same in both themes (it is artwork); keep the title readable */
.hero-title { color: #FFFFFF !important; -webkit-text-fill-color: #FFFFFF !important; text-shadow: 0 2px 12px rgba(0,0,0,0.45) !important; }
.hero-subtitle { background: rgba(20,16,30,0.55) !important; color: #FFFFFF !important; border: 1px solid rgba(255,255,255,0.18) !important; box-shadow: none !important; }

/* Light theme fixes: hero text on artwork, navbar contrast, soft buttons */
html.theme-light .hero-subtitle { color: #FFFFFF !important; background: rgba(20,16,30,0.55) !important; border: 1px solid rgba(255,255,255,0.22) !important; }
html.theme-light .hero .btn-secondary { color: #FFFFFF !important; border: 1px solid rgba(255,255,255,0.85) !important; background: rgba(20,16,30,0.25) !important; }
html.theme-light .brand-text {
    background: linear-gradient(90deg, #7C3AED, #DB2777, #0284C7) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
}
html.theme-light .cart-toggle, html.theme-light .navbar .discord-link {
    background: var(--accent) !important; color: #FFFFFF !important;
    border: none !important; box-shadow: 0 4px 12px rgba(124,58,237,0.30) !important;
    text-shadow: none !important;
}
html.theme-light .cart-count { background: #FFFFFF !important; color: var(--accent) !important; border: none !important; }
html.theme-light .theme-toggle { background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; box-shadow: none !important; }
html.theme-light .navbar::before { box-shadow: var(--shadow) !important; border: 1px solid var(--border) !important; }

/* =====================================================================
   LIGHT THEME CLEAN-UP (phone check): soft surfaces, readable text,
   no leftover black outlines or hard shadows.
   ===================================================================== */
html.theme-light .faq-item, html.theme-light .faq-item summary,
html.theme-light .faq-item summary span, html.theme-light details summary {
    color: var(--text) !important;
    background: var(--surface) !important;
}
html.theme-light .faq-item, html.theme-light .community-panel, html.theme-light .rank-card,
html.theme-light .about-card, html.theme-light .feature-box, html.theme-light .step,
html.theme-light .stat-tile, html.theme-light .rule-card, html.theme-light .appeal-box,
html.theme-light .rules-toolbar, html.theme-light .notice, html.theme-light .cart-drawer {
    border: 1px solid var(--border) !important;
    box-shadow: var(--shadow) !important;
    border-radius: 16px !important;
}
html.theme-light .community-panel *, html.theme-light .community-panel p,
html.theme-light .community-panel h2 { color: var(--text) !important; }
html.theme-light .community-panel p { color: var(--text-2) !important; }
html.theme-light .community-panel .btn-primary, html.theme-light .community-panel a.btn { color: #FFFFFF !important; background: var(--accent) !important; }
html.theme-light .community-panel .discord-badge { background: var(--surface-2) !important; border: 1px solid var(--border) !important; }
html.theme-light .section-divider, html.theme-light hr { background: var(--border) !important; border: none !important; box-shadow: none !important; height: 1px !important; }
html.theme-light .footer {
    background: var(--bg-alt) !important;
    color: var(--text-2) !important;
    border-top: 1px solid var(--border) !important;
    box-shadow: none !important;
}
html.theme-light .footer *, html.theme-light .footer a, html.theme-light .footer li, html.theme-light .footer p { color: var(--text-2) !important; }
html.theme-light .footer h3, html.theme-light .footer h4 { color: var(--text) !important; }
html.theme-light .footer-brand-name {
    background: linear-gradient(90deg, #7C3AED, #DB2777) !important;
    -webkit-background-clip: text !important; background-clip: text !important;
    -webkit-text-fill-color: transparent !important; color: transparent !important;
}
html.theme-light .footer-rules-link, html.theme-light .footer-rules-title { color: var(--accent) !important; background: transparent !important; border: none !important; box-shadow: none !important; }
html.theme-light .cart-add { color: var(--accent) !important; background: var(--surface) !important; border: 1px solid var(--accent) !important; box-shadow: none !important; }
html.theme-light .cart-add:hover { background: var(--accent) !important; color: #FFFFFF !important; }

/* =====================================================================
   DISCORD PANEL: glass (like the original Hacker MC glass panel),
   works in both themes. Ribbons show through the frosted glass.
   ===================================================================== */
.community .community-panel,
html.theme-light .community .community-panel {
    position: relative; isolation: isolate;
    background: rgba(34, 31, 43, 0.50) !important;
    -webkit-backdrop-filter: blur(16px) saturate(170%) !important;
            backdrop-filter: blur(16px) saturate(170%) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -1px 0 rgba(255, 255, 255, 0.06),
        0 24px 60px rgba(0, 0, 0, 0.35) !important;
    border-radius: 22px !important;
}
html.theme-light .community .community-panel {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.70) !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.90),
        0 18px 50px rgba(27, 26, 36, 0.12) !important;
}
/* soft diagonal gloss */
.community .community-panel::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,0.10) 45%, transparent 60%);
}
@supports (backdrop-filter: url(#liquid-glass)) {
    .community .community-panel { -webkit-backdrop-filter: url(#liquid-glass) saturate(170%) !important; backdrop-filter: url(#liquid-glass) saturate(170%) !important; }
}

/* =====================================================================
   FOOTER BANNER: the new castle artwork at the very bottom of every page
   =====================================================================  */
.footer { position: relative; isolation: isolate; overflow: hidden; background: transparent !important; }
.footer::before {
    display: block !important;
    content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none;
    background: url('assets/images/footer-castle.jpg') center 40% / cover no-repeat !important;
    filter: none !important; opacity: 1 !important;
}
.footer::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(17,15,24,0.78) 0%, rgba(17,15,24,0.90) 100%);
}
html.theme-light .footer::after {
    background: linear-gradient(180deg, rgba(255,250,240,0.84) 0%, rgba(255,250,240,0.93) 100%);
}
.footer > * { position: relative; z-index: 1; }
html.theme-light .footer { border-top: 1px solid var(--border) !important; }
html.theme-light .footer * { color: var(--text) !important; }
html.theme-light .footer p, html.theme-light .footer li, html.theme-light .footer a { color: var(--text-2) !important; }

/* ===================================================================
   FINAL PASS
   1) hero subtitle: no box, clean text
   2) navbar: transparent blur only (no fill, no refraction)
   3) section separators: moving gradient lines (both themes)
   4) footer banner: visible in BOTH themes
   =================================================================== */
.hero-subtitle, html.theme-light .hero-subtitle {
    background: none !important; border: none !important; box-shadow: none !important;
    padding: 0 !important; text-shadow: 0 2px 12px rgba(0,0,0,0.55) !important;
    color: #FFFFFF !important;
}

html .navbar::before, html.theme-light .navbar::before, html.lg-chromium .navbar::before {
    background: transparent !important;
    border: 1px solid rgba(255,255,255,0.18) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: blur(14px) saturate(160%) !important;
            backdrop-filter: blur(14px) saturate(160%) !important;
}
html.theme-light .navbar::before { border-color: rgba(27,26,36,0.12) !important; }

@keyframes sep-flow { from { background-position: 0% 50%; } to { background-position: 200% 50%; } }
html .section-divider, html.theme-light .section-divider {
    display: block !important;
    height: 2px !important;
    border: none !important;
    box-shadow: none !important;
    background: linear-gradient(90deg, transparent 0%, #38BDF8 22%, #8B5CF6 50%, #F472B6 78%, transparent 100%) !important;
    background-size: 200% 100% !important;
    animation: sep-flow 6s linear infinite !important;
    opacity: 0.9;
}

html.theme-light .footer, html.theme-light .footer.footer-section {
    background: transparent !important;
    border-top: 1px solid var(--border) !important;
}
html.theme-light .footer::before { display: block !important; }
html.theme-light .footer::after {
    background: linear-gradient(180deg, rgba(255,250,240,0.70) 0%, rgba(255,250,240,0.84) 100%) !important;
}
@media (prefers-reduced-motion: reduce) { html .section-divider { animation: none !important; } }
