/* Flashcard Page Styles */

.flashcard-page {
    /* Remove max-width to use Bootstrap's container default width */
    /* This ensures consistent layout with other pages */
}

/* Flashcard Card */
.flashcard-card {
    min-height: 300px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.flashcard-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Character Display */
.flashcard-character {
    font-size: 8rem;
    line-height: 1.1;
    font-family: "Noto Sans SC", "Microsoft YaHei", "SimHei", sans-serif;
    color: #212529;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .flashcard-character {
        font-size: 5rem;
    }
}

@media (max-width: 480px) {
    .flashcard-character {
        font-size: 4rem;
    }
}

/* Hidden character for quiz mode */
.flashcard-hidden {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    min-width: 150px;
    display: inline-block;
}

.flashcard-hidden .question-mark {
    color: #6c757d;
    font-family: inherit;
}

/* Pinyin Display */
.flashcard-pinyin {
    font-size: 2rem;
    color: #0d6efd;
    font-family: "Noto Sans", Arial, sans-serif;
}

@media (max-width: 768px) {
    .flashcard-pinyin {
        font-size: 1.5rem;
    }
}

/* Definition Display */
.flashcard-definition {
    font-size: 1.25rem;
    color: #495057;
}

/* Hidden text for quiz mode */
.flashcard-hidden-text {
    background-color: #e9ecef;
    border-radius: 4px;
    padding: 5px 15px;
    display: inline-block;
}

/* Example Sentences */
.example-sentence {
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0d6efd;
}

.example-chinese {
    font-size: 1.25rem;
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
    margin-bottom: 5px;
}

.example-pinyin {
    font-size: 0.95rem;
    font-style: italic;
}

.example-english {
    font-size: 1rem;
    color: #495057;
}

/* Ad Placeholders (Development) */
.ad-placeholder {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.ad-banner {
    min-height: 90px;
}

.ad-infeed {
    min-height: 100px;
}

.ad-sidebar {
    min-height: 600px;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
    background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
}

/* Level Selector Buttons */
.btn-outline-primary.active,
.btn-outline-primary:hover {
    color: #fff;
}

/* Mode Dropdown */
.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Accordion Styling */
.accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Character Details Grid */
.accordion-body .row > div {
    padding: 10px;
}

.accordion-body .row > div:nth-child(odd) {
    background-color: #f8f9fa;
}

/* Tone Colors (optional enhancement) */
.tone-1 { color: #ff0000; } /* First tone - red */
.tone-2 { color: #ffa500; } /* Second tone - orange */
.tone-3 { color: #008000; } /* Third tone - green */
.tone-4 { color: #0000ff; } /* Fourth tone - blue */
.tone-5 { color: #808080; } /* Neutral tone - gray */

/* Navigation Buttons */
.btn-primary {
    min-width: 100px;
}

/* Reveal Button Animation */
#revealBtn {
    transition: all 0.3s ease;
}

#revealBtn:hover {
    transform: scale(1.05);
}

/* Sticky Sidebar */
@media (min-width: 992px) {
    .sticky-top {
        position: sticky;
        top: 20px;
    }
}

/* Print Styles */
@media print {
    .ad-placeholder,
    .btn-group,
    nav,
    footer,
    .sticky-top {
        display: none !important;
    }
    
    .flashcard-card {
        border: 1px solid #000;
        box-shadow: none;
    }
}

/* Dark Mode Support (future) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}

/* Animation for card transitions */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flashcard-card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading spinner */
.fa-spinner {
    animation: fa-spin 1s infinite linear;
}

/* Mobile optimizations */
@media (max-width: 576px) {
    .flashcard-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn-group .btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.5rem;
    }
    
    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }
}

/* HSK Level Badge Colors */
.badge.bg-hsk1 { background-color: #28a745 !important; }
.badge.bg-hsk2 { background-color: #20c997 !important; }
.badge.bg-hsk3 { background-color: #17a2b8 !important; }
.badge.bg-hsk4 { background-color: #007bff !important; }
.badge.bg-hsk5 { background-color: #6f42c1 !important; }
.badge.bg-hsk6 { background-color: #dc3545 !important; }
