.flashcard-page {
    min-height: 100vh;
    padding: 80px 2rem 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.flashcard-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.flashcard-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.flashcard-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.flashcard-progress {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: center;
}
#progressText {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    min-width: 60px;
}
.progress-bar {
    width: 200px;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Card container with perspective */
.flashcard-container {
    perspective: 1200px;
    width: 100%;
    max-width: 600px;
    height: 360px;
    cursor: pointer;
    margin-bottom: 2rem;
}

.flashcard {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.flashcard-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.flashcard-front {
    background: var(--surface);
    border: 2px solid var(--border);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.flashcard-front:hover {
    border-color: var(--accent);
}

.flashcard-back {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid var(--accent);
    box-shadow: 0 8px 40px rgba(255,153,0,0.1);
    transform: rotateY(180deg);
}

.card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 1.5rem;
    padding: 0.3rem 0.8rem;
    background: rgba(255,153,0,0.1);
    border-radius: 20px;
}

.card-question {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
    max-width: 480px;
}

.card-answer {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text);
    max-width: 480px;
}

.card-hint {
    position: absolute;
    bottom: 1.25rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Controls */
.flashcard-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.fc-btn {
    padding: 0.7rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.fc-btn:hover { border-color: var(--accent); color: var(--accent); }
.fc-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.fc-btn-primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.fc-btn-primary:hover { box-shadow: 0 4px 15px rgba(255,153,0,0.3); }
.fc-btn-primary:disabled { background: var(--surface); color: var(--text-muted); border-color: var(--border); box-shadow: none; }
.shuffle-btn { font-size: 0.8rem; }

@media (max-width: 700px) {
    .flashcard-container { height: 320px; }
    .card-question { font-size: 1.2rem; }
    .card-answer { font-size: 1rem; }
    .flashcard-face { padding: 1.5rem; }
}
