/* Additional responsive enhancements for EventPrizes */

/* Mobile-first responsive breakpoints */
@media (max-width: 640px) {
    /* Navigation adjustments */
    .nav-menu {
        flex-direction: column;
        space-y: 2;
    }
    
    /* Hero section mobile optimization */
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Card grid responsive stacking */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Game wheel mobile optimization */
    .wheel-container {
        width: 280px !important;
        height: 280px !important;
    }
    
    .wheel-text {
        font-size: 10px;
        left: 55%;
    }
    
    /* Dashboard mobile optimization */
    .dashboard-tabs {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .dashboard-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Stats cards mobile */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    /* Table responsive scrolling */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .table-container table {
        min-width: 600px;
    }
    
    /* Modal mobile optimization */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    /* Prize configuration mobile */
    .prize-config-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Form elements mobile */
    .form-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-button-group {
        flex-direction: column;
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    /* Tablet optimizations */
    .container-padding {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Chart containers mobile */
    .chart-container {
        height: 250px !important;
    }
    
    /* Dashboard sidebar collapse */
    .dashboard-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .dashboard-sidebar.open {
        transform: translateX(0);
    }
    
    /* QR Code modal mobile */
    .qr-code-display {
        width: 200px;
        height: 200px;
    }
}

/* Landscape phone optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .wheel-container {
        width: 250px !important;
        height: 250px !important;
    }
    
    .hero-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .modal-content {
        max-height: 90vh;
    }
}

/* Large screen optimizations */
@media (min-width: 1280px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .wheel-container {
        width: 400px;
        height: 400px;
    }
    
    .dashboard-layout {
        max-width: 1400px;
    }
}

/* High DPI displays */
@media (min-resolution: 2dppx) {
    .wheel-pointer {
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
    }
    
    .icon-crisp {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    .wheel {
        transition: none;
    }
    
    .card-hover {
        transition: none;
    }
    
    .confetti {
        animation: none;
    }
    
    .prize-glow {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wheel-segment {
        border-width: 2px;
        border-color: #000;
    }
    
    .text-gray-500 {
        color: #333;
    }
    
    .bg-gray-50 {
        background-color: #f9f9f9;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .bg-gray-50 {
        background-color: #1f2937;
    }
    
    .bg-white {
        background-color: #374151;
    }
    
    .text-gray-900 {
        color: #f9fafb;
    }
    
    .text-gray-600 {
        color: #d1d5db;
    }
    
    .border-gray-200 {
        border-color: #4b5563;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .spin-button {
        min-height: 48px;
        min-width: 200px;
    }
    
    .card-hover:hover {
        transform: none;
    }
    
    .button-touch {
        padding: 0.875rem 1.5rem;
        font-size: 1.125rem;
    }
    
    /* Larger tap targets */
    .tab-button {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .table-action-button {
        min-width: 40px;
        min-height: 40px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-friendly {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Focus states for accessibility */
.focus-visible:focus {
    outline: 2px solid #7c3aed;
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background-color: #7c3aed;
    color: white;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}