/* Flashcards Page - Vibrant Colorful Theme */

.page-header {
    text-align: center;
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border-radius: 0;
}

.page-header h1 {
    font-size: 44px;
    margin-bottom: 15px;
}

.page-header p {
    font-size: 18px;
    opacity: 0.9;
}

/* Deck Selection */
.deck-selection {
    padding: 60px 20px;
}

.decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.deck-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid transparent;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.deck-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.deck-card:nth-child(1) {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fef3c7 0%, #ffffff 100%);
}

.deck-card:nth-child(2) {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #dbeafe 0%, #ffffff 100%);
}

.deck-card:nth-child(3) {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #ede9fe 0%, #ffffff 100%);
}

.deck-card:nth-child(4) {
    border-color: #ec4899;
    background: linear-gradient(135deg, #fce7f3 0%, #ffffff 100%);
}

.deck-card:nth-child(5) {
    border-color: #10b981;
    background: linear-gradient(135deg, #d1fae5 0%, #ffffff 100%);
}

.deck-card:nth-child(6) {
    border-color: #f97316;
    background: linear-gradient(135deg, #fed7aa 0%, #ffffff 100%);
}

.deck-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.deck-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #1f2937;
}

.deck-count {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.deck-level {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    color: #667eea;
}

/* Study Area */
.study-area {
    padding: 60px 20px;
}

.study-header {
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-back {
    background: #e5e7eb;
    color: #1f2937;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-back:hover {
    background: #d1d5db;
}

.progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.progress span {
    font-weight: 600;
    color: #667eea;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* Flashcard */
.flashcard-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    margin-bottom: 60px;
}

.flashcard {
    width: 100%;
    max-width: 500px;
    height: 300px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flashcard.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    padding: 30px;
}

.card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
}

/* Study Controls */
.study-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-action {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 28px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
}

.btn-action:hover {
    background: #667eea;
    color: white;
}

/* Feedback Buttons */
.feedback-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.btn-feedback {
    padding: 12px 28px;
    border: 2px solid;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.btn-feedback.hard {
    border-color: #ef4444;
    color: #ef4444;
}

.btn-feedback.hard:hover {
    background: #ef4444;
    color: white;
}

.btn-feedback.medium {
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-feedback.medium:hover {
    background: #f59e0b;
    color: white;
}

.btn-feedback.easy {
    border-color: #10b981;
    color: #10b981;
}

.btn-feedback.easy:hover {
    background: #10b981;
    color: white;
}

/* Study Stats */
.study-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #667eea;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 32px;
    }

    .decks-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .flashcard {
        height: 250px;
    }

    .card-front,
    .card-back {
        font-size: 20px;
        padding: 20px;
    }

    .study-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 24px;
    }

    .decks-grid {
        grid-template-columns: 1fr;
    }

    .deck-card {
        padding: 20px;
    }

    .deck-icon {
        font-size: 40px;
    }

    .flashcard {
        height: 200px;
    }

    .card-front,
    .card-back {
        font-size: 18px;
        padding: 15px;
    }

    .study-controls {
        gap: 10px;
    }

    .btn-action {
        padding: 10px 15px;
        font-size: 14px;
    }

    .study-stats {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .stat-value {
        font-size: 24px;
    }
}
