/* ========================================
   AARMORY - RPG Item Shop Storefront
   ======================================== */

/* ========================================
   Custom Cursor - Elegant crosshair
   ======================================== */
html {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20"><circle cx="10" cy="10" r="3" fill="none" stroke="%238b5cf6" stroke-width="1.5"/><line x1="10" y1="2" x2="10" y2="6" stroke="%238b5cf6" stroke-width="1.5"/><line x1="10" y1="14" x2="10" y2="18" stroke="%238b5cf6" stroke-width="1.5"/><line x1="2" y1="10" x2="6" y2="10" stroke="%238b5cf6" stroke-width="1.5"/><line x1="14" y1="10" x2="18" y2="10" stroke="%238b5cf6" stroke-width="1.5"/><circle cx="10" cy="10" r="1" fill="%23fbbf24"/></svg>') 10 10, crosshair;
}

/* Pointer for interactive elements */
a, button, [role="button"], .item-card, .nav-orb, .filter-tab, .size-option, .contact-method, .vendor-portrait {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 2l10 9-4 1 3 7-2 1-3-7-4 3V2z" fill="%23a78bfa" stroke="%237c3aed" stroke-width="1"/></svg>') 7 2, pointer;
}

/* CSS Variables */
:root {
    /* Colors - Dark Theme (Default) */
    --black-deep: #050505;
    --black-primary: #0a0a0a;
    --black-secondary: #0f0f0f;
    --charcoal: #1a1a1a;
    --charcoal-light: #252525;
    --gray-dark: #2a2a2a;
    --gray-medium: #3a3a3a;
    --gray-light: #a1a1aa;
    --white: #f5f5f5;
    --white-dim: #e5e5e5;

    /* Purple spectrum */
    --purple-dark: #4c1d95;
    --purple-primary: #7c3aed;
    --purple-bright: #8b5cf6;
    --purple-light: #a78bfa;
    --purple-pale: #c4b5fd;
    --purple-glow: rgba(139, 92, 246, 0.5);
    --purple-glow-intense: rgba(139, 92, 246, 0.8);

    /* Accent colors */
    --gold: #fbbf24;
    --gold-dim: #d97706;
    --red-rare: #ef4444;
    --green-common: #22c55e;
    --blue-magic: #3b82f6;
    --orange-fire: #f97316;

    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-mono: 'Source Code Pro', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Appearance overrides (set dynamically via admin) */
    --bg-primary: var(--black-primary);
    --bg-secondary: var(--black-secondary);

    /* ── Rarity system ── */
    --rarity-common-bg:     rgba(8, 32, 16, 0.95);
    --rarity-common-text:   #4ade80;
    --rarity-common-border: rgba(74, 222, 128, 0.4);
    --rarity-common-glow:   rgba(74, 222, 128, 0.28);

    --rarity-rare-bg:       rgba(28, 12, 74, 0.95);
    --rarity-rare-text:     #a78bfa;
    --rarity-rare-border:   rgba(167, 139, 250, 0.45);
    --rarity-rare-glow:     rgba(139, 92, 246, 0.38);

    --rarity-uncommon-bg:     rgba(8, 20, 40, 0.95);
    --rarity-uncommon-text:   #60a5fa;
    --rarity-uncommon-border: rgba(96, 165, 250, 0.45);
    --rarity-uncommon-glow:   rgba(59, 130, 246, 0.35);

    --rarity-legendary-bg:      rgba(38, 20, 4, 0.95);
    --rarity-legendary-text:    #fbbf24;
    --rarity-legendary-border:  rgba(251, 191, 36, 0.5);
    --rarity-legendary-glow:    rgba(251, 191, 36, 0.42);

    --rarity-mythical-bg:     rgba(40, 4, 12, 0.95);
    --rarity-mythical-text:   #f87171;
    --rarity-mythical-border: rgba(248, 113, 113, 0.5);
    --rarity-mythical-glow:   rgba(220, 38, 38, 0.42);
}

/* Light Theme - Parchment/Fantasy Style */
[data-theme="light"] {
    --black-deep: #f8f5f0;
    --black-primary: #f5f1ea;
    --black-secondary: #ebe5db;
    --charcoal: #ddd5c8;
    --charcoal-light: #d4cbbe;
    --gray-dark: #c9bfb0;
    --gray-medium: #a89f8f;
    --gray-light: #5c5347;
    --white: #2d2518;
    --white-dim: #3d3328;

    /* Purple spectrum - adjusted for light mode */
    --purple-dark: #6d28d9;
    --purple-primary: #7c3aed;
    --purple-bright: #6d28d9;
    --purple-light: #5b21b6;
    --purple-pale: #4c1d95;
    --purple-glow: rgba(109, 40, 217, 0.3);
    --purple-glow-intense: rgba(109, 40, 217, 0.5);

    /* Accent colors - slightly adjusted */
    --gold: #b45309;
    --gold-dim: #92400e;
    --orange-fire: #c2410c;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

/* Global appearance background layer */
#appearance-bg-layer {
    position: fixed;
    inset: -30%;
    width: 160%;
    height: 160%;
    pointer-events: none;
    z-index: -1;
    background-repeat: repeat;
    background-color: transparent;
    transform-origin: center center;
    transition: opacity var(--transition-slow);
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary, var(--black-primary));
    color: var(--white);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: scroll;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* Vignette overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.4) 100%);
    pointer-events: none;
    z-index: 9999;
    transition: background var(--transition-slow);
}

[data-theme="light"] body::before,
body:has([data-theme="light"])::before {
    background: radial-gradient(ellipse at center, transparent 0%, transparent 50%, rgba(0, 0, 0, 0.15) 100%);
}

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
    position: fixed;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    border: 2px solid var(--gray-medium);
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 100;
    overflow: hidden;
}

.theme-toggle:hover {
    border-color: var(--purple-bright);
    color: var(--purple-light);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--purple-glow);
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
    transition: transform var(--transition-base), opacity var(--transition-base);
    position: absolute;
}

.theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="light"] .theme-toggle {
    background: var(--charcoal);
    border-color: var(--purple-primary);
    color: var(--purple-primary);
}

/* Selection */
::selection {
    background: var(--purple-primary);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--black-secondary);
    transition: background var(--transition-slow);
}

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

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

/* Global theme transitions for smooth switching */
.nav-orb,
.item-card,
.modal-content,
.filter-tab,
.contact-method,
.forge-vendor-speech,
.book-page,
.form-input,
.form-select,
.form-textarea,
.size-option span {
    transition: background-color var(--transition-slow),
                border-color var(--transition-slow),
                color var(--transition-slow),
                box-shadow var(--transition-slow);
}

/* ========================================
   Particles Background
   ======================================== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: var(--size, 4px);
    height: var(--size, 4px);
    background: var(--purple-bright);
    border-radius: 50%;
    opacity: var(--opacity, 0.5);
    filter: blur(1px);
    animation: float var(--duration, 15s) linear infinite;
    box-shadow: 0 0 10px var(--purple-glow), 0 0 20px var(--purple-glow);
    transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

[data-theme="light"] .particle {
    background: var(--purple-primary);
    box-shadow: 0 0 8px var(--purple-glow), 0 0 16px var(--purple-glow);
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(var(--drift, 0px)) scale(0);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity, 0.5);
        transform: translateY(90vh) translateX(var(--drift, 0px)) scale(1);
    }
    90% {
        opacity: var(--opacity, 0.5);
    }
    100% {
        transform: translateY(-10vh) translateX(calc(var(--drift, 0px) * -1)) scale(0);
        opacity: 0;
    }
}

/* ========================================
   Navigation Orbs
   ======================================== */
.nav-orbs {
    position: fixed;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    z-index: 100;
}

.nav-orb {
    position: relative;
    width: 48px;
    height: 48px;
    border: 2px solid var(--gray-medium);
    border-radius: 50%;
    background: var(--charcoal);
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    overflow: visible;
}

.nav-orb svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}

.nav-orb:hover {
    border-color: var(--purple-bright);
    color: var(--purple-light);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--purple-glow);
}

.nav-orb.active {
    border-color: var(--purple-primary);
    background: var(--purple-dark);
    color: var(--white);
    box-shadow: 0 0 30px var(--purple-glow), inset 0 0 20px rgba(139, 92, 246, 0.2);
}

.nav-label {
    position: absolute;
    left: calc(100% + var(--space-md));
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--purple-light);
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-base);
    pointer-events: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-orb:hover .nav-label {
    opacity: 1;
    transform: translateX(0);
}


/* ========================================
   Main Content
   ======================================== */
.main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.section {
    min-height: 100vh;
    display: none;
    padding: var(--space-3xl);
    padding-left: calc(80px + var(--space-3xl));
    flex-direction: column;
}

.section.active {
    display: flex;
    animation: sectionFadeIn 0.4s ease forwards;
}

.section.exiting {
    display: flex;
    animation: sectionFadeOut 0.3s ease forwards;
    pointer-events: none;
}

@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sectionFadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.section-title svg {
    width: 1em;
    height: 1em;
    color: var(--purple-bright);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-light);
    font-weight: 400;
}

/* ========================================
   Entrance Section
   ======================================== */
.section--entrance {
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    min-height: 100dvh;
    padding-left: var(--space-3xl);
    padding-right: var(--space-3xl);
}

/* Shop interior background */
.shop-interior {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Atmospheric gradient overlay */
.shop-interior::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 100%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 92, 246, 0.06) 0%, transparent 40%);
    pointer-events: none;
}

/* Subtle grid pattern */
.shop-interior::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 70%);
}

/* Shelves - more subtle, decorative */
.shelf {
    position: absolute;
    top: 20%;
    width: 80px;
    height: 200px;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xs);
    opacity: 0.3;
}

.shelf--left {
    left: 3%;
}

.shelf--right {
    right: 3%;
}

.shelf-item {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--gray-dark) 100%);
    border-radius: 4px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.shelf-item::before {
    content: '';
    position: absolute;
    inset: 4px;
    background: linear-gradient(45deg, transparent 40%, var(--purple-glow) 50%, transparent 60%);
    border-radius: 2px;
    opacity: 0.3;
}

.shelf-item::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--charcoal-light);
    border-radius: 0 0 4px 4px;
}

/* Lanterns - positioned as ambient lighting */
.lantern {
    position: absolute;
    top: 5%;
    width: 20px;
    height: 35px;
    background: linear-gradient(180deg, var(--gray-dark) 0%, var(--charcoal) 100%);
    border-radius: 4px 4px 50% 50%;
    opacity: 0.7;
}

.lantern::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 30px;
    background: var(--gray-medium);
}

.lantern::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: var(--orange-fire);
    border-radius: 2px 2px 50% 50%;
    box-shadow: 0 0 20px var(--orange-fire), 0 0 40px rgba(249, 115, 22, 0.4);
    animation: flicker 2s ease-in-out infinite;
}

.lantern--1 { left: 20%; animation-delay: 0s; }
.lantern--2 { left: 50%; animation-delay: 0.5s; }
.lantern--3 { left: 80%; animation-delay: 1s; }

@keyframes flicker {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Vendor Character - integrated into main layout */
.vendor {
    display: none; /* Hidden - we'll use a new approach */
}

.vendor-glow,
.vendor-character,
.vendor-hood,
.vendor-face,
.vendor-eye,
.vendor-body,
.vendor-arm,
.speech-bubble,
.speech-text,
.speech-indicator {
    display: none;
}

/* Counter - hidden, using new design */
.counter {
    display: none;
}

/* Logo */
.logo-container {
    text-align: center;
    z-index: 20;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Decorative line above logo */
.logo-container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--purple-primary), transparent);
}

.logo {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 12vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.25em;
    display: flex;
    justify-content: center;
    gap: 0.02em;
    margin-bottom: var(--space-md);
}

.logo-letter {
    display: inline-block;
    color: var(--white);
    text-shadow:
        0 0 40px var(--purple-glow),
        0 0 80px var(--purple-glow),
        0 2px 0 var(--purple-dark);
    animation: letterReveal 0.8s ease forwards;
    opacity: 0;
    transform: translateY(30px);
}

.logo-letter:nth-child(1) { animation-delay: 0.1s; }
.logo-letter:nth-child(2) { animation-delay: 0.15s; }
.logo-letter:nth-child(3) { animation-delay: 0.2s; }
.logo-letter:nth-child(4) { animation-delay: 0.25s; }
.logo-letter:nth-child(5) { animation-delay: 0.3s; }
.logo-letter:nth-child(6) { animation-delay: 0.35s; }
.logo-letter:nth-child(7) { animation-delay: 0.4s; }

@keyframes letterReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-letter:hover {
    color: var(--purple-bright);
    text-shadow: 0 0 60px var(--purple-glow-intense), 0 0 120px var(--purple-glow);
    transform: translateY(-5px) scale(1.05);
    transition: all var(--transition-base);
}

.tagline {
    font-family: var(--font-body);
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--purple-light);
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.8s;
    position: relative;
}

/* Decorative dots around tagline */
.tagline::before,
.tagline::after {
    content: '◆';
    font-size: 0.5rem;
    color: var(--purple-primary);
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.tagline::before {
    left: -30px;
}

.tagline::after {
    right: -30px;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Enter button */
.enter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-2xl);
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid var(--purple-primary);
    border-radius: 50px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    cursor: pointer;
    z-index: 20;
    transition: all var(--transition-base);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 1.2s, btnPulse 3s ease-in-out infinite 2s;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 20px transparent; }
    50% { box-shadow: 0 0 30px var(--purple-glow); }
}

.enter-btn.fade-complete {
    opacity: 1;
}

.enter-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--purple-glow);
    background: linear-gradient(90deg, var(--purple-dark), var(--purple-primary));
}

.enter-btn-icon {
    display: flex;
    transition: transform var(--transition-base);
}

.enter-btn-icon svg {
    width: 20px;
    height: 20px;
}

.enter-btn:hover .enter-btn-icon {
    transform: translateX(5px);
}

/* Entrance hero content wrapper */
.entrance-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    width: 100%;
    padding: var(--space-2xl) var(--space-3xl);
    position: relative;
}

/* Decorative corner brackets */
.entrance-hero::before,
.entrance-hero::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--purple-primary);
    opacity: 0.3;
}

.entrance-hero::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.entrance-hero::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Vendor portrait - new integrated design */
.vendor-portrait {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--charcoal) 100%);
    border: 3px solid var(--purple-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    position: relative;
    box-shadow: 0 0 40px var(--purple-glow);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 0.5s;
}

.vendor-portrait::before {
    content: '';
    position: absolute;
    inset: -8px;
    border: 1px solid var(--purple-primary);
    border-radius: 50%;
    opacity: 0.3;
}

.vendor-portrait-inner {
    width: 60px;
    height: 70px;
    position: relative;
}

.vendor-portrait-hood {
    width: 60px;
    height: 45px;
    background: linear-gradient(180deg, var(--purple-primary) 0%, var(--purple-dark) 100%);
    border-radius: 30px 30px 15px 15px;
    position: absolute;
    top: 0;
}

.vendor-portrait-face {
    width: 35px;
    height: 30px;
    background: var(--black-deep);
    border-radius: 8px 8px 18px 18px;
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
}

.vendor-portrait-eyes {
    position: absolute;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.vendor-portrait-eye {
    width: 6px;
    height: 6px;
    background: var(--purple-bright);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--purple-bright), 0 0 16px var(--purple-glow);
    animation: blink 4s ease-in-out infinite;
}

@keyframes blink {
    0%, 45%, 55%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.1); }
}

/* Welcome message */
.welcome-message {
    text-align: center;
    max-width: 400px;
    margin-bottom: var(--space-xl);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards 1.5s;
}

.welcome-text {
    font-size: 0.95rem;
    color: var(--gray-light);
    line-height: 1.6;
    font-style: italic;
}

/* Floating runes decoration */
.floating-runes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.rune {
    position: absolute;
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--purple-primary);
    opacity: 0.1;
    animation: floatRune 20s linear infinite;
}

.rune:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.rune:nth-child(2) { left: 85%; top: 30%; animation-delay: -5s; }
.rune:nth-child(3) { left: 15%; top: 70%; animation-delay: -10s; }
.rune:nth-child(4) { left: 80%; top: 75%; animation-delay: -15s; }

@keyframes floatRune {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.1; }
    50% { transform: translateY(-20px) rotate(10deg); opacity: 0.2; }
}

/* ========================================
   Inventory Section
   ======================================== */
.section--inventory {
    padding-top: var(--space-2xl);
}

/* Filter tabs */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.filter-tab {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 1px solid var(--gray-medium);
    border-radius: 20px;
    color: var(--gray-light);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
}

.filter-tab:hover {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

.filter-tab.active {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    color: var(--white);
    box-shadow: 0 0 20px var(--purple-glow);
}

/* Inventory grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

/* Item card */
.item-card {
    position: relative;
    background: var(--charcoal);
    border: 2px solid var(--gray-dark);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-base);
    opacity: 0;
    transform: translateY(20px);
    animation: cardReveal 0.5s ease forwards;
}

.item-card:nth-child(1) { animation-delay: 0.1s; }
.item-card:nth-child(2) { animation-delay: 0.15s; }
.item-card:nth-child(3) { animation-delay: 0.2s; }
.item-card:nth-child(4) { animation-delay: 0.25s; }
.item-card:nth-child(5) { animation-delay: 0.3s; }
.item-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item-card:hover {
    transform: translateY(-8px) scale(1.02);
}

/* Rarity-driven card hover border + glow */
.item-card[data-rarity="common"]:hover    { border-color: var(--rarity-common-text);    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--rarity-common-glow); }
.item-card[data-rarity="uncommon"]:hover  { border-color: var(--rarity-uncommon-text);  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--rarity-uncommon-glow); }
.item-card[data-rarity="rare"]:hover      { border-color: var(--rarity-rare-text);      box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--rarity-rare-glow); }
.item-card[data-rarity="legendary"]:hover { border-color: var(--rarity-legendary-text); box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--rarity-legendary-glow); }
.item-card[data-rarity="mythical"]:hover  { border-color: var(--rarity-mythical-text);  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px var(--rarity-mythical-glow); }

.item-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    z-index: 1;
}

/* Rarity-tinted inner glow on hover */
.item-card[data-rarity="common"]::before    { background: linear-gradient(135deg, transparent 0%, var(--rarity-common-glow) 100%); }
.item-card[data-rarity="uncommon"]::before  { background: linear-gradient(135deg, transparent 0%, var(--rarity-uncommon-glow) 100%); }
.item-card[data-rarity="rare"]::before      { background: linear-gradient(135deg, transparent 0%, var(--rarity-rare-glow) 100%); }
.item-card[data-rarity="legendary"]::before { background: linear-gradient(135deg, transparent 0%, var(--rarity-legendary-glow) 100%); }
.item-card[data-rarity="mythical"]::before  { background: linear-gradient(135deg, transparent 0%, var(--rarity-mythical-glow) 100%); }

.item-card:hover::before {
    opacity: 0.15;
}

/* Rarity indicator */
/* ── Rarity badge base ── */
.item-rarity {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    z-index: 2;
    transition: box-shadow var(--transition-fast);
}

.item-rarity--common {
    background: var(--rarity-common-bg);
    color: var(--rarity-common-text);
    border-color: var(--rarity-common-border);
    box-shadow: 0 0 8px var(--rarity-common-glow),
                inset 0 0 6px rgba(74, 222, 128, 0.06);
}
.item-rarity--common:hover {
    box-shadow: 0 0 16px var(--rarity-common-glow),
                inset 0 0 10px rgba(74, 222, 128, 0.1);
}

.item-rarity--uncommon {
    background: var(--rarity-uncommon-bg);
    color: var(--rarity-uncommon-text);
    border-color: var(--rarity-uncommon-border);
    box-shadow: 0 0 9px var(--rarity-uncommon-glow),
                inset 0 0 6px rgba(96, 165, 250, 0.07);
}
.item-rarity--uncommon:hover {
    box-shadow: 0 0 18px var(--rarity-uncommon-glow),
                inset 0 0 10px rgba(96, 165, 250, 0.12);
}

.item-rarity--rare {
    background: var(--rarity-rare-bg);
    color: var(--rarity-rare-text);
    border-color: var(--rarity-rare-border);
    box-shadow: 0 0 10px var(--rarity-rare-glow),
                inset 0 0 6px rgba(139, 92, 246, 0.08);
}
.item-rarity--rare:hover {
    box-shadow: 0 0 20px var(--rarity-rare-glow),
                inset 0 0 12px rgba(139, 92, 246, 0.12);
}

.item-rarity--legendary {
    background: var(--rarity-legendary-bg);
    color: var(--rarity-legendary-text);
    border-color: var(--rarity-legendary-border);
    box-shadow: 0 0 14px var(--rarity-legendary-glow),
                inset 0 0 8px rgba(251, 191, 36, 0.08);
    animation: legendaryPulse 2.5s ease-in-out infinite;
}
.item-rarity--legendary:hover {
    box-shadow: 0 0 26px var(--rarity-legendary-glow),
                inset 0 0 14px rgba(251, 191, 36, 0.14);
}

@keyframes legendaryPulse {
    0%, 100% {
        box-shadow: 0 0 14px var(--rarity-legendary-glow),
                    inset 0 0 8px rgba(251, 191, 36, 0.08);
    }
    50% {
        box-shadow: 0 0 28px rgba(251, 191, 36, 0.65),
                    inset 0 0 14px rgba(251, 191, 36, 0.14);
    }
}

.item-rarity--mythical {
    background: var(--rarity-mythical-bg);
    color: var(--rarity-mythical-text);
    border-color: var(--rarity-mythical-border);
    box-shadow: 0 0 14px var(--rarity-mythical-glow),
                inset 0 0 8px rgba(220, 38, 38, 0.08);
    animation: mythicalPulse 2s ease-in-out infinite;
}
.item-rarity--mythical:hover {
    box-shadow: 0 0 26px var(--rarity-mythical-glow),
                inset 0 0 14px rgba(220, 38, 38, 0.14);
}

@keyframes mythicalPulse {
    0%, 100% {
        box-shadow: 0 0 14px var(--rarity-mythical-glow),
                    inset 0 0 8px rgba(220, 38, 38, 0.08);
    }
    50% {
        box-shadow: 0 0 28px rgba(220, 38, 38, 0.65),
                    inset 0 0 14px rgba(220, 38, 38, 0.14);
    }
}

/* Item image */
.item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: var(--black-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-image-placeholder {
    width: 60%;
    height: 60%;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--charcoal-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
}

.item-card:hover .item-image-placeholder {
    transform: scale(1.05);
}

.item-image-placeholder svg {
    width: 40%;
    height: 40%;
    color: var(--gray-medium);
}

/* Item info */
.item-info {
    padding: var(--space-md);
}

.item-name {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: var(--space-xs);
}

.item-type {
    font-size: 0.75rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

/* Item stats */
.item-stats {
    display: flex;
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-dark);
}

.item-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.75rem;
    color: var(--gray-light);
}

.item-stat svg {
    width: 14px;
    height: 14px;
    color: var(--purple-light);
}

/* Item price */
.item-price {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold);
}

/* ========================================
   Forge Section
   ======================================== */
.section--forge {
    position: relative;
    justify-content: center;
    align-items: center;
}

.forge-scene {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    pointer-events: none;
    overflow: hidden;
}

.forge-anvil {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 80px;
    background: linear-gradient(180deg, var(--gray-medium) 0%, var(--gray-dark) 100%);
    border-radius: 10px 10px 5px 5px;
}

.forge-anvil::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background: var(--gray-dark);
    border-radius: 5px;
}

.forge-flames {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.flame {
    width: 30px;
    height: 60px;
    background: linear-gradient(180deg, var(--orange-fire) 0%, var(--gold) 50%, transparent 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: burn 0.5s ease-in-out infinite alternate;
    filter: blur(2px);
}

.flame--1 { animation-delay: 0s; height: 50px; }
.flame--2 { animation-delay: 0.1s; height: 70px; }
.flame--3 { animation-delay: 0.2s; height: 55px; }

@keyframes burn {
    0% { transform: scaleY(1) scaleX(1); opacity: 0.8; }
    100% { transform: scaleY(1.1) scaleX(0.9); opacity: 1; }
}

.forge-sparks {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 150px;
}

.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkFly 1s ease-out forwards;
}

@keyframes sparkFly {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Forge content */
.forge-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    width: 100%;
}

.forge-vendor-speech {
    background: var(--charcoal);
    border: 2px solid var(--purple-primary);
    border-radius: 16px;
    padding: var(--space-lg);
    margin-bottom: var(--space-2xl);
    position: relative;
    box-shadow: 0 0 30px var(--purple-glow);
}

.forge-vendor-speech p {
    font-size: 1.125rem;
    color: var(--white);
    font-style: italic;
    text-align: center;
}

/* Form styling */
.forge-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--purple-light);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--black-secondary);
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--purple-primary);
    box-shadow: 0 0 20px var(--purple-glow);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--gray-medium);
}

.input-glow {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.form-input:focus ~ .input-glow,
.form-textarea:focus ~ .input-glow {
    opacity: 1;
    box-shadow: 0 0 30px var(--purple-glow);
}

/* Select wrapper */
.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: var(--space-2xl);
}

.select-arrow {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--gray-light);
    pointer-events: none;
}

/* Size options */
.size-options {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.size-option {
    position: relative;
    cursor: pointer;
}

.size-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.size-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--black-secondary);
    border: 2px solid var(--gray-dark);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-light);
    transition: all var(--transition-base);
}

.size-option:hover span {
    border-color: var(--purple-light);
    color: var(--purple-light);
}

.size-option input:checked + span {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    color: var(--white);
    box-shadow: 0 0 20px var(--purple-glow);
}

/* Form textarea */
.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Submit button */
.forge-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-2xl);
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-primary) 100%);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
    align-self: center;
    margin-top: var(--space-md);
}

.forge-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px var(--purple-glow);
}

.forge-submit-icon svg {
    width: 24px;
    height: 24px;
}

/* Success state */
.forge-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl);
}

.forge-success.show {
    display: flex;
}

.forge-form.hidden {
    display: none;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--purple-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    animation: successPop 0.5s ease;
}

@keyframes successPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: var(--white);
}

.forge-success h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.forge-success p {
    color: var(--gray-light);
    margin-bottom: var(--space-xl);
}

.forge-another {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 2px solid var(--purple-primary);
    border-radius: 25px;
    color: var(--purple-light);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.forge-another:hover {
    background: var(--purple-primary);
    color: var(--white);
}

/* ========================================
   Story Section
   ======================================== */
.section--story {
    justify-content: center;
    align-items: center;
}

.story-book {
    display: flex;
    max-width: 900px;
    width: 100%;
    perspective: 1000px;
}

.book-spine {
    width: 30px;
    background: linear-gradient(90deg, var(--gray-dark) 0%, var(--charcoal) 50%, var(--gray-dark) 100%);
    border-radius: 4px 0 0 4px;
    box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.5);
}

.book-page {
    flex: 1;
    background: linear-gradient(135deg, #1e1e24 0%, #16161a 100%);
    padding: var(--space-2xl);
    position: relative;
    min-height: 500px;
}

.book-page--left {
    border-radius: 0;
    box-shadow: inset -10px 0 30px rgba(0, 0, 0, 0.3);
}

.book-page--right {
    border-radius: 0 4px 4px 0;
    box-shadow: inset 10px 0 30px rgba(0, 0, 0, 0.3);
}

.page-corner {
    position: absolute;
    bottom: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, transparent 50%, var(--charcoal-light) 50%);
}

.book-page--left .page-corner {
    right: 0;
}

.book-page--right .page-corner {
    left: 0;
    background: linear-gradient(-135deg, transparent 50%, var(--charcoal-light) 50%);
}

.page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--purple-light);
    margin-bottom: var(--space-md);
}

.story-divider {
    margin-bottom: var(--space-lg);
    color: var(--purple-primary);
}

.story-divider svg {
    width: 100px;
    height: 20px;
}

.story-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-light);
    margin-bottom: var(--space-md);
}

.story-text strong {
    color: var(--purple-light);
}

.story-signature {
    margin-top: auto;
    padding-top: var(--space-lg);
    font-family: var(--font-display);
    font-style: italic;
    color: var(--purple-light);
}

.story-seal {
    position: absolute;
    bottom: var(--space-2xl);
    right: var(--space-2xl);
    opacity: 0.3;
    color: var(--purple-primary);
}

.story-seal svg {
    width: 60px;
    height: 60px;
}

/* ========================================
   Contact Section
   ======================================== */
.section--contact {
    justify-content: center;
    align-items: center;
}

.contact-scene {
    position: relative;
    width: 300px;
    height: 200px;
    margin-bottom: var(--space-2xl);
}

/* Messenger bird */
.messenger-bird {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: birdFly 3s ease-in-out infinite;
}

@keyframes birdFly {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-15px); }
}

.bird-body {
    width: 50px;
    height: 35px;
    background: var(--purple-primary);
    border-radius: 50%;
    position: relative;
}

.bird-wing {
    position: absolute;
    top: 5px;
    left: -10px;
    width: 30px;
    height: 20px;
    background: var(--purple-dark);
    border-radius: 50% 0 50% 50%;
    transform-origin: right center;
    animation: wingFlap 0.3s ease-in-out infinite;
}

@keyframes wingFlap {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(20deg); }
}

.bird-head {
    position: absolute;
    top: -5px;
    right: -15px;
    width: 25px;
    height: 25px;
    background: var(--purple-primary);
    border-radius: 50%;
}

.bird-eye {
    position: absolute;
    top: 8px;
    right: 5px;
    width: 6px;
    height: 6px;
    background: var(--white);
    border-radius: 50%;
}

.bird-eye::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 3px;
    height: 3px;
    background: var(--black-primary);
    border-radius: 50%;
}

.bird-beak {
    position: absolute;
    top: 12px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 10px solid var(--gold);
}

.bird-tail {
    position: absolute;
    top: 10px;
    left: -20px;
    width: 25px;
    height: 15px;
    background: var(--purple-dark);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
}

/* Mailbox */
.mailbox {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.mailbox-post {
    width: 10px;
    height: 80px;
    background: var(--gray-dark);
    margin: 0 auto;
}

.mailbox-box {
    width: 70px;
    height: 50px;
    background: linear-gradient(180deg, var(--charcoal-light) 0%, var(--gray-dark) 100%);
    border-radius: 5px 25px 5px 5px;
    position: relative;
    margin-bottom: -5px;
}

.mailbox-flag {
    position: absolute;
    top: 10px;
    right: -15px;
    width: 20px;
    height: 15px;
    background: var(--purple-primary);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    animation: flagWave 2s ease-in-out infinite;
}

@keyframes flagWave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.mailbox-door {
    position: absolute;
    left: 10px;
    top: 15px;
    width: 35px;
    height: 25px;
    background: var(--black-secondary);
    border-radius: 3px;
    border: 2px solid var(--gray-medium);
}

/* Contact content */
.contact-content {
    text-align: center;
    max-width: 600px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.contact-method {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--charcoal);
    border: 2px solid var(--gray-dark);
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--transition-base);
}

.contact-method:hover {
    border-color: var(--purple-primary);
    transform: translateX(10px);
    box-shadow: 0 0 30px var(--purple-glow);
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--purple-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.method-icon svg {
    width: 24px;
    height: 24px;
    color: var(--purple-light);
}

.method-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.method-label {
    font-size: 0.75rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.method-value {
    font-size: 1rem;
    color: var(--white);
    font-weight: 500;
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: var(--charcoal);
    border: 2px solid var(--purple-primary);
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-base);
    box-shadow: 0 0 60px var(--purple-glow);
}

.modal.open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 32px;
    height: 32px;
    background: var(--gray-dark);
    border: none;
    border-radius: 50%;
    color: var(--gray-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    z-index: 10;
}

.modal-close:hover {
    background: var(--purple-primary);
    color: var(--white);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-body {
    padding: var(--space-lg);
}

/* Modal product detail */
.modal-product {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--space-lg);
    align-items: start;
}

.modal-image {
    aspect-ratio: 1;
    background: var(--black-secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
}

.modal-image-placeholder {
    width: 70%;
    height: 70%;
    background: linear-gradient(135deg, var(--gray-dark) 0%, var(--charcoal-light) 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-placeholder svg {
    width: 50%;
    height: 50%;
    color: var(--gray-medium);
}

.modal-details {
    display: flex;
    flex-direction: column;
}

.modal-rarity {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    margin-bottom: var(--space-sm);
    width: fit-content;
    transition: box-shadow var(--transition-fast);
    /* color/border/glow come from .item-rarity--* applied alongside */
}

.modal-name {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 2px;
}

.modal-type {
    font-size: 0.7rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.modal-description {
    color: var(--gray-light);
    line-height: 1.5;
    font-size: 0.875rem;
    margin-bottom: var(--space-md);
}

.modal-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--black-secondary);
    border-radius: 6px;
    margin-bottom: var(--space-md);
}

.modal-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.modal-stat-label {
    font-size: 0.6rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.modal-stat-value {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--purple-light);
}

.modal-price {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: var(--space-sm);
}

.modal-actions {
    display: flex;
    gap: var(--space-md);
}

.btn-acquire {
    flex: 1;
    padding: var(--space-sm) var(--space-lg);
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-primary) 100%);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-acquire:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--purple-glow);
}

/* ========================================
   Cart Indicator
   ======================================== */
.cart-indicator {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 56px;
    height: 56px;
    background: var(--purple-primary);
    border: none;
    border-radius: 50%;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    z-index: 100;
    box-shadow: 0 0 30px var(--purple-glow);
}

.cart-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 0 50px var(--purple-glow-intense);
}

.cart-indicator svg {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 10px;
    color: var(--black-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-xs);
}

.cart-indicator.empty {
    opacity: 0;
    pointer-events: none;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .nav-orbs {
        left: var(--space-md);
    }

    .section {
        padding-left: calc(60px + var(--space-xl));
    }

    .modal-product {
        grid-template-columns: 150px 1fr;
        gap: var(--space-md);
    }

    .modal-image {
        width: 150px;
        height: 150px;
    }

    .story-book {
        flex-direction: column;
    }

    .book-spine {
        width: 100%;
        height: 10px;
        border-radius: 4px 4px 0 0;
    }

    .book-page--left,
    .book-page--right {
        border-radius: 0;
    }

    .book-page--right {
        border-radius: 0 0 4px 4px;
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        width: 40px;
        height: 40px;
        top: var(--space-md);
        right: var(--space-md);
    }

    .theme-toggle svg {
        width: 18px;
        height: 18px;
    }

    .nav-orbs {
        position: fixed;
        left: 50%;
        top: auto;
        bottom: var(--space-md);
        transform: translateX(-50%);
        flex-direction: row;
        background: var(--charcoal);
        padding: var(--space-sm);
        border-radius: 30px;
        border: 1px solid var(--gray-dark);
    }

    .nav-orb {
        width: 40px;
        height: 40px;
    }

    .nav-label {
        display: none;
    }

    .section {
        padding: var(--space-xl);
        padding-bottom: 100px;
    }

    .shelf {
        display: none;
    }


    .cart-indicator {
        bottom: 80px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-methods {
        padding: 0 var(--space-md);
    }

    /* Entrance responsive */
    .vendor-portrait {
        width: 90px;
        height: 90px;
    }

    .vendor-portrait-inner {
        width: 45px;
        height: 55px;
    }

    .vendor-portrait-hood {
        width: 45px;
        height: 35px;
    }

    .vendor-portrait-face {
        width: 28px;
        height: 24px;
        top: 18px;
    }

    .vendor-portrait-eyes {
        top: 26px;
        gap: 10px;
    }

    .vendor-portrait-eye {
        width: 5px;
        height: 5px;
    }

    .logo {
        font-size: clamp(2.5rem, 10vw, 4rem);
        letter-spacing: 0.15em;
    }

    .tagline {
        font-size: 0.85rem;
        letter-spacing: 0.25em;
    }

    .tagline::before,
    .tagline::after {
        display: none;
    }

    .welcome-message {
        padding: 0 var(--space-md);
    }

    .welcome-text {
        font-size: 0.85rem;
    }

    .floating-runes {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }

    .tagline {
        font-size: 0.875rem;
        letter-spacing: 0.2em;
    }

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

    .modal-body {
        padding: var(--space-md);
    }

    .modal-product {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .modal-image {
        width: 120px;
        height: 120px;
        margin: 0 auto var(--space-md);
    }

    .modal-rarity {
        margin: 0 auto var(--space-sm);
    }

    .modal-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .size-options {
        justify-content: center;
    }
}


/* ========================================
   3D Card Tilt Effect
   ======================================== */
.item-card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.item-card.tilt-active {
    transition: none !important;
}

.item-card .item-image,
.item-card .item-info {
    transform: translateZ(20px);
}

.item-card .item-rarity {
    transform: translateZ(40px);
}

/* Card sparkle effect on hover */
.item-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(139, 92, 246, 0.3) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    z-index: 2;
    border-radius: 12px;
}

.item-card:hover::after {
    opacity: 1;
}

/* ========================================
   Button Glow Burst
   ======================================== */
.filter-tab {
    position: relative;
}

/* Glow effect on hover using box-shadow instead of pseudo-elements */
.enter-btn:hover,
.forge-submit:hover,
.btn-acquire:hover {
    box-shadow:
        0 0 40px var(--purple-glow),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

/* ========================================
   Magic Rune Circle Around Vendor Portrait
   ======================================== */
.vendor-portrait {
    position: relative;
}

.magic-circle {
    position: absolute;
    inset: -30px;
    pointer-events: none;
}

.magic-circle-ring {
    position: absolute;
    inset: 0;
    border: 1px solid var(--purple-primary);
    border-radius: 50%;
    opacity: 0.5;
}

.magic-circle-ring--outer {
    animation: rotateCircle 20s linear infinite;
}

.magic-circle-ring--inner {
    inset: 15px;
    animation: rotateCircle 15s linear infinite reverse;
}

@keyframes rotateCircle {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.magic-rune {
    position: absolute;
    font-family: var(--font-display);
    font-size: 0.75rem;
    color: var(--purple-bright);
    text-shadow: 0 0 10px var(--purple-glow);
    animation: runeGlow 3s ease-in-out infinite;
}

.magic-rune:nth-child(2) { top: 0; left: 50%; transform: translateX(-50%); animation-delay: 0s; }
.magic-rune:nth-child(3) { top: 20%; right: 5%; animation-delay: 0.4s; }
.magic-rune:nth-child(4) { top: 50%; right: 0; transform: translateY(-50%); animation-delay: 0.8s; }
.magic-rune:nth-child(5) { bottom: 20%; right: 5%; animation-delay: 1.2s; }
.magic-rune:nth-child(6) { bottom: 0; left: 50%; transform: translateX(-50%); animation-delay: 1.6s; }
.magic-rune:nth-child(7) { bottom: 20%; left: 5%; animation-delay: 2s; }
.magic-rune:nth-child(8) { top: 50%; left: 0; transform: translateY(-50%); animation-delay: 2.4s; }
.magic-rune:nth-child(9) { top: 20%; left: 5%; animation-delay: 2.8s; }

@keyframes runeGlow {
    0%, 100% { opacity: 0.4; text-shadow: 0 0 10px var(--purple-glow); }
    50% { opacity: 1; text-shadow: 0 0 20px var(--purple-glow-intense), 0 0 30px var(--purple-glow); }
}

/* ========================================
   Enhanced Particle System - Embers
   ======================================== */
.ember {
    position: absolute;
    width: var(--ember-size, 3px);
    height: var(--ember-size, 3px);
    background: var(--orange-fire);
    border-radius: 50%;
    filter: blur(0.5px);
    box-shadow: 0 0 6px var(--orange-fire), 0 0 12px rgba(249, 115, 22, 0.5);
    animation: emberFloat var(--ember-duration, 4s) ease-out forwards;
    pointer-events: none;
}

@keyframes emberFloat {
    0% {
        opacity: 1;
        transform: translateY(0) translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(calc(var(--ember-drift-y, -100px))) translateX(var(--ember-drift-x, 20px)) scale(0);
    }
}

/* Card hover sparkles */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    pointer-events: none;
    animation: sparkleAnim 0.6s ease-out forwards;
}

@keyframes sparkleAnim {
    0% {
        opacity: 1;
        transform: scale(0) translate(0, 0);
    }
    50% {
        opacity: 1;
        transform: scale(1) translate(var(--sparkle-x, 10px), var(--sparkle-y, -10px));
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(calc(var(--sparkle-x, 10px) * 2), calc(var(--sparkle-y, -10px) * 2));
    }
}

/* ========================================
   Achievement Toast System
   ======================================== */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    pointer-events: none;
}

.achievement-toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--gray-dark) 100%);
    border: 2px solid var(--gold);
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.3), 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    opacity: 0;
    animation: toastSlideIn 0.5s var(--transition-bounce) forwards;
    pointer-events: auto;
    overflow: hidden;
}

.achievement-toast::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.1), transparent);
    animation: goldShimmer 2s ease-in-out infinite;
}

@keyframes goldShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes toastSlideIn {
    0% {
        transform: translateX(120%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.achievement-toast.toast-exit {
    animation: toastSlideOut 0.4s ease-in forwards;
}

@keyframes toastSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(120%);
        opacity: 0;
    }
}

.toast-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: toastIconPop 0.5s ease 0.3s both;
}

@keyframes toastIconPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.toast-icon svg {
    width: 24px;
    height: 24px;
    color: var(--black-primary);
}

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.toast-title {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.toast-message {
    font-size: 1rem;
    color: var(--white);
    font-weight: 500;
}

/* ========================================
   Screen Shake Utility
   ======================================== */
@keyframes screenShake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
    20%, 40%, 60%, 80% { transform: translateX(2px); }
}

body.shake {
    animation: screenShake 0.4s ease;
}

/* ========================================
   Cart as Inventory Panel
   ======================================== */
.cart-indicator {
    transition: all var(--transition-base), transform var(--transition-bounce);
}

.cart-indicator.pulse {
    animation: cartPulse 0.4s ease;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); box-shadow: 0 0 60px var(--purple-glow-intense); }
    100% { transform: scale(1); }
}


/* ========================================
   Easter Egg - Vendor Portrait Interaction
   ======================================== */
.vendor-portrait.clicked .vendor-portrait-inner {
    animation: vendorBounce 0.3s ease;
}

@keyframes vendorBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.vendor-portrait.easter-egg-active .vendor-portrait-inner {
    animation: vendorCelebrate 0.6s ease;
}

@keyframes vendorCelebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.15) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.15) rotate(-3deg); }
}

.vendor-portrait.easter-egg-active .vendor-portrait-eye {
    animation: vendorWink 0.6s ease;
}

@keyframes vendorWink {
    0%, 40%, 100% { transform: scaleY(1); }
    20% { transform: scaleY(0.1); }
    60% { transform: scaleY(0.1); }
}

/* Easter egg speech bubble */
.vendor-easter-speech {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--charcoal);
    border: 2px solid var(--gold);
    border-radius: 12px;
    padding: var(--space-sm) var(--space-md);
    white-space: nowrap;
    font-size: 0.875rem;
    color: var(--gold);
    opacity: 0;
    animation: speechBubblePop 0.4s ease forwards;
    z-index: 100;
}

.vendor-easter-speech::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid var(--gold);
}

@keyframes speechBubblePop {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.8); }
    100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}


/* ========================================
   Responsive Adjustments for New Features
   ======================================== */
@media (max-width: 768px) {
    .toast-container {
        top: auto;
        bottom: 100px;
        right: var(--space-md);
        left: var(--space-md);
    }

    .achievement-toast {
        width: 100%;
    }

    .magic-circle {
        inset: -20px;
    }

    .magic-rune {
        font-size: 0.6rem;
    }
}

/* ========================================
   Product Images & Vendor Avatar
   ======================================== */
.item-image-actual {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.item-card:hover .item-image-actual {
    transform: scale(1.05);
}

.vendor-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ========================================
   War Paint Studio
   ======================================== */
.section--warpaint {
    flex-direction: column;
}

.warpaint-content {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.warpaint-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    margin-top: var(--space-lg);
}

.warpaint-label {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--purple-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.warpaint-label .stencil-count {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--gray-light);
    text-transform: none;
    letter-spacing: 0;
}

.warpaint-empty-msg {
    color: var(--gray-light);
    font-size: 0.85rem;
    font-style: italic;
}

/* T-shirt preview */
.warpaint-preview-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.tshirt-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--black-secondary);
    border: 1px solid var(--gray-dark);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tshirt-preview-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gray-light);
}

.tshirt-preview-empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.4;
}

.tshirt-preview-empty p {
    font-size: 0.85rem;
}

.tshirt-base-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stencil-overlay {
    position: absolute;
    inset: 0;
    pointer-events: all;
}

/* View switcher (Front / Back) */
.view-switcher {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-sm);
}

.view-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--gray-dark);
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.view-tab svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.view-tab:hover {
    border-color: var(--purple-primary);
    color: var(--text-primary);
}

.view-tab.active {
    background: var(--purple-primary);
    border-color: var(--purple-primary);
    color: #fff;
}

/* Placed stencil on overlay */
.placed-stencil {
    position: absolute;
    cursor: move;
    user-select: none;
    touch-action: none;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.15s;
}

.placed-stencil.selected {
    border-color: var(--purple-primary);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.35);
}

/* Stencil transform panel */
.stencil-transform-panel {
    background: var(--surface-secondary);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    padding: var(--space-sm) var(--space-md);
    margin-top: var(--space-sm);
}

.transform-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.transform-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.transform-header-actions {
    display: flex;
    gap: var(--space-xs);
}

.transform-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 10px;
}

.transform-row:last-child {
    margin-bottom: 0;
}

.transform-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    width: 48px;
    flex-shrink: 0;
}

.transform-range {
    flex: 1;
    accent-color: var(--purple-primary);
    cursor: pointer;
}

.transform-val {
    font-size: 0.8rem;
    color: var(--text-primary);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.transform-btn {
    padding: 5px 10px;
    border: 1px solid var(--gray-dark);
    border-radius: 5px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.transform-btn:hover {
    border-color: var(--purple-primary);
    color: var(--text-primary);
}

.transform-btn-copy {
    border-color: var(--purple-primary);
    color: var(--purple-primary);
}

.transform-btn-copy:hover {
    background: var(--purple-primary);
    color: #fff;
}

.transform-btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.transform-btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* Special requests */
.special-requests-wrap {
    margin-bottom: var(--space-md);
}

.special-requests-textarea {
    margin-top: var(--space-xs);
    resize: vertical;
    min-height: 72px;
}

.stencil-overlay-img {
    filter: drop-shadow(0 0 8px var(--purple-glow));
}

/* Base color thumbnails */
.base-selector {
    margin-top: var(--space-sm);
}

.base-thumbs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.base-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--gray-dark);
    background: var(--black-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.base-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.base-thumb:hover {
    border-color: var(--purple-light);
}

.base-thumb.active {
    border-color: var(--purple-primary);
    box-shadow: 0 0 15px var(--purple-glow);
}

/* Stencil gallery */
.stencil-section.disabled {
    pointer-events: none;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.stencil-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: var(--space-sm);
}

.stencil-card {
    background: var(--charcoal);
    border: 2px solid var(--gray-dark);
    border-radius: 10px;
    padding: var(--space-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stencil-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 6px;
}

.stencil-name {
    font-size: 0.65rem;
    color: var(--gray-light);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.stencil-card:hover {
    border-color: var(--purple-light);
    transform: translateY(-2px);
}

.stencil-card.selected {
    border-color: var(--purple-primary);
    box-shadow: 0 0 15px var(--purple-glow);
    background: rgba(139, 92, 246, 0.1);
}

/* Dealer's Choice toggle */
.dealers-choice-wrap {
    margin: var(--space-md) 0;
}

.dealers-choice-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    cursor: pointer;
    padding: var(--space-md);
    background: var(--charcoal);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    transition: all var(--transition-base);
}

.dealers-choice-toggle:hover {
    border-color: var(--purple-light);
}

.dealers-choice-toggle input[type="checkbox"] {
    display: none;
}

.dealers-choice-slider {
    width: 44px;
    height: 24px;
    background: var(--gray-dark);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

.dealers-choice-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.dealers-choice-toggle input:checked + .dealers-choice-slider {
    background: var(--purple-primary);
}

.dealers-choice-toggle input:checked + .dealers-choice-slider::after {
    transform: translateX(20px);
}

.dealers-choice-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dealers-choice-text strong {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--white);
}

.dealers-choice-text small {
    font-size: 0.75rem;
    color: var(--gray-light);
}

/* Size selector */
.warpaint-size-section {
    margin-bottom: var(--space-md);
}

.warpaint-sizes {
    display: flex;
    gap: var(--space-sm);
}

.wp-size-option {
    position: relative;
    cursor: pointer;
}

.wp-size-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wp-size-option span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    border: 2px solid var(--gray-dark);
    background: var(--charcoal);
    color: var(--gray-light);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.wp-size-option input:checked + span {
    border-color: var(--purple-primary);
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple-light);
    box-shadow: 0 0 12px var(--purple-glow);
}

.wp-size-option:hover span {
    border-color: var(--purple-light);
}

/* Price display */
.warpaint-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    background: var(--charcoal);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    margin-bottom: var(--space-md);
}

.wp-price-label {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.wp-price-value {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--gold);
    font-weight: 700;
}

/* Order form */
.warpaint-order-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.warpaint-order-form .form-group {
    margin: 0;
}

.warpaint-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-primary) 100%);
    border: none;
    border-radius: 50px;
    color: var(--white);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all var(--transition-base);
}

.warpaint-submit:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px var(--purple-glow);
}

.warpaint-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.warpaint-submit-icon svg {
    width: 20px;
    height: 20px;
}

/* Success message */
.warpaint-success {
    text-align: center;
    padding: var(--space-xl);
}

.warpaint-success .success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    background: rgba(34, 197, 94, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.warpaint-success .success-icon svg {
    width: 32px;
    height: 32px;
    color: #22c55e;
}

.warpaint-success h3 {
    font-family: var(--font-display);
    color: #22c55e;
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
}

.warpaint-success p {
    color: var(--gray-light);
    margin-bottom: var(--space-md);
}

/* War Paint responsive */
@media (max-width: 768px) {
    .warpaint-layout {
        grid-template-columns: 1fr;
    }

    .warpaint-order-form .form-row {
        grid-template-columns: 1fr;
    }

    .stencil-gallery {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
}

/* ========================================
   Entry Paths (Landing Page)
   ======================================== */
.entry-paths {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 780px;
}

.entry-card {
    background: rgba(26, 26, 26, 0.85);
    border: 1px solid var(--gray-dark);
    border-radius: 12px;
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
    backdrop-filter: blur(8px);
}

.entry-card:hover {
    border-color: var(--purple-primary);
    box-shadow: 0 0 30px var(--purple-glow);
    transform: translateY(-4px);
}

.entry-card-icon {
    width: 44px;
    height: 44px;
    color: var(--purple-light);
    opacity: 0.85;
}

.entry-card-icon svg {
    width: 100%;
    height: 100%;
}

.entry-card-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    color: var(--purple-light);
    letter-spacing: 0.04em;
}

.entry-card-desc {
    font-size: 0.8rem;
    color: var(--gray-light);
    line-height: 1.5;
    flex: 1;
}

.entry-card-btn {
    padding: 0.5rem 1.1rem;
    background: var(--purple-primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast);
    margin-top: auto;
}

.entry-card-btn:hover {
    background: var(--purple-dark);
    box-shadow: 0 0 16px var(--purple-glow);
}

/* ========================================
   Section Intro Text
   ======================================== */
.section-intro-text {
    color: var(--gray-light);
    font-size: 0.95rem;
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    text-align: center;
    padding: 0 1rem;
}

/* ========================================
   Forge Steps
   ======================================== */
.forge-custom-request {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.forge-custom-request-text h3 {
    font-family: var(--font-display);
    color: var(--purple-light);
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.forge-custom-request-text p {
    color: var(--gray-light);
    font-size: 0.875rem;
    line-height: 1.5;
}

.forge-custom-request-btn {
    white-space: nowrap;
    padding: 0.6rem 1.25rem;
    background: var(--purple-primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.forge-custom-request-btn:hover {
    background: var(--purple-dark);
    box-shadow: 0 0 20px var(--purple-glow);
}

.warpaint-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.forge-steps-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.forge-step {
    background: var(--charcoal);
    border: 1px solid var(--gray-dark);
    border-radius: 10px;
    overflow: hidden;
}

.forge-step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.25rem;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid var(--gray-dark);
}

.forge-step-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    color: var(--purple-primary);
    opacity: 0.5;
    line-height: 1;
    flex-shrink: 0;
}

.forge-step-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-light);
    margin-bottom: 0.15rem;
}

.forge-step-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--purple-light);
    line-height: 1.2;
}

.forge-step-body {
    padding: 1.25rem;
}

/* ========================================
   Lore Archive Gallery
   ======================================== */
.lore-archive {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.lore-archive-header {
    text-align: center;
    margin-bottom: 2rem;
}

.lore-archive-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--purple-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.lore-archive-title svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.lore-archive-subtitle {
    color: var(--gray-light);
    font-size: 0.9rem;
}

.archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.archive-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gray-light);
    font-style: italic;
    padding: 3rem 0;
}

.archive-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.archive-item-img-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
    background: var(--black-secondary);
}

.archive-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
    display: block;
}

.archive-item-img-wrap:hover .archive-item-img {
    transform: scale(1.05);
}

.archive-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
    color: var(--white);
}

.archive-item-overlay svg {
    width: 32px;
    height: 32px;
}

.archive-item-img-wrap:hover .archive-item-overlay {
    opacity: 1;
}

.archive-item-caption {
    font-size: 0.8rem;
    color: var(--gray-light);
    text-align: center;
    line-height: 1.4;
}

/* Archive Lightbox */
.archive-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.archive-lightbox.open {
    display: flex;
}

.archive-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
}

.archive-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: min(90vw, 800px);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.archive-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    opacity: 0.7;
    width: 32px;
    height: 32px;
    padding: 0;
    transition: opacity var(--transition-fast);
}

.archive-lightbox-close:hover { opacity: 1; }
.archive-lightbox-close svg { width: 100%; height: 100%; }

.archive-lightbox-img {
    max-width: 100%;
    max-height: calc(90vh - 6rem);
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.archive-lightbox-caption {
    color: var(--gray-light);
    font-size: 0.9rem;
    text-align: center;
    max-width: 600px;
}

/* ========================================
   Responsive updates
   ======================================== */
@media (max-width: 768px) {
    .entry-paths {
        grid-template-columns: 1fr;
        max-width: 360px;
    }
    .forge-custom-request {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .warpaint-layout {
        grid-template-columns: 1fr;
    }
    .archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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