:root {
    --primary: #8e2de2;
    --secondary: #4a00e0;
    --accent: #ff007f;
    --bg-dark: #0a0a12;
    --text-light: #ffffff;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: move 20s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary);
    bottom: -5%;
    right: -5%;
    animation-delay: -5s;
}

.blob-3 {
    width: 250px;
    height: 250px;
    background: var(--accent);
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes move {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 100px) scale(1.2); }
}

.app-container {
    width: 90%;
    max-width: 500px;
    text-align: center;
    z-index: 10;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

header h1 span {
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    opacity: 0.7;
    font-weight: 300;
    margin-bottom: 3rem;
}

.spinner-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.card-container {
    perspective: 1000px;
    width: 300px;
    height: 200px;
}

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

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

.card.spinning {
    animation: spin 0.4s linear infinite;
}

@keyframes spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

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

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    background: var(--glass);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.card-front {
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
}

.card-back {
    background: linear-gradient(135deg, rgba(142, 45, 226, 0.2), rgba(255, 0, 127, 0.2));
    transform: rotateY(180deg);
}

.spinner-icon {
    font-size: 5rem;
    font-weight: 800;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#questionText {
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 400;
}

.btn {
    padding: 1rem 3rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.btn.primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 10px 20px rgba(142, 45, 226, 0.3);
}

.btn.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(142, 45, 226, 0.4);
}

.btn.primary:active {
    transform: translateY(0);
}

.btn.stopping {
    background: linear-gradient(to right, var(--accent), #ff4b2b);
    box-shadow: 0 10px 20px rgba(255, 0, 127, 0.3);
}

footer {
    margin-top: 4rem;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.5;
}

@media (max-width: 480px) {
    .card-container {
        width: 260px;
        height: 180px;
    }
}
