:root {
    --bg-dark: #0f172a;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-1: #6366f1;
    --accent-2: #ec4899;
    --accent-3: #a855f7;
    
    /* Lotto Ball Colors */
    --ball-yellow: linear-gradient(135deg, #fde047, #eab308); /* 1-10 */
    --ball-blue: linear-gradient(135deg, #93c5fd, #3b82f6); /* 11-20 */
    --ball-red: linear-gradient(135deg, #fca5a5, #ef4444); /* 21-30 */
    --ball-gray: linear-gradient(135deg, #d1d5db, #6b7280); /* 31-40 */
    --ball-green: linear-gradient(135deg, #86efac, #22c55e); /* 41-45 */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Orbs */
.background-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 { width: 300px; height: 300px; background: var(--accent-1); top: -10%; left: -10%; }
.orb-2 { width: 400px; height: 400px; background: var(--accent-2); bottom: -20%; right: -10%; animation-delay: -5s; }
.orb-3 { width: 250px; height: 250px; background: var(--accent-3); top: 40%; left: 50%; transform: translate(-50%, -50%); animation-delay: -10s; opacity: 0.3; }

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(360deg); }
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.8s ease-out;
}

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

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

.gradient-text {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #c4b5fd, #a855f7, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-weight: 300;
    font-size: 1.1rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select select {
    width: 100%;
    appearance: none;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
}

.custom-select select:focus {
    border-color: var(--accent-3);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.custom-select i {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.custom-select select option {
    background-color: var(--bg-dark);
    color: white;
}

/* Toggles */
.options-group {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.toggle-control {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #cbd5e1;
    user-select: none;
}

.toggle-control input {
    display: none;
}

.toggle-control .control {
    width: 44px;
    height: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    position: relative;
    margin-right: 10px;
    transition: all 0.3s;
}

.toggle-control .control::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
}

.toggle-control input:checked + .control {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    border-color: transparent;
}

.toggle-control input:checked + .control::after {
    transform: translateX(20px);
}

/* Advanced Options Container */
.advanced-options-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.advanced-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.advanced-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}

.fixed-summary {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--accent-1);
    min-height: 20px;
}

.advanced-toggles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.number-grid.hidden {
    display: none;
}

.num-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.9rem;
}

.num-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.num-btn.selected {
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3));
    color: white;
    border-color: transparent;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}

.btn-hot.selected {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.btn-cold.selected {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.summary-ball {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 0.3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Premium Button */
.premium-btn {
    width: 100%;
    padding: 1.2rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent-1), var(--accent-3), var(--accent-2));
    background-size: 200% auto;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.premium-btn:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(168, 85, 247, 0.5);
}

.premium-btn:active {
    transform: translateY(1px);
}

/* Results Area */
.results-area {
    min-height: 150px;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 1.1rem;
    height: 100%;
    padding: 2rem;
    opacity: 0.6;
}

.placeholder i {
    font-size: 2.5rem;
}

/* Lotto Row */
.lotto-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    animation: slideIn 0.5s ease backwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.row-label {
    font-weight: 800;
    color: var(--accent-3);
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.balls-container {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    justify-content: space-between;
}

/* Lotto Ball */
.ball {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    position: relative;
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.ball::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 10px;
    width: 15px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    transform: rotate(-45deg);
}

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

.b-yellow { background: var(--ball-yellow); }
.b-blue { background: var(--ball-blue); }
.b-red { background: var(--ball-red); }
.b-gray { background: var(--ball-gray); }
.b-green { background: var(--ball-green); }

footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 480px) {
    .glass-panel { padding: 1.5rem; }
    .balls-container { gap: 0.3rem; }
    .ball { width: 38px; height: 38px; font-size: 1rem; }
}
