* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: #0a0015 !important;
    background-image: linear-gradient(135deg, #0a0015 0%, #1a0033 50%, #2d0052 100%) !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 0, 255, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 0, 150, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 255, 150, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.header {
    text-align: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.title {
    font-size: 2rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

.category-select {
    background: rgba(124, 58, 237, 0.3);
    border: 1px solid rgba(124, 58, 237, 0.5);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
}

.category-select option {
    background: #2d1b69;
    color: white;
}

.sticker-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 25px;
}

.sticker-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.sticker-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background: transparent;
}

.card-container {
    perspective: 1000px;
    width: 100%;
    max-width: 600px;
    height: 400px;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s ease-in-out;
    cursor: pointer;
}

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

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card-back {
    background: linear-gradient(45deg, #2d1b69, #11001c, #2d1b69);
    background-size: 200% 200%;
    animation: shimmer 3s ease-in-out infinite;
    border: 2px solid #7c3aed;
}

.card-back::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.card-back-content {
    z-index: 2;
    color: #e4e7eb;
}

.card-back h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    text-shadow: 0 0 20px rgba(124, 58, 237, 0.8);
}

.card-back p {
    font-size: 1.1rem;
    opacity: 0.8;
    font-style: italic;
}

.card-front {
    background: linear-gradient(135deg, #4c1d95, #5b21b6, #6d28d9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: rotateY(180deg);
    flex-direction: column;
    gap: 20px;
    z-index: 10;
}

/* Hide the card back content when flipped */
.card.flipped .card-back-content {
    opacity: 0;
    visibility: hidden;
}

.question-text {
    font-size: 1.4rem;
    line-height: 1.6;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: #ffffff;
    z-index: 20;
}

.answer-text {
    font-size: 1.2rem;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(251, 191, 36, 0.4);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

.answer-text.show {
    opacity: 1;
    transform: translateY(0);
}

.button-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 20px;
    flex-wrap: wrap;
}

.btn {
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.8), rgba(79, 70, 229, 0.8));
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(124, 58, 237, 0.4);
    background: linear-gradient(145deg, rgba(124, 58, 237, 1), rgba(79, 70, 229, 1));
}

.btn:active {
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.3; }
}

.extras-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fbbf24;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .title { font-size: 1.5rem; }
    .question-text { font-size: 1.2rem; }
    .card-container { height: 350px; }
    .card-face { padding: 30px; }
    .stats { flex-direction: column; gap: 10px; }
    .controls { flex-direction: column; gap: 15px; }
    .button-container { gap: 15px; }
    .btn { padding: 12px 25px; font-size: 0.9rem; min-width: 100px; }
}