@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --bg-color: #0d1117;
    --card-bg: rgba(22, 27, 34, 0.8);
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #f59e0b;
    --border: rgba(48, 54, 61, 0.8);
    /* Coin colors */
    --heads-color: #f59e0b;
    --tails-color: #d1d5db;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 2rem;
    overflow-x: hidden;
}

/* ── Background Blobs ── */
.bg-blobs {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: var(--primary-gradient);
    filter: blur(140px);
    opacity: 0.1;
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.blob-2 {
    bottom: -100px;
    left: -100px;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
}

/* ── Container ── */
.tool-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 3rem;
    text-align: center;
}

.header {
    margin-bottom: 3rem;
}

.header h1 {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
}

/* ── 3D Coin ── */
.coin-section {
    margin: 4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    perspective: 1000px;
}

.coin {
    width: 150px;
    height: 150px;
    position: relative;
    transform-style: preserve-3d;
    cursor: pointer;
    transition: transform 0.1s linear;
}

.side {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 8px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.coin-design {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.heads {
    background: var(--heads-color);
    transform: rotateY(0deg);
}

.tails {
    background: var(--tails-color);
    transform: rotateY(180deg);
    color: #334155;
}

.tails .coin-design {
    color: rgba(0, 0, 0, 0.5);
}

/* ── Animation Classes ── */
.flipping {
    pointer-events: none;
    transition: transform 1.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.flip-hint {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.flip-hint span {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
}

/* ── Dashboard ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.stat-card.highlight {
    background: rgba(245, 158, 11, 0.05);
    border-color: var(--accent);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.1em;
}

/* ── Controls ── */
.controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.9rem 2rem;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--border);
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    flex: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    color: #fff;
    border-color: #8b949e;
}

.btn-icon {
    width: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ── Announcement ── */
.announcement {
    height: 24px;
    margin-top: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.announcement.show {
    opacity: 1;
}

@media (max-width: 600px) {
    .tool-container {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .controls {
        flex-direction: column;
    }

    .btn-icon {
        width: 100%;
        height: 50px;
    }
}