/* style.css */

:root {
    /* UNICEF-inspired palette */
    --unicef-blue: #009ACD; /* Primary Brand Blue */
    --unicef-yellow: #FFC220; /* Accent for Gamification/Alerts */
    --text-dark: #333;
    --background-light: #f4f7f9; /* Soft off-white */
    --border-light: #ddd;
    --success-green: #4CAF50;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.app-header {
    background-color: var(--unicef-blue);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo {
    margin: 0;
    font-size: 1.8em;
    font-weight: 700;
}

.view-switch-button {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.view-switch-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-interface {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Children's View Styles --- */

#child-view h2 {
    color: var(--unicef-blue);
    text-align: center;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 10px;
}

.xp-display {
    background-color: var(--unicef-yellow);
    color: var(--text-dark);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
}

.subject-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.subject-tile {
    height: 150px;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.subject-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.subject-tile .icon {
    font-size: 3em;
    margin-bottom: 5px;
}

/* Specific Tile Colors */
.math-tile { background-color: #E74C3C; } /* Red */
.reading-tile { background-color: #3498DB; } /* Sky Blue */
.science-tile { background-color: #2ECC71; } /* Green */
.arts-tile { background-color: #9B59B6; } /* Purple */

.gamification-area {
    margin-top: 30px;
    padding: 20px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    text-align: center;
}

.badge {
    font-size: 2em;
    margin: 0 10px;
}

.badge.locked {
    opacity: 0.5;
}

/* --- Parents/Educators View Styles --- */

.section-title {
    color: var(--unicef-blue);
    border-bottom: 2px solid var(--unicef-blue);
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.safe-note {
    font-style: italic;
    color: var(--success-green);
    margin-bottom: 20px;
}

.resource-tools {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#resource-search, #resource-filter {
    padding: 10px;
    border: 1px solid var(--border-light);
    border-radius: 5px;
    flex-grow: 1;
}

.resource-item {
    padding: 15px;
    border: 1px solid var(--border-light);
    border-left: 5px solid var(--unicef-blue);
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: #fcfcfc;
}

.resource-item h3 {
    margin: 0 0 5px 0;
    color: var(--text-dark);
}

.resource-item p {
    margin: 0;
    font-size: 0.9em;
}

.placeholder-text {
    text-align: center;
    color: #999;
    padding: 30px;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .app-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .resource-tools {
        flex-direction: column;
    }
}