/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 3.5rem;
    color: #ff6b6b;
    text-shadow: 3px 3px 0px #4ecdc4;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.subtitle {
    font-size: 1.3rem;
    color: #6c5ce7;
    font-weight: 700;
}

/* Main content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.instructions {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.instructions p {
    margin-bottom: 10px;
}

.instructions p:last-child {
    margin-bottom: 0;
    font-size: 1rem;
    color: #666;
}

/* Input section */
.input-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

#wordInput {
    width: 100%;
    padding: 15px;
    border: 3px solid #4ecdc4;
    border-radius: 15px;
    font-size: 1.1rem;
    font-family: 'Comic Neue', cursive;
    resize: vertical;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

#wordInput:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
    background: white;
}

.button-group {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Comic Neue', cursive;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.surprise-btn {
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    color: #333;
}

.surprise-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 154, 158, 0.4);
}

.story-btn {
    background: linear-gradient(45deg, #a8edea, #fed6e3);
    color: #333;
}

.story-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.4);
}

.new-story-btn {
    background: linear-gradient(45deg, #ffecd2, #fcb69f);
    color: #333;
    margin-top: 20px;
}

.new-story-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(252, 182, 159, 0.4);
}

/* Text-to-speech buttons */
.play-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
    color: white !important;
    font-size: 1rem !important;
    padding: 12px 20px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.stop-btn {
    background: linear-gradient(45deg, #f44336, #da190b) !important;
    color: white !important;
    font-size: 1rem !important;
    padding: 12px 20px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.play-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4) !important;
}

.stop-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4) !important;
}

/* Loading animation */
.loading {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Story result */
.story-result {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.story-result h2 {
    color: #ff6b6b;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #4ecdc4;
}

.story-text {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Story content layout */
.story-content {
    text-align: left;
}

.story-text-content {
    margin-bottom: 20px;
    line-height: 1.8;
    font-size: 1.3rem;
    font-weight: 700;
}

.story-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* Error message */
.error {
    background: rgba(255, 107, 107, 0.1);
    border: 2px solid #ff6b6b;
    color: #d63031;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    font-weight: 700;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    font-weight: 700;
    color: #6c5ce7;
}

/* Utility classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .title {
        font-size: 2.5rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .story-text {
        font-size: 1.1rem;
    }
    
    .story-text-content {
        font-size: 1.1rem;
    }
    
    .story-controls {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .instructions {
        font-size: 1rem;
    }
} 

/* Voice Settings Section */
.voice-settings {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.voice-settings h3 {
    color: #6c5ce7;
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    margin-bottom: 15px;
    text-align: center;
}

.voice-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.voice-controls label {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.voice-select {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 3px solid #4ecdc4;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Comic Neue', cursive;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-select:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 15px rgba(255, 107, 107, 0.3);
}

.test-voice-btn {
    background: linear-gradient(45deg, #74b9ff, #0984e3) !important;
    color: white !important;
    font-size: 1rem !important;
    padding: 10px 20px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.test-voice-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(116, 185, 255, 0.4) !important;
}

/* Responsive design for voice settings */
@media (max-width: 768px) {
    .voice-controls {
        gap: 10px;
    }
    
    .voice-select {
        font-size: 0.9rem;
    }
    
    .voice-settings h3 {
        font-size: 1.3rem;
    }
} 