/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
}

.title {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #667eea;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    gap: 1.5rem;
}

.stat {
    font-weight: 600;
    font-size: 1.1rem;
    color: #764ba2;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    position: relative;
}

/* Screen titles */
.screen h2 {
    color: white;
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Welcome Screen */
.welcome-content {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.welcome-content h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.welcome-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.credit {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    text-align: center;
}

.credit p {
    font-size: 0.9rem;
    color: #999;
    font-style: italic;
    margin: 0;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-back {
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    border: 1px solid #ddd;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
}

.btn-reset {
    background: rgba(255, 255, 255, 0.7);
    color: #dc3545;
    border: 1px solid #dc3545;
    font-size: 0.8rem;
    padding: 8px 16px;
    margin-top: 0.5rem;
}

.btn-reset:hover {
    background: #dc3545;
    color: white;
    transform: translateY(-1px);
}

/* Story Selection */
.difficulty-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.8);
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tab-btn.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    transform: scale(1.05);
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.story-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #667eea;
    position: relative;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.story-card.completed {
    border-left: 5px solid #28a745;
    background: rgba(255, 255, 255, 0.98);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.completion-badge {
    background: #28a745;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.story-card h3 {
    color: #667eea;
    margin-bottom: 0;
    font-size: 1.3rem;
    flex: 1;
}

.story-card .difficulty {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.difficulty.easy { background: #e8f5e8; color: #2d5a2d; }
.difficulty.medium { background: #fff3cd; color: #856404; }
.difficulty.hard { background: #f8d7da; color: #721c24; }

/* Story Reading */
.story-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.story-content h2 {
    color: #667eea;
    margin-bottom: 1.5rem;
    font-family: 'Fredoka One', cursive;
}

/* Question Screen */
.question-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.question-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.answer-options {
    display: grid;
    gap: 1rem;
}

.answer-option {
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.answer-option:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: #667eea;
    transform: translateX(5px);
}

.answer-option.correct {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.answer-option.incorrect {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Collection */
.collection-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.collection-grid {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.collection-grid.active {
    display: grid;
}

.collection-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.collection-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.collection-item .emoji {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.collection-item .name {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
}

/* Story Creator */
.story-creator {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.creator-section {
    margin-bottom: 2rem;
}

.creator-section h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
}

.selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.selector-item {
    background: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.selector-item:hover {
    border-color: #667eea;
    transform: scale(1.05);
}

.selector-item.selected {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.selector-item .emoji {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.selector-item .name {
    font-weight: 600;
    font-size: 0.9rem;
}

.empty-message {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    border: 2px dashed #ddd;
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-message h4 {
    color: #667eea;
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.empty-message p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.modal-content h3 {
    color: #667eea;
    margin-bottom: 1rem;
    font-family: 'Fredoka One', cursive;
}

.reward-item {
    font-size: 4rem;
    margin: 1rem 0;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.modal-buttons .btn {
    min-width: 100px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .stats {
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-content {
        padding: 2rem 1rem;
    }
    
    .welcome-content h2 {
        font-size: 2rem;
    }
    
    .stories-grid {
        grid-template-columns: 1fr;
    }
    
    .collection-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .selector-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

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

.bounce {
    animation: bounce 1s;
}

/* Character items with tap hint */
.character-item {
    position: relative;
}

.tap-hint {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
    opacity: 0.7;
}

/* Character details modal */
.character-details-content {
    max-width: 500px;
    padding: 2rem;
}

.character-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.character-emoji {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.character-header h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #667eea;
    margin: 0;
}

.character-personality {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.character-personality p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
}

.character-abilities,
.character-strengths {
    margin-bottom: 1.5rem;
}

.character-abilities h4,
.character-strengths h4 {
    font-family: 'Fredoka One', cursive;
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.character-abilities ul,
.character-strengths ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.character-abilities li,
.character-strengths li {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
} 