/* Super simple, super cute style for kids */

/* Font */
body {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive, sans-serif;
    background: #f8f0fc;  /* Soft lavender */
    padding: 15px;
    margin: 0;
}

/* Main box */
.container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    padding: 20px;
    box-shadow: 0 10px 0 #d9b8ff;  /* Purple shadow */
    border: 4px solid #b8d9ff;  /* Blue border */
}

/* Title */
h1 {
    color: #ffadad;  /* Soft red */
    text-align: center;
    font-size: 40px;
    margin: 10px 0;
    text-shadow: 3px 3px 0 #ffe5b4;  /* Peach shadow */
}

/* Article buttons */
.file-item {
    background: #b8f2e6;  /* Mint */
    border: 4px solid #8ecae6;  /* Light blue */
    border-radius: 40px;
    padding: 20px;
    margin: 15px 0;
    cursor: pointer;
    box-shadow: 0 5px 0 #8ecae6;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    gap: 20px;
}

.file-item:hover {
    background: #a4e0d4;
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #8ecae6;
}

.file-item:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #8ecae6;
}

/* Animal emojis */
.file-icon {
    font-size: 40px;
    background: #ffdac9;  /* Peach */
    padding: 15px;
    border-radius: 30px;
    border: 3px solid #ffb4a2;
}

/* Article title */
.file-name {
    font-size: 28px;
    color: #6d6875;  /* Soft purple-gray */
    font-weight: bold;
}

/* Back button */
.back-button {
    background: #ffc8dd;  /* Pink */
    color: white;
    border: none;
    border-radius: 40px;
    padding: 15px 30px;
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0 20px 0;
    box-shadow: 0 5px 0 #cdb4db;  /* Purple */
    cursor: pointer;
    border: 3px solid #ffafcc;
    font-family: inherit;
}

.back-button:hover {
    background: #ffb3c6;
    transform: translateY(-2px);
    box-shadow: 0 7px 0 #cdb4db;
}

.back-button:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #cdb4db;
}

/* Article text */
.article {
    background: #fdffb8;  /* Light yellow */
    border-radius: 40px;
    padding: 30px;
    border: 4px solid #caffbf;  /* Light green */
}

.article h2 {
    color: #b5838d;  /* Dusty rose */
    font-size: 35px;
    text-align: center;
    margin-top: 0;
    border-bottom: 4px dotted #e5989b;
    padding-bottom: 15px;
}

.article p {
    background: white;
    padding: 20px;
    border-radius: 30px;
    font-size: 20px;
    line-height: 1.6;
    color: #6d6875;
    border: 3px solid #ffcdb2;
    margin: 20px 0;
}

/* Loading animation */
.loading {
    text-align: center;
    font-size: 30px;
    color: #b5838d;
    padding: 50px;
    animation: bounce 1s infinite;
}

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

/* Error message */
.error {
    background: #ffe5d9;
    border: 4px solid #ffb5a7;
    border-radius: 40px;
    padding: 30px;
    color: #e56b6f;
    text-align: center;
    font-size: 22px;
}

/* ========================================
   READ ALOUD BUTTONS - KID FRIENDLY
   ======================================== */

.read-aloud-controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.kids-button {
    background: #ffb6c1;  /* Soft pink */
    color: white;
    border: 3px solid #ff9aac;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 0 #ff9aac;
    transition: all 0.1s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Comic Neue', cursive;
}

.kids-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #ff9aac;
    background: #ffa5b9;
}

.kids-button:active {
    transform: translateY(5px);
    box-shadow: 0 2px 0 #ff9aac;
}

.kids-button.reading {
    background: #ffd966;  /* Soft yellow when reading */
    border-color: #e6b800;
    box-shadow: 0 5px 0 #e6b800;
}

.stop-btn {
    background: #ff8a8a;  /* Soft red */
    border-color: #ff6b6b;
    box-shadow: 0 5px 0 #ff6b6b;
}

.stop-btn:hover {
    background: #ff7575;
}

.speed-control {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 40px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.speed-control label {
    font-size: 1.2em;
    color: #6d6875;
    font-weight: bold;
}

.speed-control input[type=range] {
    width: 200px;
    height: 10px;
    border-radius: 10px;
    background: #ffb6c1;
    -webkit-appearance: none;
}

.speed-control input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 25px;
    height: 25px;
    background: #ff9aac;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#rateValue {
    font-size: 1.2em;
    font-weight: bold;
    color: #6d6875;
    min-width: 50px;
}

/* Word highlighting during reading (optional) */
.highlight-word {
    background-color: #ffd966;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.article-paragraph {
    font-family: 'Comic Neue', 'Segoe UI', Arial, sans-serif;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #4a5568;
    font-size: 1.2em;
    text-align: left;
    white-space: pre-wrap;
    word-spacing: 0.05em;
    letter-spacing: 0.3px;
}

/* Better support for Spanish punctuation */
.article-paragraph::first-letter {
    font-size: 1.3em;
    color: #667eea;
    font-weight: bold;
}

/* Spanish accent support */
[lang="es"] {
    hanging-punctuation: first allow-end last;
}

/* Language indicator */
.language-indicator {
    background: #e6f3ff;
    border-radius: 30px;
    padding: 8px 15px;
    display: inline-block;
    margin: 10px 0;
    font-size: 1.1em;
    color: #2c3e50;
    border: 2px solid #b2d8ff;
}

/* Read aloud buttons */
.read-aloud-controls {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.kids-button {
    background: #ffb6c1;
    color: white;
    border: 3px solid #ff9aac;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 0 #ff9aac;
    transition: all 0.1s ease;
    font-family: 'Comic Neue', cursive;
}

.stop-btn {
    background: #ff8a8a;
    border-color: #ff6b6b;
    box-shadow: 0 5px 0 #ff6b6b;
}

.kids-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 0 #ff9aac;
}

.stop-btn:hover {
    box-shadow: 0 8px 0 #ff6b6b;
}

/* Responsive for small screens */
@media (max-width: 500px) {
    .file-name {
        font-size: 22px;
    }
    
    .file-icon {
        font-size: 30px;
        padding: 10px;
    }
    
    h1 {
        font-size: 32px;
    }
}