/* 발음 학습 공통 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 각 학습 페이지별 헤더 색상 */
.page-header.vowels {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.page-header.double-consonants {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.page-header.diphthongs {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.page-header.final-consonants {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

body {
    font-family: 'Noto Sans KR', 'Malgun Gothic', '맑은 고딕', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.page-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.9;
}

.consonant-grid {
    margin-top: -2rem;
    position: relative;
    z-index: 10;
}

.consonant-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.consonant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.consonant-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.consonant-icon {
    width: 4rem;
    height: 4rem;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 2rem;
    font-weight: bold;
}

.consonant-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.consonant-image {
    margin-left: 250px;
    width: 200px;
    height: auto;
    min-height: 200px;
    border-radius: 8px;
    overflow: visible;
    background: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed #d1d5db;
    padding: 0.5rem;
}

.consonant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.consonant-image.no-image {
    border-style: dashed;
    color: #9ca3af;
    font-size: 0.75rem;
    text-align: center;
    padding: 0.5rem;
}

.consonant-info p {
    color: #6b7280;
    font-size: 0.875rem;
}

.consonant-details {
    margin-bottom: 1rem;
}

.detail-item {
    margin-bottom: 0.75rem;
}

.detail-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.25rem;
}

.detail-value {
    color: #6b7280;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.example-item {
    background: #f3f4f6;
    padding: 0.5rem;
    border-radius: 0.25rem;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-item:hover {
    background: #e5e7eb;
    transform: scale(1.05);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #1e40af;
}

.btn-secondary {
    background: #6b7280;
    color: white;
    margin-left: 0.5rem;
}

.btn-secondary:hover {
    background: #4b5563;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    background: rgba(255, 255, 255, 0.9);
    color: #374151;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.back-button:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.top-navigation {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.module-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #3b82f6;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.module-button:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.ko-text, .vi-text {
    display: none;
}

.ko-text.show, .vi-text.show {
    display: block;
}

.ko-text.show, .vi-text.show {
    display: inline;
}

.hidden {
    display: none !important;
}

.show {
    display: block !important;
}

/* 연습 모달 반응형 디자인 */
@media (max-width: 768px) {
    .consonant-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .consonant-actions .btn {
        width: 100%;
    }
    
    #practiceModal > div {
        margin: 1rem;
        padding: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #practiceModal button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #practiceModal .grid {
        grid-template-columns: 1fr;
    }
    
    .grid-cols-2 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .consonant-header {
        flex-direction: column;
        text-align: center;
    }
    
    .consonant-icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}
