/* Responsive Design for Powerball Analytics */

/* Tablet Styles */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .ways-to-win-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .number-checker-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .analytics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 200px;
    }
    
    /* Sections */
    .section {
        padding: 60px 0;
    }
    
    .section h2 {
        font-size: 2rem;
    }
    
    /* Results */
    .results-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .results-table {
        font-size: 0.9rem;
    }
    
    .results-table th,
    .results-table td {
        padding: 0.5rem;
    }
    
    /* Prize Chart */
    .prize-chart {
        font-size: 0.8rem;
    }
    
    .prize-chart th,
    .prize-chart td {
        padding: 0.5rem 0.3rem;
    }
    
    /* Number Checker */
    .white-balls-inputs {
        justify-content: space-between;
    }
    
    .white-ball-input {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    #powerball-input {
        width: 70px;
        height: 50px;
        font-size: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    /* Data Entry */
    .data-entry-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        padding: 0.8rem 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .white-balls-inputs .data-white-ball {
        width: 60px !important;
    }
    
    /* Analytics */
    .analytics-controls {
        flex-direction: column;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Notifications */
    .notification-container {
        left: 10px;
        right: 10px;
        top: 80px;
    }
    
    .notification {
        max-width: none;
    }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.8rem;
    }
    
    .white-balls-inputs {
        flex-wrap: wrap;
        gap: 0.3rem;
    }
    
    .white-ball-input {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    #powerball-input {
        width: 60px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .data-white-ball {
        width: 50px !important;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline,
    .btn-danger {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .prize-chart {
        font-size: 0.7rem;
    }
    
    .analytics-card {
        padding: 1rem;
    }
    
    .chart-container {
        height: 200px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
    }
    
    .section {
        padding: 40px 0;
    }
    
    .nav-menu {
        top: 60px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-attachment: fixed;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-actions,
    .form-actions,
    .analytics-controls,
    .data-entry-tabs,
    .notification-container,
    .loading-overlay {
        display: none !important;
    }
    
    .hero {
        background: var(--white) !important;
        color: var(--text-dark) !important;
        padding: 2rem 0;
    }
    
    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .analytics-card,
    .strategy-card {
        page-break-inside: avoid;
        border: 1px solid var(--border-color);
    }
    
    .results-table,
    .prize-chart {
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-bg: #2d2d2d;
        --text-dark: #ffffff;
        --text-light: #cccccc;
        --border-color: #404040;
    }
    
    .hero {
        background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%);
    }
    
    .results-table th {
        background: #0d47a1;
    }
    
    .prize-chart th {
        background: #0d47a1;
    }
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid var(--info-color);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #ffff00;
        --border-color: #000000;
    }
    
    .btn-primary {
        border: 2px solid var(--white);
    }
    
    .btn-secondary {
        border: 2px solid var(--primary-color);
    }
}