:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.4);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-1: #8b5cf6; /* Purple */
    --accent-2: #3b82f6; /* Blue */
    --accent-3: #ec4899; /* Pink */
}

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

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

/* Background animated blobs */
.background-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(90px);
    opacity: 0.5;
    border-radius: 50%;
    animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
    width: 40vw;
    height: 40vw;
    background: var(--accent-1);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 35vw;
    height: 35vw;
    background: var(--accent-2);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    animation-direction: alternate-reverse;
}

.blob-3 {
    width: 30vw;
    height: 30vw;
    background: var(--accent-3);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    50% { transform: translate(50px, -50px) scale(1.1) rotate(180deg); }
    100% { transform: translate(-20px, 40px) scale(0.9) rotate(360deg); }
}

/* Main Container */
.container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--card-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 50px 40px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(255,255,255,0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 70px -15px rgba(0, 0, 0, 0.7), inset 0 0 20px rgba(255,255,255,0.05);
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 30px;
    background: linear-gradient(135deg, #fff 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
}

.fact-container {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    position: relative;
    width: 100%;
}

.fact-text {
    font-size: 1.4rem;
    line-height: 1.6;
    font-weight: 300;
    color: var(--text-primary);
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.fact-text.loading {
    opacity: 0;
    transform: translateY(10px);
}

/* Button */
.btn {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 1.15rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(139, 92, 246, 0.5);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s ease;
}

.btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(139, 92, 246, 0.6);
}

.btn:hover::before {
    left: 100%;
}

.btn:active {
    transform: scale(0.98);
}

.btn svg {
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn.rotating svg {
    animation: spin-refresh 1s ease infinite;
}

@keyframes spin-refresh {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loader */
.loader {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-2);
    border-left-color: var(--accent-1);
    animation: spin-loader 1.2s linear infinite;
    display: none;
}

.loader.active {
    display: block;
}

@keyframes spin-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 640px) {
    .glass-card {
        padding: 40px 25px;
        border-radius: 24px;
    }
    
    .title {
        font-size: 1.5rem;
    }
    
    .fact-text {
        font-size: 1.2rem;
    }
}
