/* Main CSS for Learning Difficulties Application */
/* ملف التنسيق الرئيسي لتطبيق صعوبات التعلم */

/* Kid-friendly color palette */
:root {
    --primary-yellow: #FFE066;
    --primary-orange: #FF9F43;
    --primary-pink: #FF6B95;
    --primary-green: #A8E6CF;
    --primary-teal: #7FDBDA;
    --primary-purple: #D896FF;
    --secondary-light: #FFF5E6;
    --text-dark: #4A4A4A;
    --text-medium: #666666;
    --text-light: #888888;
    --background-gradient: linear-gradient(135deg, var(--primary-yellow) 0%, var(--primary-pink) 50%, var(--primary-green) 100%);
    --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 12px 30px rgba(0, 0, 0, 0.2);
    --border-radius: 20px;
    --border-radius-small: 15px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    text-align: right;
    background: var(--background-gradient);
    min-height: 100vh;
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #FF9F43 0%, #FFD93D 100%);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    position: relative;
    z-index: 100;
}

/* Mobile navigation toggle */
.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .app-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .user-info {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.9rem;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .settings-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Mobile navigation menu */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, #FF9F43 0%, #FFD93D 100%);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }
    
    .mobile-nav.active {
        right: 0;
    }
    
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

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

.logo i {
    font-size: 2.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.logo h1 {
    color: white;
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .logo i {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.4rem;
    }
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 1.1rem;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    padding: 14px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 1.1rem;
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.settings-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
    .settings-btn {
        padding: 10px;
        font-size: 1.2rem;
    }
}

/* Welcome Section */
.welcome-section {
    padding: 20px;
    background: linear-gradient(135deg, #FFE066 0%, #A8E6CF 100%);
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 15px 10px;
    }
}

.welcome-card {
    text-align: center;
    background: white;
    padding: 25px;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 3px solid #FFD93D;
}

@media (max-width: 768px) {
    .welcome-card {
        padding: 20px 15px;
        margin: 0 10px;
        border-radius: 20px;
    }
}

.welcome-card h2 {
    color: #4a4a4a;
    margin-bottom: 15px;
    font-size: 2rem;
    line-height: 1.3;
}

.welcome-card p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .welcome-card h2 {
        font-size: 1.6rem;
        margin-bottom: 12px;
        line-height: 1.4;
    }
    
    .welcome-card p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin-bottom: 18px;
    }
}

.progress-overview {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.level-display, .points-display {
    background: linear-gradient(135deg, #FF6B95 0%, #A8E6CF 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .level-display, .points-display {
        padding: 10px 15px;
        font-size: 1rem;
        margin: 5px;
    }
    
    .progress-overview {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
}

/* Activities Section */
.activities-section {
    padding: 30px 20px;
}

@media (max-width: 768px) {
    .activities-section {
        padding: 20px 15px;
    }
}

.activities-section h2 {
    text-align: center;
    color: #4a4a4a;
    margin-bottom: 30px;
    font-size: 2rem;
}

.activity-category {
    margin-bottom: 40px;
}

.activity-category h3 {
    color: #4A4A4A;
    margin-bottom: 20px;
    padding-right: 15px;
    font-size: 1.5rem;
    border-right: 5px solid #FF9F43;
    background: linear-gradient(135deg, #FFE066 0%, #A8E6CF 100%);
    padding: 10px 15px;
    border-radius: 15px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .activity-category h3 {
        font-size: 1.3rem;
        padding: 8px 12px;
        border-radius: 12px;
    }
}

.activities-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .activities-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .activities-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Activity Cards */
.activity-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 3px solid #FFE066;
    position: relative;
    overflow: hidden;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 224, 102, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    opacity: 0;
}

.activity-card:hover::before {
    animation: sparkle 0.8s ease-in-out;
}

.activity-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    border-color: #FF9F43;
}

@media (max-width: 768px) {
    .activity-card {
        padding: 20px;
        border-radius: 18px;
        margin-bottom: 15px;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        cursor: pointer;
        position: relative;
    }
    
    .activity-card:hover {
        transform: translateY(-3px) scale(1.01);
    }
    
    .activity-card:active {
        transform: translateY(-1px) scale(0.98);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        transition: all 0.1s ease;
    }
}

@keyframes sparkle {
    0% { opacity: 0; transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.activity-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.activity-icon.memory {
    background: linear-gradient(135deg, #FF6B95 0%, #FFE066 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 149, 0.4);
}

.activity-icon.visual {
    background: linear-gradient(135deg, #A8E6CF 0%, #7FDBDA 100%);
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.4);
}

.activity-icon.problem {
    background: linear-gradient(135deg, #FF9F43 0%, #FFD93D 100%);
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.4);
}

.activity-icon.audio {
    background: linear-gradient(135deg, #A8E6CF 0%, #88D8C0 100%);
    box-shadow: 0 4px 15px rgba(168, 230, 207, 0.4);
}

.activity-icon.logic {
    background: linear-gradient(135deg, #FFE066 0%, #FF9F43 100%);
    box-shadow: 0 4px 15px rgba(255, 224, 102, 0.4);
}

@media (max-width: 768px) {
    .activity-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 15px;
    }
}

.activity-card h4 {
    color: #4a4a4a;
    margin-bottom: 12px;
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 600;
}

.activity-card p {
    color: #666;
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .activity-card h4 {
        font-size: 1.2rem;
        margin-bottom: 10px;
        line-height: 1.4;
    }
    
    .activity-card p {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 12px;
    }
}

.difficulty-indicator {
    margin-top: 15px;
}

.level-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.level-badge.level-1 {
    background: linear-gradient(135deg, #A8E6CF 0%, #7FDBDA 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.level-badge.level-2 {
    background: linear-gradient(135deg, #FFE066 0%, #FF9F43 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.level-badge.level-3 {
    background: linear-gradient(135deg, #FF6B95 0%, #FF9F43 100%);
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Progress Section */
.progress-section {
    padding: 30px 20px;
    background: #f8f9fa;
}

.progress-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.progress-card h3 {
    color: #4a4a4a;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.stat i {
    font-size: 2rem;
    color: #FF9F43;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .stat i {
        font-size: 1.5rem;
    }
    
    .progress-stats {
        flex-direction: column;
        gap: 15px;
    }
}

.stat span {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a4a4a;
}

.stat small {
    color: #666;
    font-size: 0.9rem;
}

.view-progress-btn {
    background: linear-gradient(135deg, #FF9F43 0%, #FFD93D 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 159, 67, 0.4);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.view-progress-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 159, 67, 0.5);
}

@media (max-width: 768px) {
    .view-progress-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 200px;
    }
}

/* Footer */
.app-footer {
    background: #4a4a4a;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: modalFadeIn 0.3s ease;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

/* Prevent body scroll when modal is open */
.modal-open {
    overflow: hidden;
    height: 100vh;
}

/* Mobile modal improvements */
@media (max-width: 768px) {
    .modal {
        padding: 0;
        align-items: flex-start;
        justify-content: center;
        padding-top: 5vh;
    }
    
    .modal:before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: -1;
    }
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 25px;
    width: 85%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-20px);
    animation: modalSlideIn 0.4s ease forwards;
    max-height: 85vh;
    overflow-y: auto;
    border: 3px solid var(--primary-yellow);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        transform: translateY(-30px) scale(0.9);
        opacity: 0;
    }
    to { 
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
        border-radius: 20px;
        overflow: hidden;
        position: relative;
    }
    
    .modal {
        padding: 10px;
        z-index: 1001;
    }
    
    .modal-body {
        max-height: calc(85vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        border-radius: 20px 20px 0 0;
    }
}

.modal-header {
    background: linear-gradient(135deg, #FF9F43 0%, #FFD93D 100%);
    color: white;
    padding: 20px;
    border-radius: 25px 25px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@media (max-width: 768px) {
    .modal-header {
        padding: 15px;
        border-radius: 20px 20px 0 0;
    }
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

@media (max-width: 768px) {
    .close {
        width: 48px;
        height: 48px;
        font-size: 24px;
        padding: 2px;
    }
    
    .close:active {
        transform: scale(0.9);
        background: rgba(255, 255, 255, 0.3);
    }
}

.close:hover {
    opacity: 0.8;
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

.close:active {
    transform: scale(0.95);
}

.modal-body {
    padding: 25px;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .close {
        font-size: 24px;
        width: 36px;
        height: 36px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a4a4a;
}

.setting-group input[type="range"] {
    width: 100%;
    margin-bottom: 5px;
}

.setting-group select {
    width: 100%;
    padding: 8px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
}

.setting-group input[type="checkbox"] {
    transform: scale(1.2);
    margin-left: 10px;
}

#volume-value {
    color: #666;
    font-size: 0.9rem;
}

/* Animation Classes - Enhanced for kids */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.bounce {
    animation: kidsBounce 0.8s ease;
}

@keyframes kidsBounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0) scale(1); }
    40%, 43% { transform: translate3d(0,-15px,0) scale(1.05); }
    70% { transform: translate3d(0,-8px,0) scale(1.02); }
    90% { transform: translate3d(0,-3px,0) scale(1.01); }
}

.pulse {
    animation: funPulse 2s infinite;
}

@keyframes funPulse {
    0% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.08); filter: brightness(1.1); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* New kid-friendly animations */
.wiggle {
    animation: wiggle 0.5s ease-in-out;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg) scale(1.05); }
    75% { transform: rotate(3deg) scale(1.05); }
}

.rainbow-border {
    position: relative;
    background: linear-gradient(45deg, #FF6B95, #FFE066, #A8E6CF, #7FDBDA, #FF9F43);
    background-size: 400% 400%;
    animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.float {
    animation: float 3s ease-in-out infinite;
}

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

.celebration {
    animation: celebration 1s ease-in-out;
}

@keyframes celebration {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    50% { transform: scale(1.2) rotate(5deg); }
    75% { transform: scale(1.1) rotate(-2deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Sparkle effect for success */
.sparkle::before {
    content: '✨';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.2rem;
    animation: sparkleRotate 2s linear infinite;
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg) scale(1); opacity: 1; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.7; }
    100% { transform: rotate(360deg) scale(1); opacity: 1; }
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Kid-friendly Loading Animation */
.loading {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-light);
    border-top: 5px solid var(--primary-orange);
    border-right: 5px solid var(--primary-pink);
    border-bottom: 5px solid var(--primary-green);
    border-left: 5px solid var(--primary-teal);
    border-radius: 50%;
    animation: rainbowSpin 1.2s linear infinite;
    box-shadow: 0 0 20px rgba(255, 159, 67, 0.3);
}

@keyframes rainbowSpin {
    0% { 
        transform: rotate(0deg) scale(1); 
        filter: hue-rotate(0deg);
    }
    50% { 
        transform: rotate(180deg) scale(1.1); 
        filter: hue-rotate(180deg);
    }
    100% { 
        transform: rotate(360deg) scale(1); 
        filter: hue-rotate(360deg);
    }
}

/* Alternative fun loading - bouncing dots */
.loading-dots {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounceDots 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { 
    background: var(--primary-pink); 
    animation-delay: -0.32s; 
}
.loading-dots span:nth-child(2) { 
    background: var(--primary-yellow); 
    animation-delay: -0.16s; 
}
.loading-dots span:nth-child(3) { 
    background: var(--primary-green); 
}

@keyframes bounceDots {
    0%, 80%, 100% { 
        transform: scale(0.8); 
        opacity: 0.5; 
    }
    40% { 
        transform: scale(1.2); 
        opacity: 1; 
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Mobile-specific utility classes */
@media (max-width: 768px) {
    .mobile-full-width { width: 100% !important; }
    .mobile-text-center { text-align: center !important; }
    .mobile-hidden { display: none !important; }
    .mobile-visible { display: block !important; }
    .mobile-stack { flex-direction: column !important; }
    .mobile-no-gap { gap: 0 !important; }
    .mobile-small-gap { gap: 10px !important; }
    .mobile-padding { padding: 15px !important; }
    .mobile-margin { margin: 10px !important; }
    
    /* Enhanced mobile navigation */
    .mobile-nav-grid {
        display: grid !important;
        grid-template-columns: 1fr 2fr 1fr !important;
        align-items: center !important;
    }
    
    .mobile-nav-start {
        justify-self: start !important;
    }
    
    .mobile-nav-center {
        justify-self: center !important;
        text-align: center !important;
    }
    
    .mobile-nav-end {
        justify-self: end !important;
    }
    
    /* Mobile touch feedback */
    .mobile-touch-feedback:active {
        transform: scale(0.95) !important;
        opacity: 0.8 !important;
        transition: all 0.1s ease !important;
    }
    
    /* Prevent text selection on mobile buttons */
    .mobile-no-select {
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
        -webkit-tap-highlight-color: transparent !important;
    }
}

/* Fun interactive elements for kids */
.kid-button {
    background: linear-gradient(45deg, var(--primary-pink), var(--primary-yellow), var(--primary-green));
    background-size: 300% 300%;
    animation: gradientShift 3s ease infinite;
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.kid-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--card-shadow-hover);
}

.kid-button:active {
    transform: translateY(-1px) scale(1.02);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Confetti effect for celebrations */
.confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--primary-yellow);
    animation: confettiFall 3s linear infinite;
}

.confetti-piece:nth-child(2n) { background: var(--primary-pink); animation-delay: 0.5s; }
.confetti-piece:nth-child(3n) { background: var(--primary-green); animation-delay: 1s; }
.confetti-piece:nth-child(4n) { background: var(--primary-teal); animation-delay: 1.5s; }

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}