/* Powerball Analytics - Main Styles */

/* CSS Variables */
:root {
    --primary-color: #1a237e;
    --secondary-color: #ffd54f;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #2196f3;
    --light-bg: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #dddddd;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Navigation ──────────────────────────────────────────── */
.navbar {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* nav logo: white */
.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--white);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* nav links: white */
.nav-menu a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.15);
    color: var(--white);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    margin: 3px 0;
    transition: var(--transition);
}

/* ─── Hero Section ────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3949ab 100%);
    color: var(--white);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--white);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    color: var(--white);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.stat {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.stat h3 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero buttons: white text on transparent/white border */
.hero-actions .btn-primary {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 2px solid var(--white);
}

.hero-actions .btn-primary:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.hero-actions .btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.hero-actions .btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* ─── Sections ────────────────────────────────────────────── */
.section {
    padding: 80px 0;
}

.bg-light {
    background: var(--light-bg);
}

/* Section headings: white */
.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--white);
    background: var(--primary-color);
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    display: inline-block;
    left: 50%;
    position: relative;
    transform: translateX(-50%);
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-outline,
.btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

/* All primary buttons: white text */
.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #3949ab;
    transform: translateY(-2px);
    color: var(--white);
}

/* Secondary buttons: white text on primary bg */
.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: #3949ab;
    color: var(--white);
    transform: translateY(-2px);
}

/* Outline button: white text */
.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #d32f2f;
    color: var(--white);
}

/* ─── Latest Results Section ──────────────────────────────── */
.results-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* "Refresh Results" button: white text */
#refresh-results {
    color: var(--white);
}

.results-info {
    font-size: 0.9rem;
    color: var(--text-light);
}

.results-display {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.results-table tr:hover {
    background: var(--light-bg);
}

.white-balls {
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.powerball-number {
    color: var(--danger-color);
    font-weight: bold;
    font-size: 1.1rem;
}

.power-play-multiplier {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
}

/* ─── Ways to Win Section ─────────────────────────────────── */
.ways-to-win-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.prize-chart-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.prize-chart {
    width: 100%;
    border-collapse: collapse;
}

.prize-chart th,
.prize-chart td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.prize-chart th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.best-strategies {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.strategy-grid {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.strategy-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.strategy-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.strategy-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* "Generate New Strategies" button: white text */
#regenerate-strategies,
#analyze-strategies {
    color: var(--white);
}

/* ─── Number Checker Section ──────────────────────────────── */
.number-checker-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.number-input-section,
.analysis-results-section {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.number-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* "White Balls (1-69):" and "Powerball (1-26):" labels: white on dark pill */
.white-balls-section label,
.powerball-section label {
    display: inline-block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-color);
    padding: 0.35rem 1rem;
    border-radius: 20px;
}

.white-balls-inputs {
    display: flex;
    gap: 0.5rem;
}

.white-ball-input {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.white-ball-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

#powerball-input {
    width: 80px;
    height: 60px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    border: 2px solid var(--danger-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

#powerball-input:focus {
    outline: none;
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

/* "Clear" button: white text */
#clear-numbers {
    background: var(--primary-color);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

#clear-numbers:hover {
    background: #3949ab;
    color: var(--white);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.analysis-display {
    min-height: 200px;
}

.no-analysis {
    text-align: center;
    color: var(--text-light);
    padding: 3rem 1rem;
}

/* ─── Data Entry Section ──────────────────────────────────── */
.data-entry-tabs {
    display: flex;
    margin-bottom: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    background: var(--light-bg);
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-button.active {
    background: var(--primary-color);
    color: var(--white);
}

.tab-button:hover:not(.active) {
    background: var(--border-color);
}

.tab-content {
    display: none;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-content.active {
    display: block;
}

.data-entry-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: end;
}

.form-group {
    flex: 1;
}

/* Form labels: white on dark pill */
.form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

.white-balls-group .white-balls-inputs {
    display: flex;
    gap: 0.5rem;
}

.data-white-ball {
    width: 70px !important;
    text-align: center;
    font-weight: bold;
}

/* ─── Analytics Section ───────────────────────────────────── */
.analytics-dashboard {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
}

.analytics-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.analytics-card {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border-top: 4px solid var(--primary-color);
}

.analytics-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.chart-container {
    position: relative;
    height: 300px;
}

/* ─── Loading and Notifications ───────────────────────────── */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-spinner-large {
    text-align: center;
    color: var(--white);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid var(--white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.notification-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9998;
}

.notification {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--info-color);
    animation: slideIn 0.3s ease;
    max-width: 400px;
}

.notification.success {
    border-left-color: var(--success-color);
}

.notification.error {
    border-left-color: var(--danger-color);
}

.notification.warning {
    border-left-color: var(--warning-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ─── Footer ──────────────────────────────────────────────── */
footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* ─── Utility Classes ─────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }
.hidden      { display: none !important; }
.visible     { display: block !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
