/* 1. Variabile și Resetare Globală */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #f59e0b;
    --accent: #10b981;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* 2. Structura de Bază și Centrare */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    background-image: radial-gradient(#cbd5e1 0.5px, transparent 0.5px);
    background-size: 30px 30px;
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ocupă tot ecranul */
    align-items: center;
}

/* 3. Header Modern */
header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 4rem 1rem 6rem 1rem;
    text-align: center;
    width: 100%;
    clip-path: ellipse(150% 100% at 50% 0%);
    margin-bottom: -2rem; /* Aduce conținutul mai sus spre header */
}

header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

/* 4. Main - Motorul de Centrare */
main {
    flex: 1;
    width: 100%;
    max-width: 900px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centrare orizontală */
    justify-content: center; /* Centrare verticală */
    animation: fadeInUp 0.8s ease-out forwards;
}

/* 5. Cardul de Conținut */
.card {
    background: var(--bg-card);
    padding: clamp(1.5rem, 5vw, 3rem);
    border-radius: 2rem;
    box-shadow: var(--shadow);
    width: 100%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* 6. Tabel Vocabular (Stil Tabelar solicitat) */
.vocab-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    margin: 2rem 0;
}

.vocab-row {
    transition: var(--transition);
}

.vocab-row:hover {
    transform: scale(1.02);
}

.vocab-row td {
    padding: 1.2rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.vocab-row td:first-child {
    border-left: 1px solid #e2e8f0;
    border-radius: 15px 0 0 15px;
    font-weight: 700;
    color: var(--primary);
    text-align: left;
}

.vocab-row td:nth-child(2) {
    color: var(--text-muted);
    text-align: left;
}

.vocab-row td:last-child {
    border-right: 1px solid #e2e8f0;
    border-radius: 0 15px 15px 0;
    text-align: right;
}

/* 7. Elemente de Quiz (Butoane mari de selecție) */
.quiz-option {
    display: flex;
    align-items: center;
    padding: 1.2rem;
    margin: 10px 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.quiz-option:hover {
    border-color: var(--primary);
    background: #f1f5f9;
}

.quiz-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    accent-color: var(--primary);
}

/* 8. Butoane Animate */
.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.5);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -10px rgba(79, 70, 229, 0.6);
    background: var(--primary-hover);
}

.audio-btn {
    background: #eef2ff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.audio-btn:hover {
    background: var(--primary);
    color: white;
    transform: rotate(15deg);
}

/* 9. Grila de Lecții (lessons.php) */
.lesson-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    width: 100%;
    list-style: none;
}

.lesson-card {
    background: white;
    border-radius: 1.5rem;
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.lesson-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

/* 10. Footer și Utilitare */
footer {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hide-mobile {
    display: inline;
}

@media (max-width: 600px) {
    .hide-mobile { display: none; }
    header { padding: 3rem 1rem 5rem 1rem; }
    .card { padding: 1.5rem; }
    .vocab-row td { padding: 0.8rem; font-size: 0.9rem; }
}