/* Chalkboard Theme Styling */

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

body {
    font-family: 'Patrick Hand', 'Indie Flower', cursive;
    background: #2d3e2d;
    min-height: 100vh;
    overflow-x: hidden;
}

.chalkboard-wrapper {
    position: relative;
    min-height: 100vh;
    padding: 2rem;
    background: 
        linear-gradient(to right, #1a251a 0%, #2d3e2d 50%, #1a251a 100%);
}

/* Teacher's Corner */
.teachers-corner {
    position: absolute;
    top: 1rem;
    right: 2rem;
    z-index: 100;
}

.chalk-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: rgba(139, 90, 43, 0.9);
    color: #f4e4c1;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid #8b5a2b;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.chalk-link:hover {
    background: rgba(160, 100, 50, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

/* Main Chalkboard */
.chalkboard {
    max-width: 1200px;
    margin: 0 auto;
    background: 
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 0%, transparent 10%, transparent 90%, rgba(0, 0, 0, 0.1) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, transparent 10%, transparent 90%, rgba(0, 0, 0, 0.1) 100%),
        #1e3a1e;
    border: 15px solid #8b5a2b;
    border-radius: 8px;
    box-shadow: 
        inset 0 0 100px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.5);
    position: relative;
    padding: 3rem;
    min-height: 80vh;
}

/* Chalkboard texture overlay */
.chalkboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.02) 2px,
            rgba(255, 255, 255, 0.02) 4px
        );
    pointer-events: none;
}

.chalkboard-frame {
    position: relative;
    z-index: 1;
}

/* Chalk Tray */
.chalk-tray {
    max-width: 1200px;
    margin: -2rem auto 0;
    height: 40px;
    background: linear-gradient(180deg, #8b5a2b 0%, #6b4423 100%);
    border-radius: 0 0 8px 8px;
    border: 3px solid #5a3618;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0 2rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.chalk-piece {
    width: 50px;
    height: 12px;
    border-radius: 6px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.chalk-white {
    background: linear-gradient(180deg, #ffffff 0%, #e8e8e8 100%);
}

.chalk-yellow {
    background: linear-gradient(180deg, #fff44f 0%, #e8d040 100%);
}

.chalk-blue {
    background: linear-gradient(180deg, #6eb5ff 0%, #5a9de8 100%);
}

.chalk-red {
    background: linear-gradient(180deg, #ff6b6b 0%, #e85555 100%);
}

/* Typography - Chalk Style */
h1, h2, h3, h4, h5, h6 {
    color: #f4e4c1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Caveat', cursive;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

p {
    color: #f4e4c1;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* Buttons - Chalk Style */
button, .btn {
    font-family: 'Patrick Hand', cursive;
    padding: 1rem 2rem;
    border: 3px solid #f4e4c1;
    border-radius: 8px;
    background: rgba(244, 228, 193, 0.1);
    color: #f4e4c1;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

button:hover, .btn:hover {
    background: rgba(244, 228, 193, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* Input Fields - Chalk Style */
input[type="text"] {
    font-family: 'Caveat', cursive;
    width: 100%;
    padding: 1.5rem;
    border: 3px dashed #f4e4c1;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #f4e4c1;
    font-size: 2rem;
    text-align: center;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

input[type="text"]::placeholder {
    color: rgba(244, 228, 193, 0.4);
}

input[type="text"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff44f;
    box-shadow: 0 0 20px rgba(255, 244, 79, 0.3);
}

/* Container Styles */
.practice-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Word Selection Grid */
.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.word-btn {
    padding: 2rem 1rem;
    background: rgba(244, 228, 193, 0.15);
    border: 3px solid #f4e4c1;
    border-radius: 12px;
    color: #f4e4c1;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.word-btn::before {
    content: '✏️';
    display: block;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.word-btn:hover {
    background: rgba(244, 228, 193, 0.25);
    transform: scale(1.05) rotate(-2deg);
}

/* Word card result states */
.word-btn.word-correct {
    border-color: #7bed9f;
    background: rgba(123, 237, 159, 0.15);
}

.word-btn.word-incorrect {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.15);
}

/* Result badge on word cards */
.word-badge {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-weight: 600;
}

.badge-correct {
    color: #7bed9f;
}

.badge-incorrect {
    color: #ff6b6b;
}

/* Audio Button */
.audio-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 244, 79, 0.2);
    border: 4px solid #fff44f;
    font-size: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    cursor: pointer;
    transition: all 0.3s ease;
}

.audio-btn:hover {
    background: rgba(255, 244, 79, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 244, 79, 0.5);
}

/* Result Display */
.result-section {
    text-align: center;
    padding: 2rem;
}

.result-correct {
    color: #7bed9f;
}

.result-incorrect {
    color: #ff6b6b;
}

/* Feedback Image */
.feedback-image {
    width: 90%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 12px;
    border: 4px solid #f4e4c1;
    margin: 1.5rem auto;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Stats Display */
.stats-box {
    background: rgba(139, 90, 43, 0.3);
    border: 3px solid #8b5a2b;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 1.5rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #fff44f;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
    font-size: 1.2rem;
    color: #f4e4c1;
    margin-top: 0.5rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

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

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .chalkboard-wrapper {
        padding: 1rem;
    }

    .chalkboard {
        padding: 1.5rem;
        border-width: 10px;
    }

    .teachers-corner {
        position: static;
        text-align: center;
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    input[type="text"] {
        font-size: 1.5rem;
    }
}

/* Animation for page load */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chalkboard-frame {
    animation: fadeIn 0.6s ease-out;
}
