/* ========================================
   MEMORY TIMER GAME - STYLES
======================================== */

/* Setup Screen */
.setup-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

/* Animated Brain Pulses */
.animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.brain-pulse {
    position: absolute;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent);
    animation: brainPulse 3s ease-in-out infinite;
}

.brain-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.brain-2 {
    top: 50%;
    right: 15%;
    animation-delay: 1s;
}

.brain-3 {
    bottom: 10%;
    left: 30%;
    animation-delay: 2s;
}

@keyframes brainPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

.setup-card {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 2;
    /* animation: slideUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55); */
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.setup-header {
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.setup-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 3rem;
    backdrop-filter: blur(10px);
    animation: brainBounce 2s ease-in-out infinite;
}

@keyframes brainBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(-5deg);
    }

    75% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.setup-header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
}

.setup-header p {
    font-size: 1.3rem;
    opacity: 0.95;
}

.setup-body {
    padding: 35px 20px;
}

.child-info {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #E8DEF8, #D4C5F9);
    border-radius: 25px;
    margin-bottom: 40px;
}

.child-avatar-large {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 20px;
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

.child-info h3 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 15px;
}

.child-stats-inline {
    display: flex;
    gap: 30px;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--gray);
}

.child-stats-inline strong {
    color: #667EEA;
    font-weight: 900;
}

/* Game Instructions */
.game-instructions {
    background: #F9FAFB;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 35px;
    border: 2px dashed #667EEA;
}

.game-instructions h4 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667EEA;
    margin-bottom: 25px;
    text-align: center;
}

.instruction-steps {
    display: grid;
    gap: 20px;
}

.step {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 900;
    color: white;
    flex-shrink: 0;
}

.step-text strong {
    display: block;
    font-size: 1.2rem;
    color: var(--dark);
    margin-bottom: 5px;
}

.step-text p {
    margin: 0;
    color: var(--gray);
    font-size: 0.95rem;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 15px;
}

.section-label i {
    color: #667EEA !important;
    font-size: 1rem;
}

.surah-select,
.ayah-select {
    font-size: 1.1rem;
    padding: 15px 20px;
    border: 3px solid #E8DEF8;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.surah-select:focus,
.ayah-select:focus {
    border-color: #667EEA;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
}

/* Difficulty Options */
.difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.difficulty-option {
    padding: 25px 15px;
    background: white;
    border: 3px solid #E8DEF8;
    border-radius: 18px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.difficulty-option:hover {
    transform: translateY(-5px);
    border-color: #667EEA;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.difficulty-option.selected {
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border-color: #667EEA;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transform: scale(1.05);
}

.difficulty-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.difficulty-name {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.difficulty-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.difficulty-option.selected .difficulty-desc {
    opacity: 1;
}

/* Start Button */
.btn-start-game {
    width: 100%;
    padding: 25px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.btn-start-game:not(:disabled):hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.btn-start-game:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-start-game .btn-glow {
    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;
}

.btn-start-game:not(:disabled):hover .btn-glow {
    left: 100%;
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px;
    background: #F3F4F6;
    color: var(--gray);
    text-decoration: none;
    border-radius: 15px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: #E5E7EB;
    color: var(--dark);
    transform: translateX(5px);
}

/* ========================================
   MEMORIZE SCREEN (STAGE 1)
======================================== */
.game-screen {
    min-height: 100vh;
    position: relative;
}

.game-bg-memorize {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 50%, #FCD34D 100%);
    z-index: -1;
}

.light-rays {
    position: absolute;
    inset: 0;
    background:
        repeating-conic-gradient(from 0deg at 50% 50%,
            rgba(255, 255, 255, 0.3) 0deg 10deg,
            transparent 10deg 20deg);
    animation: rotateRays 20s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

.game-container {
    padding:90px 20px 40px;
}

/* Timer Circle */
.timer-circle-container {
      position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 13px;
}

.timer-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.3);
    stroke-width: 12;
}

.timer-circle-progress {
    fill: none;
    stroke: #10B981;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke 0.3s ease;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-number {
    font-size: 5rem;
    font-weight: 900;
    color: #10B981;
    line-height: 1;
    animation: timerPulse 1s ease-in-out infinite;
}

@keyframes timerPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.timer-label {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 700;
}

/* Stage Title */
.stage-title {
    text-align: center;
    margin-bottom: 0px;
}

.stage-icon {
 font-size: 2rem;
    margin-bottom: 3px;
    animation: iconFloat 3s ease-in-out infinite;
    margin-top: 58px;

}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.stage-title h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 10px;
}

.stage-title p {
    font-size: 1.3rem;
    color: var(--gray);
}

/* Ayah Display */
.ayah-display {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    border: 5px solid #FCD34D;
}

.ayah-text {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 2.2;
    text-align: center;
    margin-bottom: 30px;
}

.ayah-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding-top: 30px;
    border-top: 3px dashed #FCD34D;
}

.ayah-info span {
    font-size: 1.2rem;
    font-weight: 800;
    color: #92400E;
    padding: 10px 25px;
    background: #FEF3C7;
    border-radius: 50px;
}

/* ========================================
   ANSWER SCREEN (STAGE 2)
======================================== */
.game-bg-answer {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 50%, #93C5FD 100%);
    z-index: -1;
}

.thinking-bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.bubble {
    position: absolute;
    font-size: 3rem;
    animation: bubbleFloat 4s ease-in-out infinite;
}

.b1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.b2 {
    top: 50%;
    right: 15%;
    animation-delay: 1.3s;
}

.b3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2.6s;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0.7;
    }
}

/* Game Header */
.game-header {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 20px 0;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 100;
}

.cards-page:fullscreen .game-header {
    top: 0 !important;
}
.game-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

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

.student-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667EEA, #764BA2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.student-info strong {
    display: block;
    font-size: 1.1rem;
    color: var(--dark);
}

.stars-display {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #F59E0B;
    font-weight: 900;
}

/* Answer Timer */
.answer-timer {
    text-align: center;
    display: flex;
    align-items: center;
}

.timer-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.timer-value {
    font-size: 2rem;
    font-weight: 900;
    color: #10B981;
    margin-bottom: 10px;
}

.timer-bar {
    width: 200px;
    height: 12px;
    background: #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
}

.timer-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10B981, #3B82F6);
    border-radius: 10px;
    transition: width 0.1s linear, background 0.3s ease;
}

.timer-bar-fill.warning {
    background: linear-gradient(90deg, #F59E0B, #EF4444);
}

.timer-bar-fill.danger {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

.btn-end-game {
    padding: 12px 25px;
    background: #FEE2E2;
    color: #991B1B;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-end-game:hover {
    background: #EF4444;
    color: white;
    transform: translateY(-2px);
}

.answer-container {
    padding-top: 200px;
}

/* Ayah with Blanks */
.ayah-with-blanks {
    max-width: 900px;
    margin: 0 auto 40px;
    background: white;
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
    border: 5px solid #93C5FD;
    font-family: 'Amiri', serif;
}

.ayah-line {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 2.5;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.ayah-word {
    display: inline-block;
}

.blank-container {
    display: inline-block;
    position: relative;
}

.blank-input {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    font-weight: 700;
    padding: 5px 15px;
    border: none;
    border-bottom: 4px solid #667EEA;
    background: #F3F4F6;
    border-radius: 8px;
    text-align: center;
    min-width: 150px;
    transition: all 0.3s ease;
}

.blank-input:focus {
    outline: none;
    background: #E8DEF8;
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.blank-input.correct {
    background: #D1FAE5;
    border-bottom-color: #10B981;
}

.blank-input.wrong {
    background: #FEE2E2;
    border-bottom-color: #EF4444;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-10px);
    }

    75% {
        transform: translateX(10px);
    }
}

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

.word-option {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    font-weight: 700;
    padding: 10px 20px;
    background: white;
    border: 3px solid #667EEA;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.word-option:hover {
    background: #667EEA;
    color: white;
    transform: translateY(-3px);
}

.word-option.selected {
    background: linear-gradient(135deg, #667EEA, #764BA2);
    color: white;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

/* Submit Button */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto 30px;
    padding: 20px;
    background: linear-gradient(135deg, #10B981, #3B82F6);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 1.5rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

/* Score Info */
.score-info {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
}

.score-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    font-size: 1rem;
    color: var(--gray);
    font-weight: 700;
}

.score-item i {
    color: #3B82F6;
    font-size: 1.2rem;
}

/* Celebration Overlay */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    display: none;
}

.celebration-overlay.active {
    display: block;
}

#confettiCanvas {
    width: 100%;
    height: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .setup-header h1 {
        font-size: 1.3rem;
    }

    .setup-header p {
        font-size: 1rem;
    }

    .setup-body {
        padding: 30px 5px;
    }

    .difficulty-options {
        grid-template-columns: 1fr;
    }

    .timer-circle-container {
        width: 100px;
        height: 100px;
    }

    .timer-number {
        font-size: 1.5rem;
    }

    .ayah-text {
        font-size: 1.8rem;
    }

    .ayah-line {
        font-size: 1.5rem;
    }

    .blank-input {
        font-size: 1rem;
        min-width: 100px;
        padding: 5px;
    }

    .word-option {
        font-size: .8rem;
        padding: 5px 10px;
    }

    .word-options {
        gap: 3px;
        margin-top: 6px;
        /* font-size: 7px; */
    }
}

@media (max-width: 576px) {
    .stage-title h2 {
        font-size: 1rem;
    }

    .ayah-text {
        font-size: 1.5rem;
    }

    .ayah-line {
        font-size: 1.3rem;
    }

    .timer-bar {
        width: 90px;
    }
}



.form-section {
    margin-bottom: 15px;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
}

.section-label i {
    color: #10B981;
}

.form-select-custom {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #E5E7EB;
    border-radius: 20px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    background: white;
    transition: all 0.3s ease;
}

.form-select-custom:focus {
    outline: none;
    border-color: #667fea;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.verse-range {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.range-input {
    flex: 1;
}

.range-input label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 10px;
}

.range-input .form-control {
    padding: 15px 20px;
    border: 3px solid #E5E7EB;
    border-radius: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    transition: all 0.3s ease;
}

.range-input .form-control:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}

.range-divider {
    font-size: 2rem;
    color: #10B981;
    font-weight: 900;
    margin-top: 25px;
}

.verse-count {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 600;
    padding: 15px;
    background: #F3F4F6;
    border-radius: 15px;
}

.verse-count strong {
    color: #10B981;
    font-size: 1.5rem;
}

.difficulty-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.difficulty-option {
    padding: 25px 15px;
    background: white;
    border: 3px solid #E5E7EB;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
}

.difficulty-option:hover {
    transform: translateY(-5px);
    border-color: #10B981;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.difficulty-option.selected {
    background: linear-gradient(135deg, #10B981, #3B82F6);
    color: white;
    border-color: #10B981;
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.difficulty-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.difficulty-option i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
}

.difficulty-option span {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.difficulty-option small {
    font-size: 0.85rem;
    opacity: 0.9;
}

.difficulty-option .badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.btn-start-game {
    width: 100%;
    padding: 25px;
    background: linear-gradient(135deg, #10B981, #3B82F6);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 900;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-start-game:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-start-game:not(:disabled):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.5);
}

.btn-glow {
    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 ease;
}

.btn-start-game:not(:disabled):hover .btn-glow {
    left: 100%;
}

.btn-back {
    display: block;
    text-align: center;
    color: var(--gray);
    text-decoration: none;
    font-weight: 700;
    padding: 15px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    color: #10B981;
}

.setup-body input, .setup-body .form-group select,
.setup-body .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E5E7EB;
    border-radius: 15px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    outline: none;
    box-shadow: none;
}


@media(max-width:991px) {
    .setup-screen {
        padding: 90px 0px 60px;
    }

    .setup-header {
        padding: 15px 10px;
    }

    .setup-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .section-label {
        font-size: .8rem;
    }

    .difficulty-option {
        padding: 10px 6px;
        font-size: 12px;
    }

    .theme-grid {
        gap: 5px !important;
    }

    .btn-start-game {
        padding: 10px;
        font-size: 1rem;
    }

    .game-container {
        padding: 135px 0px 60px;
    }

    .game-info-bar {
        gap: 4px;
    }

    .student-info {
        gap: 5px;
    }

    .btn-end-game {
        padding: 8px 25px;
    }

    .game-header {
        padding: 6px 0;
    }

    .stage-icon {
        font-size: 2rem;
        margin-bottom: 0px;
    }

    .stage-title p {
        font-size: 1rem;
    }

    .ayah-with-blanks {
        padding: 10px 5px;
        margin: 0 auto 35px;

        font-family: 'Amiri', serif;
    }

    .timer-value {
        font-size: 1.4rem;
        margin-bottom: 0px;
    }

    .timer-icon {
        font-size: 1.5rem;
        margin-bottom: 0px;
        display: none;
    }

    .stage-title {
        margin-bottom: 0px;
        margin-top: 10px;
    }

    .ayah-display {
        padding: 20px 5px;
    }

    .btn-submit {
        margin: -20px auto 13px;
        padding: 10px 20px;
        font-size: 1rem;
    }

    .ayah-info span {
        font-size: 1rem;
    }

    .completion-card {
        padding: 10px !important;
    }

    .completion-icon {
        font-size: 3rem !important;
        margin-bottom: 0px !important;
    }

    .completion-card h2 {
        font-size: 1.6rem !important;
    }

    .completion-card p {
        font-size: 1rem !important;
        margin: 15px 0 !important;
    }

    .completion-actions button {
        padding: 10px 13px !important;
        font-size: 1rem !important;
    }
}

/* ========================================
   GAME CONTROLS (Fullscreen & Share)
======================================== */
.game-controls {
    display: flex !important;
    gap: 10px;
    margin: 0 15px;
}

.btn-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    padding: 0 !important;
}

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

.btn-control:active {
    transform: scale(0.95);
}

.btn-control i {
    font-size: 16px;
}

/* ========================================
   FULLSCREEN MODE STYLES
======================================== */
.game-screen:fullscreen {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    padding: 0;
    overflow: auto;
    position: relative !important;
}

.game-screen:fullscreen .game-header {
    /* position: absolute !important; */
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 100;
}

/* ========================================
   SHARE MODAL - BASE STYLES
======================================== */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.share-modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.share-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.share-title {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.share-subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 14px;
}

.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.share-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
    transform: translateY(-3px);
}

.share-btn i {
    font-size: 24px;
}

.share-btn.whatsapp { color: #25d366; }
.share-btn.facebook { color: #1877f2; }
.share-btn.twitter { color: #1da1f2; }
.share-btn.copy { color: #6c757d; }

.share-btn span {
    font-size: 12px;
    font-weight: 500;
    color: #2c3e50;
}

.share-link-box {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.share-link-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    direction: ltr;
    text-align: left;
}

.share-link-copy {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.share-link-copy:hover {
    transform: scale(1.05);
}

.share-close {
    margin-top: 20px;
    padding: 12px 30px;
    background: #e9ecef;
    color: #6c757d;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.share-close:hover {
    background: #dee2e6;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #28a745;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.3);
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
