.exercise-container {
    position: relative;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 16px;
    overflow: hidden;
    margin: 25px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    width: 100%;
}

.exercise-container iframe {
    border: none;
    border-radius: 16px;
    display: block;
    width: 100%;
}

.btn-fullscreen {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(12px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-fullscreen:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.btn-fullscreen:active {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(0.95);
}

/* وضع ملء الشاشة */
.exercise-container iframe.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: white;
    border-radius: 0;
}

/* زر الإغلاق في وضع ملء الشاشة */
.close-fullscreen {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    background: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.close-fullscreen:hover {
    background: rgba(220, 53, 69, 0.95);
    transform: scale(1.1);
}

.close-fullscreen:active {
    background: rgba(220, 53, 69, 1);
    transform: scale(0.95);
}

/* تصميم متجاوب مع ارتفاع متوسط للهاتف */
@media (max-width: 768px) {
    .exercise-container {
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .exercise-container iframe {
        border-radius: 12px;
        height: 480px !important;
    }
    
    .btn-fullscreen {
        width: 38px;
        height: 38px;
        bottom: 12px;
        right: 12px;
    }
    
    .close-fullscreen {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .exercise-container iframe {
        height: 420px !important;
    }
    
    .btn-fullscreen {
        width: 35px;
        height: 35px;
        bottom: 10px;
        right: 10px;
    }
}

/* للهاتف الصغير جداً */
@media (max-width: 375px) {
    .exercise-container iframe {
        height: 390px !important;
    }
    
    .btn-fullscreen {
        width: 32px;
        height: 32px;
        bottom: 8px;
        right: 8px;
    }
}

/* للهاتف الصغير جداً جداً */
@media (max-width: 320px) {
    .exercise-container iframe {
        height: 360px !important;
    }
    
    .btn-fullscreen {
        width: 30px;
        height: 30px;
        bottom: 6px;
        right: 6px;
    }
}
