:root {
    --bg-color: #0c0e14;
    --card-bg: rgba(30, 41, 59, 0.4);
    --primary-color: #38bdf8;
    --primary-hover: #0ea5e9;
    --accent-color: #f59e0b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(210, 100%, 15%, 0.5) 0, transparent 50%),
        radial-gradient(at 100% 100%, hsla(230, 100%, 10%, 0.5) 0, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
}

.container {
    width: 95%;
    max-width: 1000px;
    padding: 2rem;
    animation: fadeIn 0.8s ease-out;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: 0.5rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.2rem;
}

.subtitle {
    color: var(--primary-color);
    letter-spacing: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
}

main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 850px) {
    main {
        grid-template-columns: 1fr;
    }
}

/* Display Section */
.display-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: sticky;
    top: 2rem;
}

.current-number-card {
    width: 320px;
    height: 320px;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.current-number-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.1) 0%, transparent 70%);
    z-index: -1;
}

.prefix {
    font-size: 2rem;
    font-weight: 300;
    color: var(--primary-color);
    margin-bottom: -1rem;
}

.number {
    font-size: 9rem;
    font-weight: 800;
}

.controls {
    display: flex;
    gap: 1rem;
    width: 100%;
}

button {
    flex: 1;
    padding: 1.2rem;
    border: none;
    border-radius: 1rem;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px -5px rgba(56, 189, 248, 0.5);
}

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

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* History Section */
.history-section {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: var(--shadow-premium);
}

.history-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-weight: 400;
    text-align: center;
}

.bingo-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}

.board-num {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    color: rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
}

.board-num.drawn {
    background: var(--primary-color);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.pop-in {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.rolling {
    animation: roll 0.1s infinite linear;
}

@keyframes roll {
    0% { opacity: 0.5; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.5; transform: scale(0.95); }
}
