/* Estilos Generales */
* {
    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%);
    color: #333;
    min-height: 100vh;
}

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

/* Panel de Administración */
.admin-panel {
    min-height: 100vh;
    background: #f5f5f5;
}

.admin-panel.hidden {
    display: none;
}

.admin-container {
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    color: #7e22ce;
    font-size: 24px;
}

.admin-header h1 i {
    margin-right: 10px;
}

.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background: #dc2626;
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    max-width: 400px;
    margin: 100px auto;
}

.login-form h2 {
    color: #7e22ce;
    margin-bottom: 30px;
    text-align: center;
}

.login-form input {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #7e22ce;
}

.error-message {
    color: #ef4444;
    margin-top: 10px;
    text-align: center;
    min-height: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    color: white;
}

.stat-card h3 {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-card p {
    font-size: 32px;
    font-weight: bold;
}

.section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.section h2 {
    color: #7e22ce;
    margin-bottom: 20px;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.admin-card {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.admin-card:hover {
    transform: scale(1.05);
}

.admin-card.available {
    background: #dbeafe;
    color: #1e40af;
    border: 2px solid #93c5fd;
}

.admin-card.reserved {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fbbf24;
}

.admin-card.sold {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #86efac;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

tr:hover {
    background: #f9fafb;
}

.btn-primary, .btn-secondary, .btn-success, .btn-reserve {
    background: #7e22ce;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #6b21a8;
}

.btn-secondary {
    background: #f59e0b;
}

.btn-secondary:hover {
    background: #d97706;
}

.btn-success {
    background: #10b981;
}

.btn-success:hover {
    background: #059669;
}

.btn-reserve {
    background: #ef4444;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-reserve:hover {
    background: #dc2626;
}

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

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-item label {
    font-weight: 500;
    color: #374151;
}

.config-item input,
.config-item select,
.config-item textarea {
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.config-item textarea {
    min-height: 100px;
    resize: vertical;
}

/* Vista Cliente */
#clientView {
    display: block;
}

.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    color: #7e22ce;
}

.logo h1 {
    font-weight: 700;
}

.logo span {
    color: #f59e0b;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #7e22ce;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1517230878791-4d28214057c2?auto=format&fit=crop&w=1200');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.stat i {
    font-size: 32px;
    color: #f59e0b;
}

.stat h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat p {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.next-bingo {
    background: white;
    padding: 60px 0;
    text-align: center;
}

.next-bingo h2 {
    color: #7e22ce;
    font-size: 32px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.countdown-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    min-width: 100px;
}

.countdown-item span {
    font-size: 48px;
    font-weight: bold;
    color: #7e22ce;
    display: block;
    margin-bottom: 5px;
}

.countdown-item p {
    color: #6b7280;
    font-size: 14px;
}

.bingo-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    color: #4b5563;
}

.bingo-info p {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bingo-info span {
    color: #7e22ce;
    font-weight: bold;
}

.cards-section {
    background: #f8fafc;
    padding: 60px 0;
}

.cards-section h2 {
    color: #7e22ce;
    font-size: 32px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.client-card {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.client-card:not(.sold):not(.reserved):hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.client-card.available {
    background: white;
    color: #7e22ce;
    border: 2px solid #7e22ce;
}

.client-card.selected {
    background: #7e22ce;
    color: white;
    border-color: #6b21a8;
}

.client-card.reserved {
    background: #fef3c7;
    color: #92400e;
    border: 2px solid #fbbf24;
    cursor: not-allowed;
}

.client-card.sold {
    background: #dcfce7;
    color: #166534;
    border: 2px solid #86efac;
    cursor: not-allowed;
}

.card-number {
    font-size: 24px;
    font-weight: bold;
}

.card-status {
    font-size: 10px;
    margin-top: 5px;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}

.selection-summary {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.selection-summary h3 {
    color: #7e22ce;
    margin-bottom: 20px;
}

.selected-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    min-height: 50px;
}

.selected-card-chip {
    background: #7e22ce;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.remove-card {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 12px;
    padding: 0 5px;
}

.total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 2px solid #e5e7eb;
}

.total h3 {
    color: #10b981;
    font-size: 32px;
}

.payment-info {
    background: white;
    padding: 60px 0;
}

.payment-info h2 {
    color: #7e22ce;
    font-size: 32px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.method {
    background: #f8fafc;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #e5e7eb;
}

.method i {
    font-size: 40px;
    color: #7e22ce;
    margin-bottom: 20px;
}

.method h3 {
    color: #374151;
    margin-bottom: 15px;
}

.method-details p {
    margin: 10px 0;
    color: #6b7280;
}

.btn-copy {
    background: #7e22ce;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.instructions {
    background: #f0f9ff;
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid #7e22ce;
}

.instructions h3 {
    color: #7e22ce;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin: 10px 0;
    color: #4b5563;
}

.my-reservations {
    background: #f8fafc;
    padding: 60px 0;
}

.my-reservations h2 {
    color: #7e22ce;
    font-size: 32px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-reservation {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto 40px;
}

.search-reservation input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
}

.reservations-list {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.reservation-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.reservation-item:last-child {
    border-bottom: none;
}

.reservation-info h4 {
    color: #7e22ce;
    margin-bottom: 5px;
}

.reservation-status {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background: #dcfce7;
    color: #166534;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.main-footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    color: #f59e0b;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer-section p {
    margin: 10px 0;
    color: #d1d5db;
}

.footer-section a {
    display: block;
    color: #d1d5db;
    text-decoration: none;
    margin: 8px 0;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #f59e0b;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    background: #374151;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.social-links a:hover {
    background: #7e22ce;
    color: white;
}

.admin-access {
    background: transparent;
    color: #f59e0b;
    border: 2px solid #f59e0b;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.admin-access:hover {
    background: #f59e0b;
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: #9ca3af;
    font-size: 14px;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #7e22ce;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 5px;
}

.close-btn:hover {
    color: #ef4444;
}

.modal-body {
    padding: 30px;
}

.timer-warning {
    background: #fef3c7;
    border: 2px solid #fbbf24;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
}

.timer-warning i {
    font-size: 20px;
}

#paymentTimer {
    font-weight: bold;
    color: #ef4444;
    font-size: 18px;
}

.reservation-summary {
    background: #f8fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.reservation-summary h3 {
    color: #374151;
    margin-bottom: 15px;
}

.summary-details p {
    margin: 10px 0;
    color: #6b7280;
}

.summary-details strong {
    color: #10b981;
    font-size: 24px;
}

.payment-form .form-group {
    margin-bottom: 20px;
}

.payment-form label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.payment-form input:focus {
    outline: none;
    border-color: #7e22ce;
}

.file-upload {
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload:hover {
    border-color: #7e22ce;
}

.file-upload input[type="file"] {
    display: none;
}

.upload-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    cursor: pointer;
}

.upload-btn i {
    font-size: 40px;
    color: #7e22ce;
}

.file-name {
    margin-top: 10px;
    color: #10b981;
    font-size: 14px;
}

.modal.success {
    max-width: 400px;
    text-align: center;
}

.success-icon {
    font-size: 60px;
    color: #10b981;
    margin-bottom: 20px;
}

.success h2 {
    color: #10b981;
    margin-bottom: 15px;
}

.success p {
    color: #6b7280;
    margin: 10px 0;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .countdown {
        flex-wrap: wrap;
    }
    
    .countdown-item {
        min-width: 80px;
        padding: 15px;
    }
    
    .countdown-item span {
        font-size: 36px;
    }
    
    .bingo-info {
        flex-direction: column;
        gap: 15px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .modal-content {
        margin: 10px;
        padding: 15px;
    }
    
    .search-reservation {
        flex-direction: column;
    }
}
