/**
 * Tamil Alphabet Pronunciation - Stylesheet
 * Version: 1.0.0
 * Description: Styles for interactive Tamil alphabet learning
 */

/* ==========================================
   MAIN WRAPPER
   ========================================== */
.tamil-alphabet-pronunciation-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ==========================================
   INSTRUCTIONS ACCORDION SECTION
   ========================================== */
.tap-instructions-container {
    max-width: 900px;
    margin: 20px auto 40px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
    padding: 20px;
}

.tap-instruction-accordion {
    margin-bottom: 15px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tap-instruction-accordion:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.tap-accordion-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.tap-instruction-accordion[data-lang="tamil"] .tap-accordion-header {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8E53 100%);
}

.tap-accordion-header:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.tap-accordion-icon {
    font-size: 28px;
    font-weight: bold;
    color: white;
    margin-right: 15px;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.tap-accordion-header.active .tap-accordion-icon {
    transform: rotate(45deg);
}

.tap-accordion-title {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    flex-grow: 1;
}

.tap-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: #F7F9FC;
}

.tap-accordion-content.active {
    max-height: 800px;
    padding: 25px;
}

.tap-instruction-text {
    color: #2D3748;
    line-height: 1.8;
}

.tap-instruction-text strong {
    color: #667eea;
    font-size: 18px;
}

.tap-instruction-text ol {
    padding-left: 25px;
    margin: 15px 0;
}

.tap-instruction-text li {
    margin-bottom: 15px;
    font-size: 16px;
    color: #4A5568;
}

.tap-tip-box {
    background: linear-gradient(135deg, #FFF9C4 0%, #F4E06D 100%);
    border-left: 5px solid #FFC107;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 20px;
    font-size: 16px;
}

/* ==========================================
   MAIN LEARNING AREA
   ========================================== */
.tap-learning-area {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #F0F4FF 0%, #F8F9FF 100%);
    border-radius: 30px;
}

.tap-letter-card-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto 40px;
    position: relative;
}

.tap-letter-card {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 5px solid transparent;
}

.tap-letter-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.tap-letter-card:active {
    transform: scale(0.98);
}

/* Letter Display */
.tap-letter-display {
    text-align: center;
    margin-bottom: 30px;
}

.tap-letter-main {
    font-size: 180px;
    font-weight: 900;
    color: #667eea;
    line-height: 1;
    text-shadow: 4px 4px 0px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    animation: tapLetterPulse 2s ease-in-out infinite;
}

.tap-letter-card:hover .tap-letter-main {
    color: #FF6B9D;
    text-shadow: 6px 6px 0px rgba(255, 107, 157, 0.2);
}

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

.tap-letter-romanization {
    font-size: 36px;
    font-weight: 700;
    color: #4A5568;
    margin-top: 10px;
    letter-spacing: 2px;
}

/* Audio Indicator */
.tap-audio-indicator {
    text-align: center;
    margin-top: 20px;
}

.tap-audio-icon {
    animation: tapIconBounce 1.5s ease-in-out infinite;
}

@keyframes tapIconBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.tap-click-prompt {
    font-size: 20px;
    font-weight: 600;
    color: #667eea;
    margin-top: 15px;
    animation: tapPromptPulse 1.5s ease-in-out infinite;
}

@keyframes tapPromptPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Sound Waves Animation */
.tap-sound-waves {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    pointer-events: none;
}

.tap-sound-waves.playing {
    display: block;
}

.tap-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    border: 4px solid #FF6B9D;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.tap-wave1 {
    animation: tapWaveAnimation 1.5s ease-out;
}

.tap-wave2 {
    animation: tapWaveAnimation 1.5s ease-out 0.3s;
}

.tap-wave3 {
    animation: tapWaveAnimation 1.5s ease-out 0.6s;
}

@keyframes tapWaveAnimation {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Success Animation */
.tap-success-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.tap-success-animation.show {
    animation: tapSuccessPop 1s ease-out forwards;
}

@keyframes tapSuccessPop {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1);
    }
}

.tap-stars-container {
    font-size: 60px;
    margin-bottom: 10px;
}

.tap-stars-container .tap-star {
    display: inline-block;
    animation: tapStarTwinkle 0.5s ease-in-out;
}

.tap-stars-container .tap-star:nth-child(2) {
    animation-delay: 0.1s;
}

.tap-stars-container .tap-star:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes tapStarTwinkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    50% {
        transform: scale(1.3) rotate(180deg);
    }
}

.tap-success-text {
    font-size: 32px;
    font-weight: 800;
    color: #4CAF50;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Card Shake Animation */
@keyframes tapCardShake {
    0%, 100% { 
        transform: translateX(0); 
    }
    25% { 
        transform: translateX(-10px) rotate(-2deg); 
    }
    75% { 
        transform: translateX(10px) rotate(2deg); 
    }
}

.tap-letter-card.shake {
    animation: tapCardShake 0.5s ease;
}

/* Navigation Buttons */
.tap-navigation-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
}

.tap-nav-button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 35px;
    font-size: 20px;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.tap-replay-button {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8E53 100%);
    color: white;
}

.tap-nav-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.tap-nav-button:active {
    transform: translateY(-2px);
}

.tap-button-icon {
    font-size: 24px;
}

/* Hide Audio Element */
.tap-audio-element {
    display: none;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .tap-accordion-title {
        font-size: 20px;
    }
    
    .tap-letter-main {
        font-size: 120px !important;
    }
    
    .tap-letter-romanization {
        font-size: 28px !important;
    }
    
    .tap-letter-card {
        padding: 40px 20px;
    }
    
    .tap-click-prompt {
        font-size: 18px;
    }
    
    .tap-navigation-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }
    
    .tap-nav-button {
        width: 100%;
        justify-content: center;
        padding: 16px 30px;
        font-size: 18px;
    }
    
    .tap-instruction-text li {
        font-size: 15px;
    }
    
    .tap-learning-area {
        padding: 30px 15px;
    }
}

@media (max-width: 480px) {
    .tap-letter-main {
        font-size: 100px !important;
    }
    
    .tap-accordion-header {
        padding: 15px 20px;
    }
    
    .tap-accordion-title {
        font-size: 18px;
    }
    
    .tap-tip-box {
        font-size: 14px;
    }
    
    .tap-letter-card {
        padding: 30px 15px;
    }
    
    .tap-audio-icon {
        width: 35px;
        height: 35px;
    }
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */
.tap-letter-card:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.tap-nav-button:focus {
    outline: 3px solid #FF6B9D;
    outline-offset: 3px;
}

/* Screen reader only text */
.tap-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
