:root {
    --bg-dusk: #1e1b4b; /* Deep Indigo */
    --mauve: #c084fc;
    --rose: #fb7185;
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dusk);
    color: var(--text-white);
    min-height: 100vh;
}

.app-header {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), transparent);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.header-content p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Filters */
.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-white);
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: var(--text-white);
    color: var(--bg-dusk);
    border-color: var(--text-white);
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    position: relative;
    height: 400px;
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    background: var(--bg-dusk);
}

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

.card-bg {
    position: absolute;
    inset: 0;
    opacity: 0.8;
    z-index: 0;
}

.card-content {
    position: relative;
    z-index: 1;
}

.card .word {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.card .lang {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.6);
}

/* Emotions Gradients */
.card[data-emotion="bittersweet"] .card-bg { background: linear-gradient(135deg, #6366f1, #a855f7); }
.card[data-emotion="hopeful"] .card-bg { background: linear-gradient(135deg, #14b8a6, #2dd4bf); }
.card[data-emotion="brutal"] .card-bg { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.card[data-emotion="poetic"] .card-bg { background: linear-gradient(135deg, #f43f5e, #fb7185); }

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.modal.hidden { display: none; }

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

.glass-card {
    background: rgba(30, 27, 75, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 4rem;
    position: relative;
    max-width: 600px;
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

#modalWord {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

#modalLang {
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--mauve);
}

#modalMeaning {
    font-size: 1.5rem;
    font-style: italic;
    margin: 2rem 0;
}

hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 2rem 0; }

.modal-story h3 { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 1rem; }

.primary-btn {
    background: white;
    color: var(--bg-dusk);
    padding: 1rem 2rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .gallery { grid-template-columns: 1fr; }
    #modalWord { font-size: 2.5rem; }
}
