/* Responsive Design Styles */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
    .dashboard-container,
    .admin-container {
        max-width: 1400px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .countdown-timer {
        gap: 3rem;
    }
    
    .time-unit span {
        font-size: 3rem;
    }
}

/* Desktop (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .balance-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }
    
    .dashboard-section,
    .admin-section {
        padding: 1.5rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .balance-section {
        grid-template-columns: 1fr;
    }
    
    .countdown-timer {
        gap: 1.5rem;
    }
    
    .time-unit span {
        font-size: 2rem;
    }
    
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-filters-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        margin-left: 0;
        justify-content: center;
    }
}

/* Mobile Large (576px to 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .nav-container {
        padding: 1rem;
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    .dashboard-section,
    .admin-section {
        padding: 1rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .submission-card {
        padding: 1rem;
    }
    
    .countdown-timer {
        gap: 1rem;
    }
    
    .time-unit {
        min-width: 70px;
    }
    
    .time-unit span {
        font-size: 1.75rem;
    }
    
    .time-unit label {
        font-size: 0.75rem;
    }
    
    .balance-card {
        padding: 1rem;
    }
    
    .balance-value {
        font-size: 1.125rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-filters-row {
        grid-template-columns: 1fr;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cookie-buttons {
        margin-left: 0;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
}

/* Mobile Small (up to 575px) */
@media (max-width: 575px) {
    .nav-container {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-logo {
        font-size: 1.125rem;
    }
    
    .nav-logo i {
        font-size: 1.25rem;
    }
    
    .nav-menu {
        width: 100%;
        justify-content: center;
    }
    
    .nav-btn {
        flex: 1;
        justify-content: center;
    }
    
    .dashboard-section,
    .admin-section {
        padding: 0.75rem;
    }
    
    .dashboard-container,
    .admin-container {
        gap: 1rem;
    }
    
    .countdown-card {
        padding: 1rem;
    }
    
    .countdown-card h2 {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .countdown-timer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .time-unit {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        min-width: auto;
        width: 100%;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--border-radius);
    }
    
    .time-unit span {
        font-size: 1.5rem;
    }
    
    .time-unit label {
        font-size: 0.75rem;
    }
    
    .cards-section {
        padding: 1rem;
    }
    
    .cards-section h2 {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .submission-card {
        padding: 0.75rem;
    }
    
    .submission-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .submission-card-title {
        font-size: 1rem;
    }
    
    .submission-card-value .value-amount {
        font-size: 1.25rem;
    }
    
    .submission-card-actions {
        flex-direction: column;
    }
    
    .balance-card {
        padding: 0.75rem;
    }
    
    .balance-card h3 {
        font-size: 1.125rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .balance-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.5rem 0;
    }
    
    .balance-value {
        font-size: 1rem;
    }
    
    .admin-header h1 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .admin-tab {
        padding: 0.75rem;
        font-size: 0.875rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .admin-tab:last-child {
        border-bottom: none;
    }
    
    .admin-content {
        padding: 0.75rem;
    }
    
    .admin-content h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .admin-stat-card {
        padding: 1rem;
    }
    
    .admin-stat-card-value {
        font-size: 1.5rem;
    }
    
    .admin-filters {
        padding: 1rem;
    }
    
    .admin-filters h3 {
        font-size: 1rem;
    }
    
    .admin-filters-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .admin-table-container {
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.25rem;
    }
    
    .admin-table th:not(:first-child),
    .admin-table td:not(:first-child) {
        display: none;
    }
    
    .admin-table th:first-child,
    .admin-table td:first-child {
        width: 100%;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .table-actions .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 0.5rem;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .payment-option {
        padding: 0.75rem;
    }
    
    .payment-icon {
        font-size: 1.5rem;
    }
    
    .auth-container {
        margin: 0.5rem;
        border-radius: var(--border-radius-lg);
    }
    
    .auth-form {
        padding: 1rem;
    }
    
    .auth-form h2 {
        font-size: 1.5rem;
    }
    
    .auth-tabs {
        flex-direction: column;
    }
    
    .auth-tab {
        padding: 0.75rem;
        font-size: 0.875rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .auth-tab:last-child {
        border-bottom: none;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cookie-icon {
        font-size: 1.5rem;
    }
    
    .cookie-text h3 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-buttons {
        margin-left: 0;
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .cookie-buttons .btn {
        width: 100%;
    }
    
    .notification {
        min-width: auto;
        width: calc(100vw - 2rem);
        margin: 0 1rem;
    }
    
    .notification-container {
        left: 0;
        right: 0;
        top: 0.5rem;
    }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .countdown-timer {
        flex-direction: row;
        gap: 1rem;
    }
    
    .time-unit {
        flex-direction: column;
        min-width: 60px;
    }
    
    .time-unit span {
        font-size: 1.5rem;
    }
    
    .modal-content {
        max-height: 90vh;
    }
    
    .auth-section {
        padding: 1rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .loading-logo i,
    .nav-logo i,
    .countdown-card h2 i,
    .cards-section h2 i,
    .balance-card h3 i,
    .admin-header h1 i {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .modal,
    .notification-container,
    .nav-btn {
        display: none !important;
    }
    
    .app-container {
        background: white !important;
    }
    
    .dashboard-section,
    .admin-section {
        padding: 0 !important;
    }
    
    .card,
    .balance-card,
    .submission-card,
    .admin-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    .countdown-card {
        background: white !important;
        color: black !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .loading-spinner {
        animation: none !important;
    }
    
    .loading-logo i {
        animation: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1f2937;
        --gray-50: #374151;
        --gray-100: #4b5563;
        --gray-200: #6b7280;
        --gray-300: #9ca3af;
        --gray-400: #d1d5db;
        --gray-500: #e5e7eb;
        --gray-600: #f3f4f6;
        --gray-700: #f9fafb;
        --gray-800: #ffffff;
        --gray-900: #ffffff;
    }
    
    body {
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    }
    
    .card,
    .balance-card,
    .submission-card,
    .admin-content,
    .auth-container {
        background: var(--white);
        color: var(--gray-800);
    }
    
    .navbar {
        background: var(--white);
        border-bottom: 1px solid var(--gray-200);
    }
}
