:root {
    --primary: #ffd700;
    --bg-dark: #0a0a0a;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 215, 0, 0.3);
}

body {
    background: linear-gradient(135deg, #151515, #080808, #101010);
    color: #fff;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-bottom: 5rem;
}

/* Hero & Banner */
.vocab-hero {
    width: 100%;
    max-width: 900px;
    margin: 4rem auto 2rem;
    padding: 0 1rem;
}

.vocab-banner-wrapper {
    position: relative;
    width: 100%;
    height: 250px;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.1);
}

.vocab-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vocab-banner-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem;
    text-align: center;
}

.vocab-banner-overlay h1 {
    color: var(--primary);
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 900;
}

.vocab-banner-overlay p {
    color: #ddd;
    font-size: 1rem;
    margin: 0;
}

/* Grade de Palavras */
.vocab-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 1rem;
    justify-content: center;
}

.vocab-word-chip {
    background: var(--glass);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.vocab-word-chip:not(.blocked):hover {
    background: var(--primary);
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

.vocab-word-chip.blocked {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Janela Flutuante (Modal) */
.vocab-modal {
    position: fixed;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--primary);
    border-radius: 16px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 20px rgba(255,215,0,0.2);
    backdrop-filter: blur(15px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    /* Alteramos a transição para permitir o movimento livre ao arrastar */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.vocab-modal.show {
    opacity: 1;
    visibility: visible;
}

.vocab-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,215,0,0.3);
    padding: 15px 20px;
    margin: -20px -20px 15px -20px; /* Estica o cabeçalho até as bordas da janela */
    border-radius: 15px 15px 0 0; /* Acompanha o arredondamento do topo */
    cursor: move; 
    touch-action: none; /* Garante que o navegador não role a página enquanto você arrasta a janela */
    
    /* Gradiente escurecendo para baixo + A textura de pontinhos que você anexou */
    background: linear-gradient(to bottom, rgba(255, 215, 0, 0.15), rgba(15, 15, 15, 1)), url('image_5911ff.png');
    background-size: cover;
    background-position: top center;
}

.vocab-pt {
    color: var(--primary);
    font-size: 1.4rem;
    margin: 0;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.9); /* Sombra forte para o texto destacar perfeitamente sobre a textura */
}

.vocab-close-btn {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    cursor: pointer;
}

.vocab-close-btn:hover {
    color: #fff;
}

.vocab-en {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.vocab-explain {
    color: #aaa;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.vocab-play-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(45deg, #00c851, #007E33);
    color: white;
    border: none;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s;
}

.vocab-play-btn:active {
    transform: scale(0.95);
}

@media (max-width: 600px) {
    .vocab-banner-overlay h1 { font-size: 1.4rem; }
    .vocab-banner-wrapper { height: 200px; }
    
    /* Janela e largura 30% menores (65% de largura) */
    .vocab-modal {
        width: 65%; 
        padding: 14px; 
        left: 17.5%; 
        bottom: auto; /* O botão não fica mais preso embaixo */
        top: auto; /* Deixa o JavaScript fazer a centralização matemática */
    }

    /* Textos e espaçamentos internos proporcionalmente 30% menores */
    .vocab-modal-header {
        padding: 10px 14px;
        margin: -14px -14px 10px -14px; /* Acompanha o novo padding perfeitamente */
        border-radius: 12px 12px 0 0;
    }
    
    .vocab-pt { font-size: 1rem; }
    .vocab-en { font-size: 0.85rem; margin-bottom: 8px; }
    .vocab-explain { font-size: 0.75rem; margin-bottom: 12px; }
    .vocab-play-btn { padding: 8px; font-size: 0.85rem; }
    .vocab-close-btn { font-size: 1.1rem; }
}