/* ============================================
   PICTIONARY BANK - Arcade Party Aesthetic
   ============================================ */

:root {
    /* Core palette - neon arcade vibes */
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-elevated: #1a1a24;
    
    /* Neon colors */
    --neon-pink: #ff2d95;
    --neon-cyan: #00f0ff;
    --neon-yellow: #ffe600;
    --neon-green: #39ff14;
    --neon-purple: #bf40ff;
    --neon-orange: #ff6b35;
    
    /* Text */
    --text-primary: #ffffff;
    --text-secondary: #8888aa;
    --text-muted: #555566;
    
    /* Category colors */
    --cat-90s: #ff2d95;
    --cat-2000s: #00f0ff;
    --cat-2010s: #bf40ff;
    --cat-store: #39ff14;
    --cat-animals: #ff9500;
    --cat-snacks: #ff6b6b;
    --cat-80s: #ffdd00;
    --cat-science: #00d4aa;
    --cat-disney: #5c7cfa;
    --cat-pokemon: #ffcb05;
    --cat-harrypotter: #946b2d;
    --cat-nickelodeon: #ff6600;
    --cat-marveldc: #e62429;
    --cat-videogames: #9b59b6;
    
    /* Sizing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Fonts */
    --font-display: 'Dela Gothic One', cursive;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    position: relative;
}

/* Scanlines effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    z-index: 1000;
}

/* Noise overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 999;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Header
   ============================================ */

header {
    text-align: center;
    padding: 1rem 0 2rem;
}

.title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.title-pic {
    color: var(--neon-pink);
    text-shadow: 
        0 0 10px var(--neon-pink),
        0 0 20px var(--neon-pink),
        0 0 40px var(--neon-pink);
    animation: flicker 4s infinite;
}

.title-tionary {
    color: var(--neon-cyan);
    text-shadow: 
        0 0 10px var(--neon-cyan),
        0 0 20px var(--neon-cyan),
        0 0 40px var(--neon-cyan);
}

.title-bank {
    display: block;
    font-size: 0.5em;
    color: var(--neon-yellow);
    text-shadow: 
        0 0 10px var(--neon-yellow),
        0 0 20px var(--neon-yellow);
    margin-top: 0.1em;
    letter-spacing: 0.3em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    92% { opacity: 1; }
    93% { opacity: 0.8; }
    94% { opacity: 1; }
    96% { opacity: 0.9; }
    97% { opacity: 1; }
}

/* ============================================
   Main Content
   ============================================ */

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ============================================
   Word Display
   ============================================ */

.word-display, .word-placeholder {
    background: var(--bg-card);
    border: 2px solid var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.word-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan), var(--neon-yellow));
}

.word-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    padding: 0.25rem 1rem;
    background: var(--bg-elevated);
    border-radius: 100px;
}

.word-text {
    font-family: var(--font-display);
    font-size: clamp(2rem, 10vw, 4rem);
    line-height: 1.2;
    color: var(--neon-yellow);
    text-shadow: 
        0 0 20px var(--neon-yellow),
        0 0 40px var(--neon-yellow);
    animation: wordReveal 0.5s ease-out;
}

.word-text.long-word {
    font-size: clamp(1.5rem, 7vw, 2.5rem);
}

@keyframes wordReveal {
    0% {
        opacity: 0;
        transform: scale(0.5) rotateX(90deg);
        filter: blur(10px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) rotateX(0deg);
        filter: blur(0);
    }
    100% {
        transform: scale(1) rotateX(0deg);
    }
}

.word-remaining {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Placeholder */
.word-placeholder {
    border-style: dashed;
    border-color: var(--text-muted);
}

.placeholder-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.hidden {
    display: none !important;
}

/* ============================================
   Categories Carousel
   ============================================ */

.categories {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    text-align: center;
}

.carousel-container {
    margin: 0 -1.5rem;
    padding: 0.5rem 0;
}

.category-carousel {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0.5rem 1.5rem;
}

.category-carousel::-webkit-scrollbar {
    display: none;
}

.category-btn {
    background: var(--bg-card);
    border: 2px solid var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: 90px;
    scroll-snap-align: start;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.category-btn:hover {
    transform: translateY(-2px);
    border-color: var(--text-muted);
}

.category-btn:active {
    transform: translateY(0) scale(0.98);
}

/* Category-specific colors */
.cat-90s::before { background: radial-gradient(circle at center, var(--cat-90s) 0%, transparent 70%); }
.cat-2000s::before { background: radial-gradient(circle at center, var(--cat-2000s) 0%, transparent 70%); }
.cat-2010s::before { background: radial-gradient(circle at center, var(--cat-2010s) 0%, transparent 70%); }
.cat-store::before { background: radial-gradient(circle at center, var(--cat-store) 0%, transparent 70%); }
.cat-animals::before { background: radial-gradient(circle at center, var(--cat-animals) 0%, transparent 70%); }
.cat-snacks::before { background: radial-gradient(circle at center, var(--cat-snacks) 0%, transparent 70%); }
.cat-80s::before { background: radial-gradient(circle at center, var(--cat-80s) 0%, transparent 70%); }
.cat-science::before { background: radial-gradient(circle at center, var(--cat-science) 0%, transparent 70%); }
.cat-disney::before { background: radial-gradient(circle at center, var(--cat-disney) 0%, transparent 70%); }
.cat-pokemon::before { background: radial-gradient(circle at center, var(--cat-pokemon) 0%, transparent 70%); }
.cat-harrypotter::before { background: radial-gradient(circle at center, var(--cat-harrypotter) 0%, transparent 70%); }
.cat-nickelodeon::before { background: radial-gradient(circle at center, var(--cat-nickelodeon) 0%, transparent 70%); }
.cat-marveldc::before { background: radial-gradient(circle at center, var(--cat-marveldc) 0%, transparent 70%); }
.cat-videogames::before { background: radial-gradient(circle at center, var(--cat-videogames) 0%, transparent 70%); }

.cat-90s:hover::before,
.cat-2000s:hover::before,
.cat-2010s:hover::before,
.cat-store:hover::before,
.cat-animals:hover::before,
.cat-snacks:hover::before,
.cat-80s:hover::before,
.cat-science:hover::before,
.cat-disney:hover::before,
.cat-pokemon:hover::before,
.cat-harrypotter:hover::before,
.cat-nickelodeon:hover::before,
.cat-marveldc:hover::before,
.cat-videogames:hover::before {
    opacity: 0.15;
}

.cat-90s:hover { border-color: var(--cat-90s); box-shadow: 0 0 20px rgba(255, 45, 149, 0.3); }
.cat-2000s:hover { border-color: var(--cat-2000s); box-shadow: 0 0 20px rgba(0, 240, 255, 0.3); }
.cat-2010s:hover { border-color: var(--cat-2010s); box-shadow: 0 0 20px rgba(191, 64, 255, 0.3); }
.cat-store:hover { border-color: var(--cat-store); box-shadow: 0 0 20px rgba(57, 255, 20, 0.3); }
.cat-animals:hover { border-color: var(--cat-animals); box-shadow: 0 0 20px rgba(255, 149, 0, 0.3); }
.cat-snacks:hover { border-color: var(--cat-snacks); box-shadow: 0 0 20px rgba(255, 107, 107, 0.3); }
.cat-80s:hover { border-color: var(--cat-80s); box-shadow: 0 0 20px rgba(255, 221, 0, 0.3); }
.cat-science:hover { border-color: var(--cat-science); box-shadow: 0 0 20px rgba(0, 212, 170, 0.3); }
.cat-disney:hover { border-color: var(--cat-disney); box-shadow: 0 0 20px rgba(92, 124, 250, 0.3); }
.cat-pokemon:hover { border-color: var(--cat-pokemon); box-shadow: 0 0 20px rgba(255, 203, 5, 0.3); }
.cat-harrypotter:hover { border-color: var(--cat-harrypotter); box-shadow: 0 0 20px rgba(148, 107, 45, 0.3); }
.cat-nickelodeon:hover { border-color: var(--cat-nickelodeon); box-shadow: 0 0 20px rgba(255, 102, 0, 0.3); }
.cat-marveldc:hover { border-color: var(--cat-marveldc); box-shadow: 0 0 20px rgba(230, 36, 41, 0.3); }
.cat-videogames:hover { border-color: var(--cat-videogames); box-shadow: 0 0 20px rgba(155, 89, 182, 0.3); }

.cat-emoji {
    font-size: 1.5rem;
}

.cat-name {
    font-family: var(--font-display);
    font-size: 0.7rem;
    color: var(--text-primary);
    white-space: nowrap;
}

.cat-count {
    font-size: 0.6rem;
    color: var(--text-muted);
    background: var(--bg-dark);
    padding: 0.125rem 0.375rem;
    border-radius: 100px;
}

/* ============================================
   Controls
   ============================================ */

.controls {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
}

.control-btn {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--text-muted);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.reset-btn:hover {
    border-color: var(--neon-orange);
    color: var(--neon-orange);
}

.seed-btn:hover {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.view-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

/* ============================================
   Loading Overlay
   ============================================ */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-elevated);
    border-top-color: var(--neon-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ============================================
   Toast
   ============================================ */

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--neon-cyan);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    z-index: 200;
    animation: toastIn 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.toast.error {
    border-color: var(--neon-pink);
    box-shadow: 0 0 20px rgba(255, 45, 149, 0.2);
}

.toast.success {
    border-color: var(--neon-green);
    box-shadow: 0 0 20px rgba(57, 255, 20, 0.2);
}

/* ============================================
   Words Modal
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 15, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}

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

.modal-content {
    background: var(--bg-card);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.2);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--bg-elevated);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--neon-pink);
}

.modal-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--bg-elevated);
}

.category-select {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--text-muted);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.875rem;
    cursor: pointer;
    outline: none;
}

.category-select:focus {
    border-color: var(--neon-cyan);
}

.word-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.words-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-content: flex-start;
}

.word-chip {
    background: var(--bg-elevated);
    border: 1px solid var(--bg-dark);
    border-radius: 100px;
    padding: 0.375rem 0.875rem;
    font-size: 0.8rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.word-chip.seen {
    opacity: 0.5;
    text-decoration: line-through;
    color: var(--text-muted);
}

.word-chip:hover {
    border-color: var(--neon-cyan);
    transform: scale(1.05);
}

.words-empty {
    width: 100%;
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 400px) {
    .container {
        padding: 1rem;
    }
    
    .carousel-container {
        margin: 0 -1rem;
    }
    
    .category-carousel {
        padding: 0.5rem 1rem;
    }
}

/* Disable text selection on buttons */
button {
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

