@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
    --sea-blue: #0066cc;
    --deep-blue: #003d7a;
    --light-blue: #3399ff;
    --silver: #d4d4d8;
    --bright-silver: #f4f4f5;
    --dark-silver: #a1a1aa;
    --white: #ffffff;
    --gold: #f59e0b;
    --dark-bg: #09090b;
    --card-bg: rgba(24, 24, 27, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #001529 0%, #002447 25%, #003d7a 50%, #0066cc 100%);
    background-attachment: fixed;
    color: var(--white);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(51, 153, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    animation: float-bg 20s ease-in-out infinite;
}

@keyframes float-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    background: rgba(24, 24, 27, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 16px;
    padding: 16px 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
}

.nav-logo img {
    width: 100%;
    height: 100px;
    filter: drop-shadow(0 0 10px rgba(51, 153, 255, 0.5));
}

.nav-logo span {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 10px;
}

.nav-link {
    padding: 10px 24px;
    background: rgba(51, 153, 255, 0.1);
    border: 1px solid rgba(51, 153, 255, 0.2);
    border-radius: 12px;
    color: var(--light-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(51, 153, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: rgba(51, 153, 255, 0.2);
    border-color: var(--light-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(51, 153, 255, 0.3);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--sea-blue) 100%);
    border-color: transparent;
    color: white;
}

/* Header */
header {
    text-align: center;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
}

.logo-container {
    display: inline-block;
    margin-bottom: 30px;
    position: relative;
}

.logo {
    width: 100%;
    height: 120px;
    filter: drop-shadow(0 0 30px rgba(51, 153, 255, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

h1 {
    font-family: 'Space Mono', monospace;
    font-size: 4.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffffff 0%, var(--light-blue) 50%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    letter-spacing: 4px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    line-height: 1.1;
}

.tagline {
    font-size: 1.3rem;
    color: var(--light-blue);
    font-weight: 400;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Next Draw Info */
.next-draw-info {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.next-draw-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(51, 153, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.next-draw-info > * {
    position: relative;
    z-index: 1;
}

.next-draw-info h2 {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--bright-silver) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
}

.draw-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.draw-time-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.draw-time-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--light-blue), var(--gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.draw-time-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(51, 153, 255, 0.3);
    box-shadow: 0 15px 40px rgba(51, 153, 255, 0.2);
}

.draw-time-card:hover::before {
    transform: scaleX(1);
}

.draw-time-card.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 2px solid var(--gold);
    box-shadow: 0 0 40px rgba(245, 158, 11, 0.3), inset 0 0 20px rgba(245, 158, 11, 0.1);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(245, 158, 11, 0.3), inset 0 0 20px rgba(245, 158, 11, 0.1); }
    50% { box-shadow: 0 0 50px rgba(245, 158, 11, 0.5), inset 0 0 30px rgba(245, 158, 11, 0.2); }
}

.draw-type {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.draw-time {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    font-family: 'Space Mono', monospace;
}

/* Live Draw Section */
.live-draw-section {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 24px;
    padding: 50px;
    margin-bottom: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    display: none;
}

.live-draw-section.active {
    display: block;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-header {
    text-align: center;
    margin-bottom: 40px;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    box-shadow: 0 5px 20px rgba(239, 68, 68, 0.4);
    animation: live-pulse 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

.live-badge::before {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.live-draw-title {
    font-family: 'Space Mono', monospace;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
}

/* Prize Display */
.prizes-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.prize-row {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.prize-row.revealed {
    opacity: 1;
    transform: translateY(0);
    animation: revealPrize 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes revealPrize {
    0% { 
        opacity: 0; 
        transform: translateY(40px) scale(0.9);
    }
    60% { 
        transform: translateY(-10px) scale(1.03);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

.prize-label {
    font-family: 'Space Mono', monospace;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.prize-1 .prize-label { 
    font-size: 2rem; 
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prize-2 .prize-label { color: #d4d4d8; }
.prize-3 .prize-label { color: #cd7f32; }

.number-display {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.number-ball {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4f4f5 0%, #d4d4d8 100%);
    border: 3px solid rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--deep-blue);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset -4px -4px 12px rgba(0, 0, 0, 0.2),
        inset 4px 4px 12px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
}

.prize-1 .number-ball {
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fef3c7;
    width: 90px;
    height: 90px;
    font-size: 2.8rem;
    box-shadow: 
        0 10px 30px rgba(245, 158, 11, 0.5),
        inset -5px -5px 15px rgba(217, 119, 6, 0.3),
        inset 5px 5px 15px rgba(254, 243, 199, 0.5);
}

.number-ball::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 35%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
}

.number-ball.spinning {
    animation: spin-3d 0.8s linear infinite;
}

@keyframes spin-3d {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* Multiple numbers for consolation and special */
.multiple-numbers {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.number-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 5px 0;
    width: 100%;
}


.number-row .number-ball {
    width: 60px;
    height: 60px;
    font-size: 1.6rem;
}

/* Latest Results */
.results-section {
    margin-top: 60px;
}

.results-section h2 {
    font-family: 'Space Mono', monospace;
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--bright-silver) 0%, var(--light-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 800;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 25px;
}

.result-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 212, 216, 0.1);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--light-blue), var(--gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.result-card:hover {
    transform: translateY(-8px);
    border-color: rgba(51, 153, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.result-card:hover::before {
    transform: scaleX(1);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(212, 212, 216, 0.1);
}

.result-draw-type {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gold) 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 1px;
}

.result-date {
    color: var(--dark-silver);
    font-size: 0.95rem;
    font-weight: 600;
}

.result-prizes {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.result-prize-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.result-prize-label {
    font-weight: 600;
    color: var(--bright-silver);
    font-size: 0.95rem;
    white-space: nowrap;
}

.result-prize-numbers {
    display: flex;
    gap: 6px;
}

.small-ball {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4f4f5 0%, #d4d4d8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--deep-blue);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 3px 8px rgba(0, 0, 0, 0.3),
        inset -2px -2px 6px rgba(0, 0, 0, 0.15),
        inset 2px 2px 6px rgba(255, 255, 255, 0.3);
}

.gold-ball {
    background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 100%);
    border-color: #fef3c7;
    box-shadow: 
        0 3px 10px rgba(245, 158, 11, 0.4),
        inset -2px -2px 6px rgba(217, 119, 6, 0.3),
        inset 2px 2px 6px rgba(254, 243, 199, 0.4);
}

.silver-ball {
    background: linear-gradient(145deg, #e5e7eb 0%, #d1d5db 100%);
}

.bronze-ball {
    background: linear-gradient(145deg, #fdba74 0%, #f97316 100%);
    border-color: #fed7aa;
}

.result-prize-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(212, 212, 216, 0.05);
}

.result-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
}

.result-prize-item-small {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.result-prize-numbers-compact {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap !important;
    overflow-x: auto;
}

.tiny-ball {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, #f4f4f5 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--deep-blue);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 2px 5px rgba(0, 0, 0, 0.2),
        inset -1px -1px 3px rgba(0, 0, 0, 0.1),
        inset 1px 1px 3px rgba(255, 255, 255, 0.3);
}

/* Footer */
footer {
    text-align: center;
    padding: 50px 20px;
    margin-top: 80px;
    border-top: 1px solid rgba(212, 212, 216, 0.1);
    background: rgba(9, 9, 11, 0.5);
}

footer p {
    color: var(--dark-silver);
    font-size: 1rem;
    margin-bottom: 10px;
}

footer a {
    color: var(--light-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
    }
    
    .nav-link {
        text-align: center;
    }
    
    h1 {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }
    
    .tagline {
        font-size: 1rem;
        letter-spacing: 3px;
    }
    
    .draw-schedule {
        grid-template-columns: 1fr;
    }
    
    .number-ball {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.5rem !important;
        min-width: 50px;
    }
    
    .prize-1 .number-ball {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.8rem !important;
        min-width: 60px;
    }
    
    .number-row .number-ball {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.3rem !important;
        min-width: 45px;
    }
    
    .small-ball {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
        min-width: 32px;
    }
    
    .tiny-ball {
        width: 26px !important;
        height: 26px !important;
        font-size: 0.75rem !important;
        min-width: 26px;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .live-draw-section {
        padding: 30px 20px;
    }
    
    .live-draw-title {
        font-size: 2rem;
    }
}

/* Ensure numbers stay in one line */
.number-display {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 5px 0;
}

.number-row {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding: 5px 0;
}

.result-prize-numbers {
    flex-wrap: nowrap !important;
    overflow-x: auto;
}

.result-prize-numbers-compact {
    flex-wrap: nowrap !important;
    overflow-x: auto;
}

/* Loading Animation */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(212, 212, 216, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

/* FIXED: Special/Consolation prize rows - centered with gap */
.result-prize-section .result-prize-numbers {
    display: flex;
    gap: 5px;
    justify-content: center !important;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: nowrap;
}

.result-prize-section .result-prize-numbers:last-child {
    margin-bottom: 0;
}

/* Ensure result-prize-numbers-compact is also centered */
.result-prize-numbers-compact {
    display: flex;
    gap: 5px;
    justify-content: center !important;
    align-items: center;
    flex-wrap: nowrap;
    margin-bottom: 10px;
}

/* Mobile responsive for result cards and small balls */
@media (max-width: 768px) {
    .small-ball {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        font-size: 0.85rem !important;
    }
    
    .result-prize-numbers {
        gap: 4px !important;
    }
    
    .result-prize-section .result-prize-numbers {
        gap: 4px !important;
        margin-bottom: 10px !important;
    }
}

@media (max-width: 480px) {
    .small-ball {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        font-size: 0.75rem !important;
    }
    
    .result-prize-numbers {
        gap: 3px !important;
    }
    
    .result-prize-section .result-prize-numbers {
        gap: 3px !important;
        margin-bottom: 8px !important;
    }
    
    .result-prize-label {
        font-size: 0.7rem !important;
    }
    
    .result-section-title {
        font-size: 0.75rem !important;
        margin-bottom: 10px !important;
    }
    
    .result-card {
        padding: 15px !important;
    }
}

@media (max-width: 360px) {
    .small-ball {
        width: 22px !important;
        height: 22px !important;
        min-width: 22px !important;
        min-height: 22px !important;
        font-size: 0.7rem !important;
    }
}