:root {
    --bg-primary: #f0f8ff; /* Alice Blue */
    --primary-color: #ff6b6b; /* Playful Red/Pink */
    --secondary-color: #4ecdc4; /* Mint */
    --accent-yellow: #ffe66d;
    --accent-purple: #c7ceea;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --shadow: 0 8px 20px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Changa', sans-serif;
    background-color: var(--bg-primary);
    background-image: radial-gradient(#4ecdc4 2px, transparent 2px), radial-gradient(#ff6b6b 2px, transparent 2px);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app-container {
    width: 90%;
    max-width: 800px;
    min-height: 80vh;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 40px;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
    padding: 30px;
    border: 8px solid white;
}

.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Typography & TTS */
h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px var(--accent-yellow);
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    text-align: center;
}

p {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--text-dark);
    text-align: center;
}

.speakable {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.speakable:hover {
    transform: scale(1.05);
}

.speaker-icon {
    font-size: 0.7em;
    background: var(--accent-yellow);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 0 rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.speakable:hover .speaker-icon {
    background: var(--primary-color);
    color: white;
}

/* Login Screen Specifics */
.character-container {
    margin-bottom: 20px;
    animation: bounce 2s infinite ease-in-out;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 6px solid var(--accent-yellow);
    box-shadow: var(--shadow);
}

.input-group {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
}

input[type="password"] {
    width: 100%;
    padding: 15px 25px;
    font-size: 1.5rem;
    font-family: 'Changa', sans-serif;
    border: 4px solid var(--accent-purple);
    border-radius: 30px;
    text-align: center;
    outline: none;
    transition: border-color 0.3s;
}

input[type="password"]:focus {
    border-color: var(--primary-color);
}

button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.8rem;
    font-family: 'Changa', sans-serif;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: 0 6px 0 #d63031;
    transition: all 0.2s;
    font-weight: bold;
}

button:active {
    transform: translateY(6px);
    box-shadow: none;
}

#error-message {
    color: red;
    font-size: 1.2rem;
    margin-top: 15px;
    height: 30px;
}

/* Dashboard Specifics */
header {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 4px dashed var(--accent-purple);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.small-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--accent-yellow);
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    width: 100%;
}

.card {
    text-decoration: none;
    background: white;
    border-radius: 30px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 0 rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 4px solid transparent;
}

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

.card .icon {
    font-size: 4rem;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 2rem;
    color: var(--text-dark);
}

/* Specific Card Colors */
.science-card { background: #e8f8f5; border-color: #1abc9c; box-shadow: 0 10px 0 #16a085; }
.english-card { background: #ebdef0; border-color: #9b59b6; box-shadow: 0 10px 0 #8e44ad; }
.reading-card { background: #fef9e7; border-color: #f1c40f; box-shadow: 0 10px 0 #f39c12; }
.math-card    { background: #fdedec; border-color: #e74c3c; box-shadow: 0 10px 0 #c0392b; }

/* Modal / Warning */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
}

.modal-content h2 {
    color: #e74c3c;
}

.modal-content button {
    margin-top: 20px;
    font-size: 1.2rem;
    padding: 10px 30px;
}

@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .cards-container { grid-template-columns: 1fr; }
}
