/* Dictionary Styles */
.dictionary-word {
    color: #667eea;
    cursor: pointer;
    border-bottom: 2px dotted #667eea;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 3px;
}

.dictionary-word:hover {
    background: #667eea;
    color: white;
    border-bottom: 2px solid #667eea;
    transform: translateY(-1px);
}

.word-explanation-block {
    margin: 20px 0;
    animation: slideIn 0.3s ease-out;
}

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

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

.dictionary-explanation-card {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 2px solid #38a169;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.15);
    position: relative;
}

.explanation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 2px solid #38a169;
    padding-bottom: 10px;
}

.explanation-header h3 {
    color: #22543d;
    margin: 0;
    font-size: 1.4rem;
}

.close-btn {
    background: #e53e3e;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #c53030;
    transform: scale(1.1);
}

.basic-explanation {
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-right: 4px solid #38a169;
}

.word-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 5px 5px 0;
}

.word-type-اسم { background: #c6f6d5; color: #22543d; }
.word-type-فعل { background: #fef5e7; color: #744210; }
.word-type-صفة { background: #ebf8ff; color: #2a69ac; }
.word-type-ظرف { background: #f7fafc; color: #2d3748; }
.word-type-حرف { background: #fed7d7; color: #742a2a; }
.word-type-أخرى { background: #e9d8fd; color: #553c9a; }

.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    margin: 5px 5px 5px 0;
}

.level-مبتدئ { background: #c6f6d5; color: #22543d; }
.level-متوسط { background: #fef5e7; color: #744210; }
.level-متقدم { background: #fed7d7; color: #742a2a; }

.show-more-btn {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 10px 0;
    font-family: 'Cairo', sans-serif;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 153, 225, 0.4);
}

.more-explanations {
    margin-top: 15px;
    animation: slideIn 0.3s ease-out;
}

.explanation-item {
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-right: 4px solid #4299e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.explanation-item h4 {
    color: #2d3748;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.explanation-type-تفسير\ مفصل { border-right-color: #38a169; }
.explanation-type-خريطة\ الكلمة { border-right-color: #ed8936; }
.explanation-type-عائلة\ الكلمة { border-right-color: #9f7aea; }
.explanation-type-شبكة\ الكلمات { border-right-color: #38b2ac; }
.explanation-type-أمثلة\ إضافية { border-right-color: #4299e1; }
.explanation-type-وسائط\ متعددة { border-right-color: #e53e3e; }
.explanation-type-تقييم\ سريع { border-right-color: #d69e2e; }
.explanation-type-معلومات\ إضافية { border-right-color: #805ad5; }

.word-family ul, .examples ul, .word-network ul {
    list-style: none;
    padding: 0;
}

.word-family li, .examples li {
    background: #f7fafc;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 5px;
    border-right: 3px solid #4299e1;
}

.quick-quiz {
    background: #fef5e7;
    border: 1px solid #d69e2e;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.quiz-btn {
    background: #d69e2e;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: background 0.3s ease;
}

.quiz-btn:hover {
    background: #b7791f;
}

.loading {
    text-align: center;
    color: #4a5568;
    font-style: italic;
    padding: 20px;
}

.error {
    color: #e53e3e;
    text-align: center;
    padding: 15px;
    background: #fed7d7;
    border-radius: 8px;
    border: 1px solid #feb2b2;
}

/* Responsive Design for Dictionary */
@media (max-width: 768px) {
    .dictionary-explanation-card {
        margin: 10px;
        padding: 15px;
    }
    
    .explanation-header h3 {
        font-size: 1.2rem;
    }
    
    .word-type-badge, .difficulty-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .show-more-btn {
        width: 100%;
        padding: 12px;
    }
}/* Kids-Friendly Public Interface Styles */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Amiri:wght@400;700&display=swap');

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

/* Public Interface (Kids-Friendly) */
body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    background: linear-gradient(45deg, #FF6B9D, #C44569, #F8B500, #3742FA, #2ED573, #FF6348);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    color: #2c3e50;
}

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

/* Admin Interface Override (Professional) */
body.admin-interface {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    animation: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header - Kids Version */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border: 3px solid #FF6B9D;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.header h1 {
    text-align: center;
    background: linear-gradient(45deg, #FF6B9D, #3742FA, #2ED573);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.header p {
    text-align: center;
    color: #5a6c7d;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* Admin Header Override */
.admin-interface .header {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 15px;
}

.admin-interface .header::before {
    display: none;
}

.admin-interface .header h1 {
    background: none;
    -webkit-text-fill-color: #4a5568;
    color: #4a5568;
    font-size: 2.5rem;
}

.admin-interface .header p {
    color: #718096;
    font-size: 1.1rem;
}

/* Navigation - Kids Version */
.nav {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 2px solid #3742FA;
}

.nav a {
    color: #2c3e50;
    text-decoration: none;
    margin: 0 20px;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 25px;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, #FF6B9D, #3742FA);
    color: white;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.nav a:hover::before {
    left: 100%;
}

.nav a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Cards - Kids Version */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 25px;
    padding: 3px;
    background: linear-gradient(45deg, #FF6B9D, #3742FA, #2ED573, #F8B500);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.card:nth-child(1) { --delay: 0.1s; }
.card:nth-child(2) { --delay: 0.2s; }
.card:nth-child(3) { --delay: 0.3s; }
.card:nth-child(4) { --delay: 0.4s; }

.card {
    animation: cardSlideIn 0.6s ease-out var(--delay, 0s) both;
}

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

.card h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.card p {
    color: #5a6c7d;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.card a {
    display: inline-block;
    background: linear-gradient(45deg, #FF6B9D, #3742FA);
    color: white;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.3);
}

.card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 107, 157, 0.5);
}

/* Activity Content - Kids Version */
.activity-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 35px;
    margin: 25px 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    line-height: 1.9;
    border: 3px solid #2ED573;
    position: relative;
    overflow: hidden;
}

.activity-content::before {
    content: '✨';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    animation: sparkle 2s ease-in-out infinite;
}

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

.activity-content h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(45deg, #2ED573, #3742FA);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Dictionary Styles - Kids Version */
.dictionary-word {
    color: #3742FA;
    cursor: pointer;
    border-bottom: 3px dotted #FF6B9D;
    font-weight: 700;
    transition: all 0.3s ease;
    padding: 3px 6px;
    border-radius: 8px;
    background: linear-gradient(45deg, rgba(255, 107, 157, 0.1), rgba(55, 66, 250, 0.1));
}

.dictionary-word:hover {
    background: linear-gradient(45deg, #FF6B9D, #3742FA);
    color: white;
    border-bottom: 3px solid #FF6B9D;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.4);
}

.word-explanation-block {
    margin: 25px 0;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.dictionary-explanation-card {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    border: 4px solid #2ED573;
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(46, 213, 115, 0.25);
    position: relative;
    overflow: hidden;
}

.dictionary-explanation-card::before {
    content: '📖';
    position: absolute;
    top: -10px;
    left: -10px;
    font-size: 3rem;
    opacity: 0.2;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.explanation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 3px solid #2ED573;
    padding-bottom: 15px;
}

.explanation-header h3 {
    color: #22543d;
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.close-btn {
    background: linear-gradient(45deg, #FF6348, #e74c3c);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.close-btn:hover {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.5);
}

.basic-explanation {
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    border-right: 5px solid #2ED573;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.show-more-btn {
    background: linear-gradient(135deg, #3742FA 0%, #5352ed 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin: 15px 0;
    font-family: 'Cairo', sans-serif;
    box-shadow: 0 8px 20px rgba(55, 66, 250, 0.3);
}

.show-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(55, 66, 250, 0.5);
}

.more-explanations {
    margin-top: 20px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.explanation-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border-right: 5px solid #3742FA;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.explanation-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.explanation-item h4 {
    color: #2c3e50;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Word Type and Difficulty Badges - Kids Version */
.word-type-badge, .difficulty-badge {
    display: inline-block;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin: 8px 8px 8px 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

/* Enhanced badge colors for kids */
.word-type-اسم { 
    background: linear-gradient(45deg, #2ED573, #20bf6b); 
    color: white; 
}
.word-type-فعل { 
    background: linear-gradient(45deg, #F8B500, #f39c12); 
    color: white; 
}
.word-type-صفة { 
    background: linear-gradient(45deg, #3742FA, #2f3542); 
    color: white; 
}
.word-type-ظرف { 
    background: linear-gradient(45deg, #a55eea, #8854d0); 
    color: white; 
}
.word-type-حرف { 
    background: linear-gradient(45deg, #FF6348, #e74c3c); 
    color: white; 
}
.word-type-أخرى { 
    background: linear-gradient(45deg, #FF6B9D, #fd79a8); 
    color: white; 
}

.level-مبتدئ { 
    background: linear-gradient(45deg, #2ED573, #00d2d3); 
    color: white; 
}
.level-متوسط { 
    background: linear-gradient(45deg, #F8B500, #ff9ff3); 
    color: white; 
}
.level-متقدم { 
    background: linear-gradient(45deg, #FF6348, #ff3838); 
    color: white; 
}

/* Media Elements - Kids Version */
.activity-media-section {
    margin-bottom: 35px;
}

.video-container video,
.video-container iframe {
    width: 100% !important;
    height: 400px !important;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 4px solid #3742FA;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 25px 0;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    border: 3px solid #FF6B9D;
}

.image-container img:hover {
    transform: scale(1.05) rotate(2deg);
}

.audio-container {
    background: linear-gradient(135deg, #e6fffa 0%, #f0fff4 100%);
    padding: 20px;
    border-radius: 20px;
    margin: 20px 0;
    border: 3px solid #2ED573;
    box-shadow: 0 8px 25px rgba(46, 213, 115, 0.2);
}

.audio-container audio {
    width: 100%;
    height: 60px;
    border-radius: 15px;
}

/* Text Content Styles - Kids Version */
.activity-text-content {
    font-size: 1.2rem;
    line-height: 2;
    color: #2c3e50;
}

.activity-text-content p {
    margin-bottom: 20px;
}

.activity-text-content h3 {
    color: #3742FA;
    margin: 25px 0 15px 0;
    font-size: 1.6rem;
    font-weight: 700;
}

/* Navigation between activities - Kids Version */
.activity-navigation {
    display: flex;
    justify-content: space-between;
    margin: 35px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.activity-navigation .btn {
    background: linear-gradient(45deg, #2ED573, #3742FA);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(46, 213, 115, 0.3);
}

.activity-navigation .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(46, 213, 115, 0.5);
}

/* Admin Interface Overrides */
.admin-interface .card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    animation: none;
    --delay: 0s;
}

.admin-interface .card::before {
    display: none;
}

.admin-interface .card a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.admin-interface .nav a {
    background: #4a5568;
    color: white;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
    box-shadow: none;
    margin: 0 15px;
}

.admin-interface .nav {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 12px;
}

/* Responsive Design - Enhanced for Kids */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .card {
        padding: 25px;
    }
    
    .nav a {
        display: block;
        margin: 8px 0;
        text-align: center;
    }
    
    .video-container video,
    .video-container iframe {
        height: 250px !important;
    }
    
    .activity-navigation {
        flex-direction: column;
    }
    
    .activity-navigation .btn {
        width: 100%;
        text-align: center;
    }
}

/* Footer - Kids Version */
footer {
    background: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-top: 50px;
    padding: 25px;
    border-radius: 25px;
    border: 3px solid #FF6B9D;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

footer p {
    background: linear-gradient(45deg, #FF6B9D, #3742FA, #2ED573);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Admin footer override */
.admin-interface footer {
    border: none;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

.admin-interface footer p {
    background: none;
    -webkit-text-fill-color: rgba(255,255,255,0.8);
    color: rgba(255,255,255,0.8);
    font-weight: normal;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Admin Styles */
.admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 10px;
}

.admin-sidebar a {
    display: block;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.admin-sidebar a:hover {
    background: #667eea;
    color: white;
}

.admin-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.table tr:hover {
    background: #f7fafc;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
}
}

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

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    direction: initial;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.card h3 {
    color: #2d3748;
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card a {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Activity Content Enhanced Styles */
.activity-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.activity-content h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Media Section Styles */
.activity-media-section {
    margin-bottom: 30px;
}

.media-item {
    margin: 20px 0;
}

.video-container {
    position: relative;
    margin: 20px 0;
}

.video-container video,
.video-container iframe {
    width: 100% !important;
    height: 400px !important;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    border: none;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-container img:hover {
    transform: scale(1.02);
}

.audio-container {
    background: #f7fafc;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
}

.audio-container audio {
    width: 100%;
    height: 54px;
}

/* Text Content Styles */
.activity-text-content {
font-size: 1.5rem;
line-height: 1.8;
color: #2d3748;
text-indent: 30px;
}

.activity-text-content p {
    margin-bottom: 15px;
}

.activity-text-content h3 {
    color: #4a5568;
    margin: 20px 0 10px 0;
    font-size: 1.3rem;
}

.activity-text-content ul,
.activity-text-content ol {
    margin: 15px 0;
    padding-right: 25px;
}

.activity-text-content li {
    margin-bottom: 8px;
}

/* Multiple Choice Question Styles */
.multiple-choice-question {
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.question-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 15px;
}

.choice-option {
    display: block;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.choice-option:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(-5px);
}

.choice-option.selected {
    border-color: #667eea;
    background: #e6fffa;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.choice-option input[type="radio"] {
    margin-left: 10px;
}

.choice-label {
    font-weight: 500;
    color: #2d3748;
}

.check-answer-btn {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.check-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(72, 187, 120, 0.4);
}

.feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    display: none;
}

.feedback.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.feedback.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Text Input Questions */
.text-input-question {
    background: #f8f9fa;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.text-input-question input[type="text"],
.text-input-question textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    margin-top: 10px;
}

.text-input-question input[type="text"]:focus,
.text-input-question textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Enhanced Activity Types */
.activity-type-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Reading Activity Styles */
.reading-text {
    background: #fff;
    border-right: 4px solid #667eea;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Vocabulary Activity Styles */
.vocabulary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
}

.vocabulary-word {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
}

.vocabulary-meaning {
    color: #4a5568;
    font-style: italic;
}

/* Story Elements Activity */
.story-element {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    border-right: 4px solid #48bb78;
}

.story-element h4 {
    color: #2d3748;
    margin-bottom: 8px;
}

/* Responsive Design for Activity Content */
@media (max-width: 768px) {
    .activity-content {
        padding: 20px;
        margin: 15px 0;
    }
    
    .video-container video,
    .video-container iframe {
        height: 250px !important;
    }
    
    .images-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .multiple-choice-question,
    .text-input-question {
        padding: 15px;
    }
    
    .choice-option {
        padding: 10px 12px;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.message.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .card {
        padding: 20px;
    }
    
    .nav a {
        display: block;
        margin: 5px 0;
        text-align: center;
    }
}

/* Admin Styles */
.admin-sidebar {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 10px;
}

.admin-sidebar a {
    display: block;
    padding: 12px 16px;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.admin-sidebar a:hover {
    background: #667eea;
    color: white;
}

.admin-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.table th,
.table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f7fafc;
    font-weight: 600;
    color: #2d3748;
}

.table tr:hover {
    background: #f7fafc;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 100px auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2d3748;
}
.explanation-content img {
max-width: 100%;
}