@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');

body {
    font-family: 'Nunito', sans-serif;
    background-color: #f3f4f6; /* Soft light gray */
    color: #1f2937; /* Dark slate text */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

h1 { color: #4f46e5; margin-bottom: 20px; font-weight: 700; }

.controls { margin-bottom: 30px; font-weight: 600; color: #4b5563; }
select {
    padding: 8px 12px;
    border-radius: 8px;
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    margin-left: 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

select:focus { border-color: #4f46e5; }

/* --- 3D Card CSS Magic --- */
.card-scene {
    width: 100%;
    height: 280px;
    perspective: 1000px; 
    cursor: pointer;
    margin-bottom: 30px;
}

.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d; 
}

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

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; 
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08); /* Soft elegant shadow */
}

.card-front {
    background: white;
    border: 2px solid #e5e7eb;
}

.card-back {
    background: linear-gradient(135deg, #6366f1, #8b5cf6); /* Indigo to Purple gradient */
    color: white;
    transform: rotateY(180deg); 
    border: none;
}

/* --- Typography & Buttons --- */
h2 { font-size: 2.8rem; margin: 10px 0; }
.label { font-size: 0.9rem; opacity: 0.6; text-transform: uppercase; letter-spacing: 1.5px; margin: 0; font-weight: 700; }
.card-back .label { opacity: 0.8; color: #e0e7ff; }
.hint { font-size: 0.9rem; color: #9ca3af; margin-top: 20px; }

button {
    background-color: #ffffff;
    color: #4f46e5;
    border: 2px solid #e5e7eb;
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

button:hover { 
    border-color: #4f46e5; 
    background-color: #f8fafc;
    transform: translateY(-2px);
}