/*
 * Global stylesheet for the Japanese learning web app
 * Colors are inspired by the palette specified by the user:
 *  - Primary: Celeste/Azul/Blanco/Beige/Negro
 *  - Correct & Completed: Green
 *  - Incorrect: Red
 *  - Pending: Yellow
 */

:root {
    --primary-light: #bbdefb;
    --primary: #2196F3;
    --primary-dark: #0b79d0;
    --background: #f5f5dc; /* Beige */
    --text: #111111; /* Near black for readability */
    --success: #4caf50;
    --error: #f44336;
    --warning: #ffeb3b;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1rem;
    text-align: center;
}

nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

nav a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 1rem;
}

/* Dashboard heatmap grid */
.heatmap {
    display: grid;
    grid-template-columns: repeat(53, 12px);
    grid-auto-rows: 12px;
    gap: 2px;
    margin: 1rem 0;
}

.heatmap div {
    width: 12px;
    height: 12px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.heatmap div[data-level='0'] { background-color: #e0e0e0; }
.heatmap div[data-level='1'] { background-color: #c5e1f9; }
.heatmap div[data-level='2'] { background-color: #90caf9; }
.heatmap div[data-level='3'] { background-color: #42a5f5; }
.heatmap div[data-level='4'] { background-color: #1e88e5; }
.heatmap div[data-level='5'] { background-color: #1565c0; }

/* KPI checklist */
.checklist {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.checklist-item {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    flex: 1 1 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.checklist-item button {
    margin-top: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.checklist-item button.completed {
    background-color: var(--success);
    color: white;
}

.checklist-item button.pending {
    background-color: var(--warning);
    color: black;
}

/* Card for flashcard study */
.flashcard {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.flashcard-character {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.options button {
    padding: 0.5rem;
    border: 2px solid var(--primary);
    border-radius: 6px;
    background-color: white;
    cursor: pointer;
    font-size: 1rem;
}

.options button.correct {
    background-color: var(--success);
    border-color: var(--success);
    color: white;
}

.options button.incorrect {
    background-color: var(--error);
    border-color: var(--error);
    color: white;
}

/* Mini dashboard table */
.mini-dashboard {
    margin-top: 2rem;
    width: 100%;
    border-collapse: collapse;
}

.mini-dashboard th,
.mini-dashboard td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: center;
}

.mini-dashboard th {
    background-color: var(--primary-light);
}

.summary {
    margin-top: 1rem;
}