/* ========================================
   SETUP SCREEN
======================================== */
.setup-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    padding: 120px 20px 60px;
    position: relative;
    overflow: hidden;
}

.setup-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(100px, 100px);
    }
}

.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, #8B5CF6, #EC4899);
    color: white;
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.setup-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

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

.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);
    position: relative;
    z-index: 1;
}

.setup-header h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.setup-header p {
    font-size: 1.3rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.setup-body {
    padding: 50px 40px;
}

.setup-body .form-group {
    margin-bottom: 10px;
}

.setup-body .form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

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

.setup-body .form-group input:focus,
.setup-body .form-group select:focus {
    border-color: #8B5CF6;
    outline: none;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.2);
}

.setup-body .form-group .input-group {
    display: flex;
    flex-direction: row-reverse;
}

.setup-body .form-group .input-group input {
    width: 80%;
}

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

.child-avatar-large {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto 20px;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
    animation: bounce 2s ease-in-out infinite;
}

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

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

.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: var(--primary-purple);
    font-size: 1.3rem;
}

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

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

.section-label i {
    color: var(--primary-purple);
}

.surah-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.surah-checkbox {
    position: relative;
}

.surah-checkbox input[type="checkbox"] {
    display: none;
}

.surah-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 15px;
    background: white;
    border: 3px solid #E5E7EB;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
}

.surah-label:hover {
    transform: translateY(-5px);
    border-color: #8B5CF6;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.surah-checkbox input[type="checkbox"]:checked+.surah-label {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    border-color: #8B5CF6;
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.4);
}

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

.selected-count strong {
    color: var(--primary-purple);
    font-size: 1.5rem;
}

.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: var(--primary-purple);
}

/* ========================================
   GAME SCREEN
======================================== */
.game-screen {
    min-height: 100vh;
    /* background: linear-gradient(180deg, #F9FAFB 0%, #E8F5FF 100%); */
    padding-top: 100px;
    position: relative;
}

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

.game-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

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

.student-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.3);
}

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

.stars-display {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #F59E0B;
    font-weight: 700;
    font-size: 1.1rem;
}

.surahs-remaining {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    color: var(--gray);
    font-weight: 600;
}

.surahs-remaining i {
    color: var(--primary-purple);
    font-size: 1.5rem;
    animation: spin 3s linear infinite;
}

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

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

.surahs-remaining strong {
    color: var(--primary-purple);
    font-size: 1.5rem;
}

.btn-end-game {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    border: none;
    padding: 7px 15px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.btn-end-game:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
}

/* 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 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;
}

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

/* Fix encouragement panel and sounds in fullscreen */
.game-screen:fullscreen .encouragement-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000 !important;
}

.game-screen:fullscreen .encouragement-buttons {
    position: relative;
    z-index: 1001;
}

.game-screen:fullscreen .btn-encourage {
    position: relative;
    z-index: 1002;
    cursor: pointer !important;
    pointer-events: auto !important;
}

.game-screen:fullscreen .celebration-overlay {
    position: fixed;
    z-index: 9999 !important;
}

.game-screen:fullscreen .celebration-character {
    z-index: 10000 !important;
}

/* Fix icons visibility in fullscreen */
.game-screen:fullscreen .btn-encourage i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-size: 1.5rem !important;
    color: white !important;
}

.game-screen:fullscreen .btn-encourage span {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.game-container {
    padding: 75px 0 150px;
}

.game-screen:fullscreen .game-container {
    padding: 110px 0 150px !important;
}

.game-screen:fullscreen .wheel-wrapper {
    margin: 45px auto 40px !important;
}
/* ========================================
   WHEEL
======================================== */
.wheel-container {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.wheel-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    margin: 0 auto 40px;
}

.wheel-pointer {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    color: #EF4444;
    z-index: 10;
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.3));
    animation: pointerBounce 1s ease-in-out infinite;
}

@keyframes pointerBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }

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

#wheelCanvas {
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
    width: 400px;
    height: 400px;
}

#wheelCanvas:hover {
    transform: scale(1.02);
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 40px rgba(139, 92, 246, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
    border: 5px solid white;
}

.wheel-center:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 50px rgba(139, 92, 246, 0.7);
}

.wheel-center.spinning {
    animation: centerSpin 0.5s linear infinite;
}

@keyframes centerSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.center-text {
    color: white;
    font-weight: 900;
    font-size: 0.6rem;
    margin-top: 10px;
}

.center-icon {
    font-size: 2rem;
}

.btn-spin {
    background: linear-gradient(135deg, #10B981, #3B82F6);
    color: white;
    border: none;
    padding: 9px 22px;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
    margin-top: -25px;
}

.btn-spin:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.5);
}

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

.btn-spin i {
    font-size: 2rem;
}

/* ========================================
   RESULT DISPLAY
======================================== */
.result-display {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.result-card {
    background: white;
    border-radius: 30px;
    padding: 60px 50px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: zoomIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 8rem;
    margin-bottom: 30px;
    animation: iconPulse 1.5s ease-in-out infinite;
}

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

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

.result-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray);
    margin-bottom: 20px;
}

.result-surah {
    font-size: 4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 40px;
    animation: surahZoom 1s ease;
}

@keyframes surahZoom {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.3) rotate(0deg);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-result {
    padding: 20px;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
}

.btn-result:hover {
    transform: translateY(-3px);
}

.btn-result.success {
    background: linear-gradient(135deg, #10B981, #3B82F6);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-result.success:hover {
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5);
}

.btn-result.retry {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
}

.btn-result.retry:hover {
    box-shadow: 0 15px 40px rgba(245, 158, 11, 0.5);
}

/* ========================================
   COMPLETION MESSAGE
======================================== */
.completion-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.completion-card {
    background: white;
    border-radius: 30px;
    padding: 60px 50px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    animation: scaleIn 1s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.completion-icon {
    font-size: 10rem;
    margin-bottom: 30px;
    animation: celebrate 1s ease-in-out infinite;
}

@keyframes celebrate {
    0%, 100% {
        transform: rotate(-10deg) scale(1);
    }

    50% {
        transform: rotate(10deg) scale(1.1);
    }
}

.completion-card h2 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 20px;
}

.completion-card p {
    font-size: 1.3rem;
    color: var(--gray);
    margin-bottom: 40px;
}

.btn-play-again {
    background: linear-gradient(135deg, #10B981, #3B82F6);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.4);
}

.btn-play-again:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(16, 185, 129, 0.5);
}

/* ========================================
   ENCOURAGEMENT PANEL
======================================== */
.encouragement-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
    z-index: 99;
}

.encouragement-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-encourage {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 1rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-encourage:hover {
    transform: translateY(-5px) scale(1.1);
}

.btn-encourage.clap {
    background: linear-gradient(135deg, #F59E0B, #EF4444);
}

.btn-encourage.star {
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
}

.btn-encourage.heart {
    background: linear-gradient(135deg, #EC4899, #EF4444);
}

.btn-encourage.trophy {
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
}

.btn-encourage.excellent {
    background: linear-gradient(135deg, #10B981, #3B82F6);
}

.btn-encourage i {
    font-size: 1.5rem;
}

/* ========================================
   CELEBRATION OVERLAY
======================================== */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99999;
}

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

.celebration-character {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 15rem;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.celebration-character.show {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

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

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

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

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

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

    .setup-body .form-group label {
        font-size: 14px;
    }

    .setup-body .form-group .input-group input {
        width: 60%;
    }

    .wheel-wrapper {
        width: 400px;
        height: 400px;
    }

    #wheelCanvas {
        width: 400px;
        height: 400px;
    }

    .wheel-center {
        width: 90px;
        height: 90px;
    }

    .center-text {
        font-size: 0.7rem;
    }

    .center-icon {
        font-size: 1.5rem;
    }

    .result-surah {
        font-size: 2.5rem;
    }

    .completion-icon {
        font-size: 6rem;
    }

    .completion-card h2 {
        font-size: 1rem;
    }

    .completion-card p {
        font-size: 1rem;
    }

    .btn-play-again {
        padding: 10px 14px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .wheel-wrapper {
        width: 300px;
        height: 300px;
    }

    #wheelCanvas {
        width: 300px;
        height: 300px;
    }

    .wheel-center {
        width: 70px;
        height: 70px;
    }

    .center-text {
        font-size: 0.6rem;
    }

    .center-icon {
        font-size: 1.2rem;
    }

    .btn-spin {
        padding: 8px 12px;
        font-size: .8rem;
    }

    .btn-spin i {
        font-size: 1rem;
    }

    .result-card {
        padding: 4px 10px;
    }

    .result-icon {
        font-size: 4rem;
    }

    .result-card h2 {
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    .btn-result {
        padding: 13px;
        font-size: 1rem;
    }

    .result-surah {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .setup-screen {
        padding: 102px 0px 46px;
    }

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

/* ################################# Public Footer Game   ##########################  */
@media(max-width:991px) {
    .surahs-remaining {
        gap: 4px;
        font-size: .7rem;
        font-weight: 600;
    }

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

    .btn-end-game {
        padding: 7px 10px;
        gap: 5px;
        font-size: 11px;
    }

    .surahs-remaining i {
        font-size: 1rem;
    }

    .surahs-remaining strong {
        font-size: 1rem;
    }

    .student-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .student-info strong {
        font-size: .8rem;
    }

    .encouragement-buttons {
        display: flex;
        gap: 3px;
        justify-content: center;
        flex-wrap: wrap;
    }

    .btn-encourage {
        padding: 6px 14px;
        gap: 5px;
        font-size: .9rem;
    }

    .btn-encourage i {
        font-size: 13px;
    }
}




/* Theme Selection */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.theme-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);
}

.theme-option:hover {
    transform: translateY(-5px) scale(1.05);
    border-color: #8B5CF6;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.theme-option.selected {
    border-color: #8B5CF6;
    background: linear-gradient(135deg, #F3E8FF, #FCE7F3);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.theme-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: float 3s ease-in-out infinite;
}

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

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

.theme-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark);
}

.theme-option.selected .theme-icon {
    animation: bounce 0.5s ease;
}


@media(max-width:991px) {

    .theme-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .theme-option {
        padding: 10px;
    }

    .theme-icon {
        font-size: 2rem;
    }
}

/* ========================================
   SHARE MODAL
======================================== */
.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;
}

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

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

/* 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;
}
