:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --coin-gold: linear-gradient(45deg, #f59e0b, #fbbf24, #f59e0b);
    --coin-silver: linear-gradient(45deg, #94a3b8, #cbd5e1, #94a3b8);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --glow: 0 0 20px rgba(168, 85, 247, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.15) 0%, transparent 20%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.main-container {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 90%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    perspective: 1000px;
}

.coin-container {
    width: 180px;
    height: 180px;
    position: relative;
}

.coin {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 3s cubic-bezier(0.4, 2.0, 0.2, 1); /* Bouncy effect */
}

.face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 0 0 8px rgba(255,255,255,0.2),
        0 0 20px rgba(0,0,0,0.3);
}

.face-content {
    width: 80%;
    height: 80%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255,255,255,0.3);
}

.face span {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.heads {
    background: var(--coin-gold);
    color: #78350f;
    transform: rotateY(0deg);
}

.tails {
    background: var(--coin-silver);
    color: #334155;
    transform: rotateY(180deg);
}

.glow-button {
    background: var(--primary-gradient);
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.glow-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.glow-button:active {
    transform: translateY(1px);
}

.glow-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

#result-text {
    font-size: 1.5rem;
    font-weight: 500;
    min-height: 2rem;
    color: var(--text-color);
}

footer {
    margin-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.legal-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}

.legal-link:hover {
    color: var(--text-color);
}
