/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Section animations */
.vocabulary-section,
.listening-section,
.speaking-section,
.roleplay-section,
.assessment-section {
    animation: fadeIn 0.5s ease-out;
}

/* Dialog animations */
.dialog-container > div {
    animation: slideIn 0.3s ease-out;
}

/* Progress bar transition */
#progressBar {
    transition: width 0.5s ease-in-out;
}

/* Module card improvements */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.group:hover .group-hover\:text-blue-600 {
    color: #2563eb;
}

.group:hover .group-hover\:text-blue-700 {
    color: #1d4ed8;
}

.group:hover .group-hover\:text-gray-600 {
    color: #4b5563;
}

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Module number badge animation */
.group:hover .w-10.h-10 {
    animation: pulse 1s ease-in-out;
}

/* Custom hover effects */
.vocabulary-section .p-4 {
    transition: transform 0.2s ease-out, background-color 0.2s ease-out;
}

.vocabulary-section .p-4:hover {
    transform: translateY(-2px);
}

/* Speaking practice feedback */
#feedback {
    transition: opacity 0.3s ease-out;
}

#feedback.hidden {
    opacity: 0;
}

/* Role play dialog styling */
.dialog-container > div {
    position: relative;
    margin-bottom: 1rem;
}

.dialog-container > div::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 8px solid transparent;
}

.dialog-container > div.ml-4::before {
    left: -16px;
    border-right-color: white;
    transform: translateY(-50%);
}

.dialog-container > div.mr-4::before {
    right: -16px;
    border-left-color: white;
    transform: translateY(-50%);
}

/* Assessment form styling */
#assessmentForm input[type="radio"] {
    transition: all 0.2s ease-out;
}

#assessmentForm input[type="radio"]:checked + label {
    color: #2563eb;
    font-weight: 500;
}

/* Certificate modal */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.certificate-modal.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .dialog-container > div {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .dialog-container > div::before {
        display: none;
    }
}

/* Roleplay chat styling */
#roleplayMessages {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

#roleplayMessages::-webkit-scrollbar {
    width: 6px;
}

#roleplayMessages::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 3px;
}

#roleplayMessages::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#roleplayMessages::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Roleplay message animations */
#roleplayMessages > div {
    animation: slideIn 0.3s ease-out;
}

/* Recording button pulse animation */
@keyframes recordingPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#startRoleplayRecording:not(.hidden) {
    animation: recordingPulse 2s infinite;
}

/* Multiple choice styling */
.multiple-choice-section input[type="radio"]:checked + label {
    background-color: #dbeafe;
    border-color: #3b82f6;
}

.multiple-choice-section label:hover {
    background-color: #f3f4f6;
} 