@import url(../css/color.css);
@import url(../css/default.css);
@import url(../css/component.css);
@import url(../css/responsive.css);

/* Font Imports - Premium Selection */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;800&family=Oswald:wght@500;700&display=swap');

:root {
    --bg-deep: #050a14;
    --bg-panel: #0a1124;
    --gold-primary: #e6b800;
    --gold-gradient: linear-gradient(135deg, #ffd700 0%, #b8860b 100%);
    --ball-red: radial-gradient(circle at 35% 35%, #ff4d4d 0%, #cc0000 40%, #800000 90%);
    --ball-gold: radial-gradient(circle at 35% 35%, #fffacd 0%, #ffd700 30%, #b8860b 80%, #5e4303 100%);
    --ball-blue: radial-gradient(circle at 35% 35%, #4da6ff 0%, #0066cc 40%, #003366 90%);
    --text-white: #ffffff;
    --text-muted: #8b9bb4;
    --glass-panel: rgba(10, 17, 36, 0.85);
}

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

body {
    background-color: var(--bg-deep);
    /* Procedural "Blurry City Night" Background - High Visibility */
    background-image:
        /* Gold Street Lights (Left) */
        radial-gradient(circle at 10% 50%, rgba(255, 215, 0, 0.25) 0%, transparent 40%),
        /* Blue Skyscraper Glow (Top Right) */
        radial-gradient(circle at 90% 10%, rgba(0, 100, 255, 0.3) 0%, transparent 40%),
        /* Red Taillights (Bottom Right) */
        radial-gradient(circle at 80% 90%, rgba(255, 50, 50, 0.25) 0%, transparent 35%),
        /* Central Glow */
        radial-gradient(circle at 50% 40%, rgba(40, 60, 100, 0.2) 0%, transparent 50%),
        /* Deep Base Gradient */
        linear-gradient(to bottom, #0c1c3d 0%, #010205 100%);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-white);
    font-family: 'Montserrat', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Layout Grid */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* LEFT COLUMN - HERO / LIVE DRAW */
.hero-column {
    flex: 6;
    /* 60% Width */
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* RIGHT COLUMN - HISTORY */
.history-column {
    flex: 4;
    /* 40% Width */
    background: var(--glass-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    /* Safari support */
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 100vh;
    position: sticky;
    top: 0;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

/* Header/Nav Styles */
.brand-header {
    position: absolute;
    top: 40px;
    left: 60px;
    display: flex;
    align-items: center;
}

.brand-header .web-logo {
    height: 50px;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

/* Typography */
.display-title {
    font-family: 'Oswald', sans-serif;
    font-size: 4rem;
    text-transform: uppercase;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* 3D BALLS COMPONENT */
.balls-container {
    display: flex;
    gap: 20px;
    margin-bottom: 60px;
    perspective: 1000px;
}

.lotto-ball {
    margin-inline: 2.5px;
}
.lotto-ball .prize-digit {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);

    /* The 3D Magic */
    background: var(--ball-gold);
    box-shadow:
        inset -10px -10px 20px rgba(0, 0, 0, 0.5),
        /* Deep shadow bottom right */
        inset 10px 10px 20px rgba(255, 255, 255, 0.4),
        /* Highlight top left */
        0 20px 30px rgba(0, 0, 0, 0.6);
    /* Drop shadow */

    animation: float 6s ease-in-out infinite;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Stagger animations */
.lotto-ball:nth-child(2) .prize-digit {
    animation-delay: 1s;
}

.lotto-ball:nth-child(3) .prize-digit {
    animation-delay: 2s;
}

.lotto-ball:nth-child(4) .prize-digit {
    animation-delay: 3s;
}

.lotto-ball:hover {
    transform: translateY(-10px) scale(1.05);
    cursor: pointer;
}

/* Smaller Balls for 2nd/3rd Prize */
.lotto-ball.small .prize-digit {
    background: var(--ball-blue);
    width: 70px;
    height: 70px;
    font-size: 2rem;
    box-shadow:
        inset -5px -5px 10px rgba(0, 0, 0, 0.5),
        inset 5px 5px 10px rgba(255, 255, 255, 0.4),
        0 10px 15px rgba(0, 0, 0, 0.5);
}

/* Secondary Prizes Layout */
.secondary-prizes-row {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    margin-top: 20px;
}

.prize-box {
    text-align: center;
}

.prize-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    font-weight: 600;
    text-align: center;
}

/* Adjusted Container for small balls */
.balls-container.small-gap {
    gap: 10px;
    margin-bottom: 0;
}

/* Countdown */
.timer-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 20px;
}

.timer-label {
    text-transform: uppercase;
    font-size: 0.9rem;
    color: var(--text-white);
    letter-spacing: 1px;
}

.timer-digits {
    font-family: 'Oswald', sans-serif;
    font-size: 2rem;
    color: var(--gold-primary);
    font-weight: 700;
}

/* HISTORY PANEL STYLES */
.history-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 215, 0, 0.2);
    transform: translateX(5px);
}

.history-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.history-draw-no {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
}

.mini-balls {
    display: flex;
    gap: 8px;
}

.mini-ball {
    margin-inline: 2.5px;
}
.mini-ball .prize-digit {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #1a253a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-ball.winner .prize-digit {
    background: var(--gold-gradient);
    color: #000;
    border: none;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* Footer (In History Panel) */
.panel-footer {
    margin-top: auto;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Animations */
@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
    }

    .hero-column {
        height: auto;
        min-height: 80vh;
        padding: 100px 15px 60px;
        align-items: center;
        text-align: center;
    }

    .history-column {
        height: auto;
        overflow-y: visible;
        padding: 40px 30px;
    }

    .brand-header {
        top: 20px;
        left: 20px;
    }
}

@media (max-width: 600px) {
    .lotto-ball .prize-digit {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    .lotto-ball.small .prize-digit {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .balls-container {
        gap: 10px;
    }

    .display-title {
        font-size: 2.5rem;
    }
}