/* ========================================
   Villainy Generator
   Vibrant Dark Theme - Fun & Readable
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables - Vibrant Palette */
:root {
    /* Primary - Emerald */
    --emerald: #10B981;
    --emerald-light: #34D399;
    --emerald-dark: #059669;
    --emerald-glow: rgba(16, 185, 129, 0.5);
    
    /* Secondary - Purple/Violet for fun */
    --violet: #8B5CF6;
    --violet-light: #A78BFA;
    --violet-glow: rgba(139, 92, 246, 0.4);
    
    /* Accent - Gold */
    --gold: #FBBF24;
    --gold-light: #FCD34D;
    --gold-dark: #D97706;
    --gold-glow: rgba(251, 191, 36, 0.5);
    
    /* Cyan accent */
    --cyan: #22D3EE;
    --cyan-glow: rgba(34, 211, 238, 0.4);
    
    /* Background - Rich darks */
    --bg-darkest: #09090B;
    --bg-dark: #18181B;
    --bg-card: #1F1F23;
    --bg-surface: #27272A;
    --bg-hover: #3F3F46;
    
    /* Text - High contrast */
    --text-primary: #FAFAFA;
    --text-secondary: #D4D4D8;
    --text-muted: #A1A1AA;
    --text-dim: #71717A;
    
    /* Utility */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --transition-bounce: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);
    --glow-emerald: 0 0 30px var(--emerald-glow);
    --glow-gold: 0 0 30px var(--gold-glow);
    --glow-violet: 0 0 25px var(--violet-glow);
    --glow-cyan: 0 0 25px var(--cyan-glow);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 500;
    background: var(--bg-darkest);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background - Vibrant */
.arcane-bg {
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(ellipse at 10% 90%, rgba(139, 92, 246, 0.18) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 10%, rgba(34, 211, 238, 0.12) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(251, 191, 36, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 35%),
        radial-gradient(ellipse at 70% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 35%);
    animation: bg-shift 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bg-shift {
    0%, 100% { 
        opacity: 0.9;
        filter: hue-rotate(0deg);
    }
    50% { 
        opacity: 1;
        filter: hue-rotate(10deg);
    }
}

/* Particle Container */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

/* Individual Particles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float-up linear infinite;
}

.particle.emerald {
    background: radial-gradient(circle, var(--violet-light) 0%, transparent 70%);
    box-shadow: 0 0 10px var(--violet-glow);
}

.particle.violet {
    background: radial-gradient(circle, var(--violet) 0%, transparent 70%);
    box-shadow: 0 0 10px var(--violet-glow);
}

.particle.gold {
    background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
    box-shadow: 0 0 10px var(--gold-glow);
}

.particle.cyan {
    background: radial-gradient(circle, var(--cyan) 0%, transparent 70%);
    box-shadow: 0 0 10px var(--cyan-glow);
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: translateY(90vh) translateX(10px) scale(1);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translateY(-10vh) translateX(-10px) scale(0.5);
        opacity: 0;
    }
}

/* Floating orbs - larger ambient glows */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orb-float 25s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.8;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    top: 5%;
    left: -15%;
    animation-delay: 0s;
}

.orb-2 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    top: 50%;
    right: -15%;
    animation-delay: -8s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
    bottom: 5%;
    left: 25%;
    animation-delay: -16s;
}

@keyframes orb-float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    25% {
        transform: translate(50px, -40px) scale(1.15);
        opacity: 0.9;
    }
    50% {
        transform: translate(-30px, 30px) scale(0.9);
        opacity: 0.6;
    }
    75% {
        transform: translate(40px, 20px) scale(1.1);
        opacity: 0.85;
    }
}

/* Sparkle effect on scroll areas */
.main-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(180deg, var(--bg-darkest) 0%, transparent 100%);
    pointer-events: none;
    z-index: 50;
    opacity: 0.8;
}

.main-wrapper::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(0deg, var(--bg-darkest) 0%, transparent 100%);
    pointer-events: none;
    z-index: 50;
    opacity: 0.6;
}

/* ========================================
   Typography - Bigger & Bolder
   ======================================== */

h1, h2, h3, .villain-name {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}

h2 {
    font-size: 1.5rem;
    color: var(--gold);
}

h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    letter-spacing: 1px;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.subtitle {
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ========================================
   Layout
   ======================================== */

.main-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ========================================
   Header
   ======================================== */

.header {
    text-align: center;
    padding: 3.5rem 2rem 3rem;
    margin-bottom: 2rem;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--violet), var(--gold), var(--cyan), transparent);
    border-radius: 2px;
}

.header h1 {
    margin-bottom: 0.75rem;
}

/* ========================================
   Collections Carousel
   ======================================== */

.collections-section {
    padding: 1.5rem 0 2.5rem;
    margin-bottom: 2rem;
}

.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.collections-header h2 {
    font-size: 1.35rem;
    margin: 0;
}

.view-all-btn {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--cyan);
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    padding: 0.6rem 1.25rem;
    transition: var(--transition);
}

.view-all-btn:hover {
    background: rgba(34, 211, 238, 0.2);
    border-color: var(--cyan);
    box-shadow: var(--glow-cyan);
}

.collections-carousel {
    position: relative;
    padding: 0 3rem;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Collection Cards */
.collection-card {
    flex: 0 0 210px;
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.15) 0%, rgba(34, 211, 238, 0.08) 50%, rgba(251, 191, 36, 0.1) 100%);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    backdrop-filter: blur(10px);
}

.collection-card:nth-child(odd) {
    transform: rotate(-1.5deg);
}

.collection-card:nth-child(even) {
    transform: rotate(1.5deg);
}

.collection-card:hover {
    transform: rotate(0deg) translateY(-10px) scale(1.03);
    border-color: var(--violet-light);
    box-shadow: var(--glow-violet), var(--shadow-lg);
}

.collection-card.active {
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.collection-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.collection-name {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.collection-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.collection-tag {
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Carousel Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--bg-surface);
    border: 2px solid var(--bg-hover);
    border-radius: 50%;
    color: var(--gold);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-arrow:hover {
    background: var(--violet);
    border-color: var(--violet-light);
    color: var(--text-primary);
    box-shadow: var(--glow-violet);
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.left { left: 0; }
.carousel-arrow.right { right: 0; }
.carousel-arrow.hidden { opacity: 0; pointer-events: none; }

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 2px solid var(--bg-hover);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active,
.carousel-dot:hover {
    background: var(--violet);
    border-color: var(--violet-light);
    box-shadow: 0 0 12px var(--violet-glow);
}

/* ========================================
   Generator Section
   ======================================== */

.generator-section {
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.generator-section h2 {
    margin-bottom: 0.5rem;
}

.section-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* Dropdown Grid */
.dropdown-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dropdown-group {
    position: relative;
}

.dropdown-label {
    display: block;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.dropdown-wrapper {
    display: flex;
    gap: 0.5rem;
}

.doom-select {
    flex: 1;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%23FBBF24' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.75rem;
}

.doom-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: var(--glow-gold);
}

.doom-select:hover {
    border-color: var(--violet);
    background-color: var(--bg-surface);
}

/* Icon Buttons */
.icon-btn {
    width: 52px;
    height: 52px;
    background: var(--bg-card);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-bounce);
}

.icon-btn:hover {
    background: var(--violet);
    border-color: var(--violet-light);
    box-shadow: var(--glow-violet);
    transform: scale(1.08);
}

.dice-btn:hover {
    animation: wiggle 0.4s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: scale(1.08) rotate(0deg); }
    20% { transform: scale(1.08) rotate(-15deg); }
    40% { transform: scale(1.08) rotate(12deg); }
    60% { transform: scale(1.08) rotate(-8deg); }
    80% { transform: scale(1.08) rotate(5deg); }
}

/* Tone Filter */
.tone-section {
    margin-bottom: 2.5rem;
}

.tone-label {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tone-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tone-btn {
    background: var(--bg-card);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tone-btn:hover {
    border-color: var(--violet);
    color: var(--text-primary);
    background: var(--bg-surface);
}

.tone-btn.active {
    background: var(--violet);
    border-color: var(--violet-light);
    color: var(--text-primary);
    box-shadow: var(--glow-violet);
}

/* Generate Buttons */
.generate-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    flex-wrap: wrap;
}

.generate-btn {
    background: linear-gradient(135deg, var(--violet) 0%, #6D28D9 100%);
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1.1rem 3rem;
    border: none;
    border-radius: var(--radius-lg);
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.generate-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    opacity: 0;
    transition: var(--transition);
}

.generate-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--glow-violet), var(--shadow-lg);
}

.generate-btn:hover::before {
    opacity: 1;
}

.generate-btn span,
.generate-btn {
    position: relative;
    z-index: 1;
}

.generate-btn.secondary {
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 1.05rem;
    padding: 1rem 2rem;
    border: 2px solid var(--bg-hover);
}

.generate-btn.secondary::before {
    background: var(--violet);
}

.generate-btn.secondary:hover {
    border-color: var(--violet);
    box-shadow: var(--glow-violet), var(--shadow-md);
}

.generate-btn.secondary:hover::before {
    opacity: 1;
}

/* ========================================
   Result Section
   ======================================== */

.result-section {
    padding: 2rem 0;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.result-header h2 {
    margin: 0;
}

.copy-btn {
    background: var(--bg-card);
    color: var(--gold);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    border-color: var(--gold);
    background: var(--bg-surface);
    box-shadow: var(--glow-gold);
}

.copy-btn.copied {
    background: var(--violet);
    border-color: var(--violet-light);
    color: var(--text-primary);
}

/* Result Card */
.result-card {
    background: var(--bg-card);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--violet), var(--gold), var(--cyan), var(--gold), var(--violet));
    background-size: 300% 100%;
    animation: rainbow-flow 5s linear infinite;
}

@keyframes rainbow-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.result-card:not(.empty) {
    box-shadow: var(--shadow-md);
}

.result-card.empty {
    text-align: center;
    padding: 5rem 2rem;
    border-style: dashed;
    border-color: var(--bg-hover);
}

.result-card.empty::before {
    display: none;
}

.empty-icon {
    font-size: 5rem;
    background: linear-gradient(135deg, var(--violet), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-text {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
}

.villain-name {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 0 20px var(--gold-glow));
}

.villain-narrative {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.connector-phrase {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--cyan);
    padding: 1.25rem 1.5rem;
    background: rgba(34, 211, 238, 0.08);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    border-left: 4px solid var(--cyan);
    font-style: italic;
}

.connector-phrase::before { content: '"'; }
.connector-phrase::after { content: '"'; }

/* Breakdown Section */
.breakdown-section {
    margin: 2.5rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--bg-surface);
}

.breakdown-title {
    font-size: 1rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.villain-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.detail-item {
    background: var(--bg-dark);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--bg-surface);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.detail-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--bg-hover);
    transition: var(--transition);
}

.detail-item:hover {
    border-color: var(--violet);
    background: var(--bg-surface);
}

.detail-item:hover::before {
    background: linear-gradient(180deg, var(--violet), var(--cyan));
}

.detail-header {
    display: flex;
    gap: 1rem;
    align-items: baseline;
    margin-bottom: 0.6rem;
}

.detail-label {
    color: var(--cyan);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1.5px;
    min-width: 100px;
}

.detail-value {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
}

.detail-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
}


/* ========================================
   Collections Modal
   ======================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(12px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-dark);
    border: 2px solid var(--bg-surface);
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(90deg, var(--violet), var(--gold), var(--cyan));
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 2rem;
    border-bottom: 2px solid var(--bg-surface);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    background: var(--bg-surface);
    border: 2px solid var(--bg-hover);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    border-color: var(--violet);
}

.modal-body {
    padding: 2rem;
}

.collections-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.collection-card-full {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.12) 0%, rgba(34, 211, 238, 0.06) 50%, rgba(251, 191, 36, 0.08) 100%);
    border: 2px solid rgba(139, 92, 246, 0.25);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.collection-card-full:hover {
    border-color: var(--violet);
    box-shadow: var(--glow-violet);
    transform: translateY(-5px);
}

.collection-card-full .collection-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.collection-card-full .collection-name {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
}

.collection-summary {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.use-btn {
    background: linear-gradient(135deg, var(--violet) 0%, #6D28D9 100%);
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.use-btn:hover {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--bg-darkest);
    box-shadow: var(--glow-gold);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 900px) {
    h1 { font-size: 2.25rem; }
    
    .dropdown-grid {
        grid-template-columns: 1fr;
    }
    
    .collections-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .villain-details {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .detail-label {
        min-width: auto;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 1.85rem; letter-spacing: 1px; }
    .subtitle { font-size: 1.05rem; }
    
    .main-wrapper { padding: 1rem; }
    .header { padding: 2.5rem 1rem 2rem; }
    
    .collection-card {
        flex: 0 0 85vw;
        scroll-snap-align: start;
    }
    
    .carousel-track {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .collections-carousel { padding: 0; }
    .carousel-arrow { display: none; }
    .collections-grid { grid-template-columns: 1fr; }
    .generate-buttons { flex-direction: column; }
    .generate-btn { width: 100%; }
    
    .result-card {
        padding: 1.75rem;
        border-radius: var(--radius-lg);
    }
    
    .villain-name { font-size: 1.5rem; }
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html { scroll-behavior: auto; }
    .arcane-bg { animation: none; opacity: 0.8; }
    .result-card::before { animation: none; }
}

/* 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: 0;
}

.hidden { display: none !important; }
