@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;900&family=Orbitron:wght@700&display=swap');
        
        :root {
            --primary: #6C5CE7;
            --secondary: #00CEFF;
            --accent: #FFD700;
            --dark: #1A1A2E;
            --darker: #16213E;
            --light: #F1F1F1;
            --success: #00E676;
            --danger: #FF3D00;
            --warning: #FFC400;
            --red: #FF4757;
            --green: #2ED573;
            --violet: #6C5CE7;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Montserrat', sans-serif;
            background: linear-gradient(135deg, var(--dark), var(--darker));
            color: var(--light);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            overflow-x: hidden;
        }
        
        .container {
            width: 95%;
            max-width: 1200px;
            margin: 2rem auto;
            perspective: 1000px;
        }
        
        .card {
            background: rgba(26, 26, 46, 0.9);
            backdrop-filter: blur(15px);
            border-radius: 20px;
            padding: 2rem;
            box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3),
                        0 0 0 1px rgba(255, 255, 255, 0.1);
            transform-style: preserve-3d;
            transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            border: 1px solid rgba(255, 255, 255, 0.1);
            overflow: hidden;
            position: relative;
            z-index: 1;
        }
        
        .card::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(108,92,231,0.2) 0%, rgba(0,0,0,0) 70%);
            animation: rotate 15s linear infinite;
            z-index: -1;
        }
        
        @keyframes rotate {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        
        header {
            text-align: center;
            margin-bottom: 2rem;
            position: relative;
        }
        
        .logo {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            margin-bottom: 1rem;
        }
        
        .logo-icon {
            font-size: 2.5rem;
            color: var(--accent);
            text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
        }
        
        header h1 {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.5rem;
            background: linear-gradient(to right, var(--accent), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            text-shadow: 0 0 20px rgba(0, 206, 255, 0.3);
            margin-bottom: 0.5rem;
            letter-spacing: 2px;
        }
        
        header p {
            color: rgba(255, 255, 255, 0.7);
            font-size: 1rem;
        }
        
        .game-panel {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 2rem;
            margin-bottom: 2rem;
        }
        
        @media (max-width: 768px) {
            .game-panel {
                grid-template-columns: 1fr;
            }
        }
        
        .timer-container, .result-container {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 15px;
            padding: 1.5rem;
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.05);
            position: relative;
            overflow: hidden;
        }
        
        .timer-container::before, .result-container::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, var(--primary), var(--secondary));
        }
        
        .timer-container:hover, .result-container:hover {
            transform: translateY(-5px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
            border-color: rgba(108, 92, 231, 0.3);
        }
        
        .panel-title {
            font-size: 1rem;
            color: rgba(255, 255, 255, 0.7);
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .panel-title i {
            color: var(--accent);
            font-size: 1.2rem;
        }
        
        .timer-display {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .period {
            font-family: 'Orbitron', sans-serif;
            font-size: 1.2rem;
            color: var(--accent);
            background: rgba(255, 215, 0, 0.1);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            border: 1px solid rgba(255, 215, 0, 0.2);
        }
        
        .countdown {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.5rem;
            background: linear-gradient(to right, var(--secondary), var(--primary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            display: flex;
            gap: 0.5rem;
            letter-spacing: 2px;
        }
        
        .result-display {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .prediction {
            font-family: 'Orbitron', sans-serif;
            font-size: 2.5rem;
            font-weight: bold;
            text-transform: uppercase;
            background: linear-gradient(to right, var(--accent), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            letter-spacing: 2px;
        }
        
        .prediction-badge {
            padding: 0.5rem 1.5rem;
            border-radius: 30px;
            font-weight: bold;
            text-transform: uppercase;
            font-size: 1rem;
            letter-spacing: 1px;
        }
        
        .big {
            background-color: rgba(46, 213, 115, 0.2);
            color: var(--green);
            border: 1px solid var(--green);
        }
        
        .small {
            background-color: rgba(255, 71, 87, 0.2);
            color: var(--red);
            border: 1px solid var(--red);
        }
        
        .recent-balls {
            display: flex;
            gap: 1rem;
            margin: 2rem 0;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .ball {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Orbitron', sans-serif;
            font-weight: bold;
            font-size: 1.2rem;
            position: relative;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
            transition: all 0.3s ease;
            animation: float 3s ease-in-out infinite;
            cursor: pointer;
        }
        
        .ball::after {
            content: '';
            position: absolute;
            top: -5px;
            left: -5px;
            right: -5px;
            bottom: -5px;
            border-radius: 50%;
            z-index: -1;
            opacity: 0;
            transition: all 0.3s ease;
        }
        
        .ball:hover::after {
            opacity: 0.3;
            top: -8px;
            left: -8px;
            right: -8px;
            bottom: -8px;
        }
        
        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }
        
        .ball:nth-child(1) { animation-delay: 0.1s; }
        .ball:nth-child(2) { animation-delay: 0.2s; }
        .ball:nth-child(3) { animation-delay: 0.3s; }
        .ball:nth-child(4) { animation-delay: 0.4s; }
        .ball:nth-child(5) { animation-delay: 0.5s; }
        
        .ball-red {
            background: linear-gradient(135deg, var(--red), #FF6B81);
            color: white;
        }
        
        .ball-red:hover::after {
            background: var(--red);
        }
        
        .ball-green {
            background: linear-gradient(135deg, var(--green), #7BED9F);
            color: white;
        }
        
        .ball-green:hover::after {
            background: var(--green);
        }
        
        .ball-violet {
            background: linear-gradient(135deg, var(--violet), #A55EEA);
            color: white;
        }
        
        .ball-violet:hover::after {
            background: var(--violet);
        }
        
        .history-section {
            margin-top: 2rem;
        }
        
        .section-title {
            display: flex;
            align-items: center;
            gap: 0.8rem;
            font-size: 1.3rem;
            margin-bottom: 1.5rem;
            color: var(--accent);
            font-weight: 600;
        }
        
        .section-title i {
            font-size: 1.5rem;
        }
        
        .history-table-container {
            background: rgba(255, 255, 255, 0.03);
            border-radius: 15px;
            overflow: hidden;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.05);
        }
        
        .history-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
        }
        
        .history-table thead th {
            background: linear-gradient(to right, var(--primary), var(--secondary));
            color: white;
            padding: 1.2rem;
            text-align: left;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.9rem;
            letter-spacing: 1px;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .history-table tbody tr {
            background: rgba(255, 255, 255, 0.03);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .history-table tbody tr:nth-child(even) {
            background: rgba(255, 255, 255, 0.05);
        }
        
        .history-table tbody tr:hover {
            background: rgba(255, 255, 255, 0.1);
        }
        
        .history-table td {
            padding: 1.2rem;
            border: none;
            position: relative;
        }
        
        .history-table td:not(:last-child)::after {
            content: '';
            position: absolute;
            top: 50%;
            right: 0;
            transform: translateY(-50%);
            width: 1px;
            height: 60%;
            background: rgba(255, 255, 255, 0.1);
        }
        
        .number-cell {
            font-family: 'Orbitron', sans-serif;
            font-weight: bold;
        }
        
        .size-cell, .color-cell {
            text-transform: uppercase;
            font-weight: bold;
            letter-spacing: 1px;
        }
        
        .color-red {
            color: var(--red);
        }
        
        .color-green {
            color: var(--green);
        }
        
        .color-violet {
            color: var(--violet);
        }
        
        .floating-bg {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
            overflow: hidden;
        }
        
        .floating-bg div {
            position: absolute;
            border-radius: 50%;
            filter: blur(80px);
            opacity: 0.15;
        }
        
        .floating-bg div:nth-child(1) {
            background: var(--primary);
            width: 400px;
            height: 400px;
            top: -100px;
            left: -100px;
            animation: float1 20s linear infinite;
        }
        
        .floating-bg div:nth-child(2) {
            background: var(--secondary);
            width: 300px;
            height: 300px;
            bottom: -100px;
            right: -100px;
            animation: float2 18s linear infinite;
        }
        
        .floating-bg div:nth-child(3) {
            background: var(--accent);
            width: 200px;
            height: 200px;
            top: 50%;
            left: 30%;
            animation: float3 25s linear infinite;
        }
        
        @keyframes float1 {
            0% { transform: translate(0, 0); }
            50% { transform: translate(200px, 150px); }
            100% { transform: translate(0, 0); }
        }
        
        @keyframes float2 {
            0% { transform: translate(0, 0); }
            50% { transform: translate(-150px, -100px); }
            100% { transform: translate(0, 0); }
        }
        
        @keyframes float3 {
            0% { transform: translate(0, 0) rotate(0deg); }
            100% { transform: translate(300px, -150px) rotate(360deg); }
        }
        
        /* Status bar */
        .status-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
            padding: 0.5rem 1rem;
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
            font-size: 0.9rem;
        }
        
        .status-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .status-item i {
            color: var(--accent);
        }
        
        .online-count {
            color: var(--green);
            font-weight: 600;
        }
        
        /* Responsive adjustments */
        @media (max-width: 768px) {
            header h1 {
                font-size: 2rem;
            }
            
            .period, .countdown, .prediction {
                font-size: 1.8rem;
            }
            
            .history-table td, .history-table th {
                padding: 0.8rem;
            }
            
            .ball {
                width: 45px;
                height: 45px;
                font-size: 1.1rem;
            }
        }
        
        @media (max-width: 480px) {
            .container {
                padding: 1rem;
            }
            
            .card {
                padding: 1.5rem;
            }
            
            header h1 {
                font-size: 1.6rem;
            }
            
            .period, .countdown, .prediction {
                font-size: 1.5rem;
            }
            
            .history-table td, .history-table th {
                padding: 0.6rem;
                font-size: 0.8rem;
            }
            
            .ball {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }
        }
        
        /* Popup styles */
        .popup-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        
        .popup-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        
        .popup-box {
            background: linear-gradient(135deg, var(--dark), var(--darker));
            color: white;
            width: 90%;
            max-width: 400px;
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
            transform: scale(0.9);
            transition: all 0.3s ease;
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }
        
        .popup-overlay.active .popup-box {
            transform: scale(1);
        }
        
        .popup-box::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: linear-gradient(to right, var(--primary), var(--secondary));
        }
        
        .popup-header {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 1rem;
            background: linear-gradient(to right, var(--accent), var(--secondary));
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }
        
        .popup-img {
            width: 100px;
            height: 100px;
            border-radius: 20px;
            margin: 1rem auto;
            object-fit: cover;
            border: 3px solid var(--accent);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }
        
        .popup-text {
            font-size: 0.95rem;
            line-height: 1.6;
            margin-bottom: 1.5rem;
            color: rgba(255, 255, 255, 0.8);
        }
        
        .popup-buttons {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }
        
        .popup-btn {
            padding: 1rem;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        
        .join-btn {
            background: linear-gradient(to right, var(--accent), #FFA500);
            color: #000;
        }
        
        .join-btn:hover {
            background: linear-gradient(to right, #FFA500, var(--accent));
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
        }
        
        .close-btn {
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.2);
        }
        
        .close-btn:hover {
            background: rgba(255, 255, 255, 0.2);
            transform: translateY(-3px);
        }
        
        /* Tooltip */
        .tooltip {
            position: relative;
            display: inline-block;
        }
        
        .tooltip .tooltiptext {
            visibility: hidden;
            width: 200px;
            background-color: rgba(0, 0, 0, 0.8);
            color: #fff;
            text-align: center;
            border-radius: 6px;
            padding: 0.5rem;
            position: absolute;
            z-index: 1;
            bottom: 125%;
            left: 50%;
            transform: translateX(-50%);
            opacity: 0;
            transition: opacity 0.3s;
            font-size: 0.8rem;
            backdrop-filter: blur(10px);
        }
        
        .tooltip:hover .tooltiptext {
            visibility: visible;
            opacity: 1;
        }
        
        /* Animated border for current period */
        .current-period {
            position: relative;
            overflow: hidden;
        }
        
        .current-period::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 2px;
            background: linear-gradient(to right, transparent, var(--accent), transparent);
            animation: borderGlow 2s infinite;
        }
        
        @keyframes borderGlow {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }