/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 15px;
    color: #333;
}

.container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 15px 0;
}

.main-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 100%;
    padding: 25px;
    animation: fadeIn 0.5s ease-in;
}

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

h1 {
    text-align: center;
    color: #667eea;
    font-size: 2em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    text-align: center;
    color: #666;
    font-size: 1em;
    margin-bottom: 20px;
    font-style: italic;
}

/* Game Sections */
.game-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-section:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.game-header h2 {
    color: #333;
    font-size: 1.3em;
    margin: 0;
}

.draw-day {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: bold;
}

.game-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.games-select {
    padding: 8px 12px;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.games-select:hover {
    border-color: #764ba2;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.games-select:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.badge {
    background: #ffd700;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
    flex: 0 0 auto;
}

/* Buttons */
.myButton {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    flex: 1;
    min-width: 140px;
}

.myButton:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.myButton:active {
    transform: translateY(0);
}

/* Result Display */
.result-display {
    min-height: 50px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-top: 10px;
}

.game-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.row-label {
    font-weight: bold;
    color: #667eea;
    min-width: 65px;
    font-size: 0.9em;
}

.numberCircle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1em;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
    animation: popIn 0.4s ease;
}

.numberCircle:hover {
    transform: scale(1.1);
}

.numberCircle.powerball {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

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

/* Save Button in Result */
.save-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 6px 15px;
    border-radius: 6px;
    font-size: 0.85em;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

/* Saved Numbers Section */
.saved-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.saved-section h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.2em;
}

.saved-numbers-list {
    margin-bottom: 15px;
}

.saved-item {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-item-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}

.saved-item .numberCircle {
    width: 35px;
    height: 35px;
    font-size: 0.95em;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c82333;
}

.empty-message {
    color: #999;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.clear-saved, .clear-stats {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.clear-saved:hover, .clear-stats:hover {
    background: #5a6268;
}

/* Statistics Section */
.stats-section {
    background: #fff3cd;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    border-left: 4px solid #ffc107;
}

.stats-section h3 {
    color: #333;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.stats-info {
    color: #666;
    font-size: 0.85em;
    margin-bottom: 12px;
}

.stats-display {
    background: white;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.stat-item {
    display: flex;
    align-items: center;
    padding: 6px;
    margin-bottom: 4px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.stat-item:hover {
    background: #f8f9fa;
}

.stat-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    font-size: 0.95em;
}

.stat-bar {
    flex: 1;
    height: 22px;
    background: #e9ecef;
    border-radius: 11px;
    overflow: hidden;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.stat-count {
    color: white;
    font-weight: bold;
    font-size: 0.9em;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 20px;
    padding: 15px;
}

footer p {
    margin: 3px 0;
    font-size: 0.9em;
}

.disclaimer {
    font-size: 0.85em;
    opacity: 0.8;
}

/* Responsive Design */
@media only screen and (max-width: 768px) {
    body {
        padding: 10px;
    }

    .main-card {
        padding: 25px;
    }

    h1 {
        font-size: 2em;
    }

    .game-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .draw-day {
        align-self: flex-start;
    }

    .game-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .numberCircle {
        width: 45px;
        height: 45px;
        font-size: 1.1em;
    }

    .saved-item {
        flex-direction: column;
        gap: 15px;
    }

    .quick-pick-all {
        padding: 15px 30px;
        font-size: 1.1em;
    }
}

@media only screen and (max-width: 480px) {
    .numberCircle {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .saved-item .numberCircle {
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    h1 {
        font-size: 1.6em;
    }

    .game-header h2 {
        font-size: 1.2em;
    }
}
