.gradient-bg {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.timeline-item {
    position: relative;
    padding-left: 3rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: #f59e0b;
    border-radius: 50%;
    border: 3px solid #1a1a2e;
}
.timeline-item::after {
    content: '';
    position: absolute;
    left: 0.375rem;
    top: 1.5rem;
    width: 0.25rem;
    height: calc(100% - 1rem);
    background: #374151;
}
.timeline-item:last-child::after {
    display: none;
}

/* FIXED FLIP CARD STYLES - NO MORE FRONT SHOWING THROUGH */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 300px;
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    /* CRITICAL: This prevents the front from showing through */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    /* Additional fix: Ensure proper z-index and opacity handling */
    opacity: 1;
}

.flip-card-back {
    /* IMPORTANT: The back starts rotated 180 degrees */
    transform: rotateY(180deg);
}

/* Additional fixes for better flip behavior */
.flip-card-front {
    /* Ensure front is at normal rotation initially */
    transform: rotateY(0deg);
}

/* Make sure flipped state properly hides the front */
.flip-card.flipped .flip-card-front {
    /* When flipped, front should be completely hidden */
    opacity: 0;
    pointer-events: none;
}

.flip-card.flipped .flip-card-back {
    /* When flipped, back should be fully visible */
    opacity: 1;
    pointer-events: auto;
}

/* Ensure non-flipped state hides the back */
.flip-card:not(.flipped) .flip-card-back {
    opacity: 0;
    pointer-events: none;
}

.flip-card:not(.flipped) .flip-card-front {
    opacity: 1;
    pointer-events: auto;
}

.quiz-progress {
    transition: width 0.3s ease;
}

/* Loading fade animation */
.loading-fade {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

/* Active navigation button */
.nav-btn.active {
    background-color: rgba(59, 130, 246, 0.8) !important;
    transform: scale(1.05);
}