/* Font Face Declarations */
@font-face {
    font-family: 'League Spartan';
    src: url('./fonts/LeagueSpartan-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'League Spartan';
    src: url('./fonts/LeagueSpartan-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

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

body {
    font-family: 'League Spartan', 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: 'League Spartan', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

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

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.2em;
    font-weight: 700;
    font-family: 'League Spartan', 'Inter', sans-serif;
    color: white;
}

.nav-logo .logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

.nav-logo .brand-text {
    color: white;
    font-weight: 700;
    font-family: 'League Spartan', 'Inter', sans-serif;
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ffd700;
}

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

.bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    font-family: 'League Spartan', 'Inter', sans-serif;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'League Spartan', 'Inter', sans-serif;
    color: #ffd700;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cta-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #333;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'League Spartan', 'Inter', sans-serif;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

/* Booking Section */
.booking-section {
    padding: 20px 0;
    background: white;
    margin-bottom: 1rem;
}

.section-heading {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-heading::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
}

/* Visitor Counter */
.visitor-counter {
    text-align: center;
    margin-bottom: 30px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    color: white;
}

/* Credits UI - Navbar and Modal */
.credit-balance {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #eee;
}
.credit-balance:hover {
    background: rgba(245, 158, 11, 0.06);
    border-radius: 12px;
}

.credits-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 9999px;
    padding: 4px 10px;
    font-weight: 600;
}
.credits-badge i { color: #f59e0b; }
.credits-badge.blue {
    background: rgba(37, 99, 235, 0.12);
    color: #1e40af;
    border-color: rgba(37, 99, 235, 0.35);
}
.credits-badge.blue i { color: #2563eb; }

.credits-buy-btn {
    margin-left: auto;
    background: #f59e0b;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.credits-buy-btn:hover { filter: brightness(1.05); transform: translateY(-1px); }
.credits-buy-btn.blue { background: #2563eb; }
.credits-buy-btn:disabled { opacity: 0.6; cursor: not-allowed; filter: none; transform: none; }

.credit-info { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }

.amount-row { border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }
.credits-needed-row { color: #b45309; font-weight: 600; }
.credits-needed-row .label { opacity: 0.9; margin-right: 6px; }
.credits-needed-row .value { color: #b45309; }

.credits-overview { margin-top: 8px; }
.credits-row { display: flex; align-items: center; gap: 12px; }
.credits-status { font-weight: 600; color: #374151; }

.credits-progress { flex: 1; }
.credits-progress-bar { height: 8px; background: #f3f4f6; border-radius: 9999px; overflow: hidden; }
.credits-progress-fill { height: 8px; background: linear-gradient(90deg, #f59e0b, #ffcd3c); width: 0%; transition: width 0.25s ease; }
.credits-progress-label { font-size: 0.85rem; color: #6b7280; margin-top: 4px; }

/* Generic disabled button state helper */
.insufficient { opacity: 0.8; }

.visitor-info {
    font-size: 1.1em;
    font-weight: 600;
}

.visitor-info i {
    margin-right: 8px;
    color: #ffd700;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'League Spartan', 'Inter', sans-serif;
    margin-bottom: 1rem;
    color: #333;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

/* Date Selector */
.date-selector {
    text-align: center;
    margin-bottom: 3rem;
}

.date-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.date-selector label {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.calendar-toggle {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-toggle:hover {
    background: #e2e8f0;
    color: #475569;
}

.calendar-toggle.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Week View */
.week-view {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.week-nav-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #64748b;
}

.week-nav-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.week-range {
    font-weight: 600;
    color: #1e293b;
    font-size: 1rem;
}

.week-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.day-card:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}

.day-card.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(102, 126, 234, 0.6);
}

.day-card.disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
    border-color: #f1f5f9;
}

.day-card.disabled:hover {
    transform: none;
    background: #f1f5f9;
}

.day-name {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    opacity: 0.8;
}

.day-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.day-card.today {
    border-color: #fbbf24;
    background: #fef3c7;
}

.day-card.today .day-number {
    color: #d97706;
}

.day-card.today.selected {
    background: #667eea;
    border-color: #667eea;
}

.day-card.today.selected .day-number {
    color: white;
}

/* Calendar View */
.calendar-view {
    text-align: center;
}

.date-input {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.date-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Responsive Design */
@media (max-width: 768px) {
    .date-selector-header {
        flex-direction: column;
        text-align: center;
    }
    
    .week-days {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    
    .day-card {
        padding: 12px 4px;
        min-height: 70px;
    }
    
    .day-name {
        font-size: 0.65rem;
    }
    
    .day-number {
        font-size: 1rem;
    }
    
    .week-range {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .week-days {
        gap: 2px;
    }
    
    .day-card {
        padding: 8px 2px;
        min-height: 60px;
    }
    
    .day-name {
        font-size: 0.6rem;
    }
    
    .day-number {
        font-size: 0.9rem;
    }
}

/* Court Grid */
.court-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.court-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.court-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.court-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.court-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.court-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.court-status.available {
    background: #d4edda;
    color: #155724;
}

.court-status.booked {
    background: #f8d7da;
    color: #721c24;
}

.available-slots {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 500;
}

.court-card.selected .available-slots {
    color: rgba(255, 255, 255, 0.9);
}

/* Time Slots */
.time-slots-container {
    margin-bottom: 1.5rem;
}

.time-slots-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.time-slots-container h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.5rem;
}

.time-format-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #3498db;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    min-width: 60px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.time-slot {
    padding: 12px 8px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    font-weight: 500;
}

.time-slot:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.time-slot.selected {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Real-time activity badges */
.viewer-badge, .selector-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #28a745;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    white-space: nowrap;
}

.selector-badge {
    background-color: #ffc107;
    color: #212529;
    top: -8px;
    right: 25px;
}

.time-slot {
    position: relative;
}

.time-slot.booked {
    background: #dc3545;
    color: white;
    cursor: not-allowed;
    opacity: 0.9;
    font-weight: 600;
}

.time-slot.booked:hover {
    border-color: #c82333;
    background: #dc3545;
}

.time-slot.reserved {
    background-color: #f39c12;
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.time-slot.reserved::after {
    content: '⏰';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

.time-slot.being-selected {
    background: linear-gradient(45deg, #e67e22, #f39c12);
    color: white;
    cursor: pointer;
    position: relative;
    animation: pulse-selection 1.5s infinite;
    border: 2px solid #d35400;
}

.time-slot.being-selected::after {
    content: '👆';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

.time-slot.past {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

.time-slot.past:hover {
    border-color: #e2e8f0;
    background: #f8f9fa;
    animation: bounce 1s infinite;
}

@keyframes pulse-selection {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1px); }
}

/* Viewer Badge */
.viewer-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #3498db;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Booking Summary */
.booking-summary {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.booking-summary h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.summary-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.book-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'League Spartan', 'Inter', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.book-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.booking-details-modal {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.booking-details-modal h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.pay-button {
    background: linear-gradient(45deg, #00d4aa, #00b894);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'League Spartan', 'Inter', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

/* Loading Modal */
.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Success Modal */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.booking-reference {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
}

.close-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #5a67d8;
}

/* Footer */
.footer {
    background: #2d3748;
    color: 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 h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-section i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #cbd5e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(102, 126, 234, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .court-grid {
        grid-template-columns: 1fr;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

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

/* Custom Scrollbar */
.time-slots-grid::-webkit-scrollbar {
    width: 8px;
}

.time-slots-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.user-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 8px;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 180ms ease;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
    background-color: #f1f1f1;
}

.user-dropdown:hover .dropdown-content,
.user-dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Selected Slots Counter Styles */
.selected-slots {
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
    margin-top: 5px;
    padding: 2px 8px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.selected-slots.has-selection {
    background: rgba(0, 123, 255, 0.2);
    color: #0056b3;
}

/* Discount Section Styles */
.discount-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.discount-input-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.discount-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.apply-discount-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.apply-discount-btn:hover {
    background: #0056b3;
}

.apply-discount-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.discount-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.discount-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.discount-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Price Breakdown Styles */
#priceBreakdown p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#discountRow {
    font-weight: bold;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        left: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .user-dropdown .dropdown-content {
        position: relative;
        display: block;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        pointer-events: auto;
    }
    
    .discount-input-group {
        flex-direction: column;
    }
    
    .apply-discount-btn {
        width: 100%;
    }
}
.time-slot.credit-locked {
    background: #f8fafc;
    color: #94a3b8;
    cursor: not-allowed;
    opacity: 0.6;
}
.time-slot.credit-locked:hover {
    border-color: #e2e8f0;
    background: #f8fafc;
}
.time-slot {
    position: relative;
}

.time-slot.booked {
    background: #dc3545;
    color: white;
    cursor: not-allowed;
    opacity: 0.9;
    font-weight: 600;
}

.time-slot.booked:hover {
    border-color: #c82333;
    background: #dc3545;
}

.time-slot.reserved {
    background-color: #f39c12;
    color: white;
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.time-slot.reserved::after {
    content: '⏰';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

.time-slot.being-selected {
    background: linear-gradient(45deg, #e67e22, #f39c12);
    color: white;
    cursor: pointer;
    position: relative;
    animation: pulse-selection 1.5s infinite;
    border: 2px solid #d35400;
}

.time-slot.being-selected::after {
    content: '👆';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
}

.time-slot.past {
    background: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: line-through;
}

.time-slot.past:hover {
    border-color: #e2e8f0;
    background: #f8f9fa;
    animation: bounce 1s infinite;
}

@keyframes pulse-selection {
    0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-3px); }
    60% { transform: translateY(-1px); }
}

/* Viewer Badge */
.viewer-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #3498db;
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Booking Summary */
.booking-summary {
    background: white;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.booking-summary h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.summary-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.book-button {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'League Spartan', 'Inter', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.book-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 40px);
    position: relative;
    animation: modalSlideIn 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

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

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.booking-details-modal {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.booking-details-modal h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.pay-button {
    background: linear-gradient(45deg, #00d4aa, #00b894);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'League Spartan', 'Inter', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pay-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

/* Loading Modal */
.loading-content {
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Success Modal */
.success-content {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.booking-reference {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
}

.close-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #5a67d8;
}

/* Footer */
.footer {
    background: #2d3748;
    color: 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 h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #ffd700;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-section i {
    margin-right: 0.5rem;
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #cbd5e0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(102, 126, 234, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(10px);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .court-grid {
        grid-template-columns: 1fr;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .time-slots-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

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

/* Custom Scrollbar */
.time-slots-grid::-webkit-scrollbar {
    width: 8px;
}

.time-slots-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}

/* User Dropdown Styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.user-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    position: absolute;
    right: 0;
    background-color: white;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    margin-top: 8px;
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 180ms ease;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s ease, color 0.2s ease;
    border-radius: 8px;
    margin: 2px 8px;
}

.dropdown-content a:hover,
.dropdown-content a:focus {
    background-color: #f1f1f1;
}

.user-dropdown:hover .dropdown-content,
.user-dropdown.open .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Selected Slots Counter Styles */
.selected-slots {
    font-size: 12px;
    color: #007bff;
    font-weight: bold;
    margin-top: 5px;
    padding: 2px 8px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 12px;
    text-align: center;
}

.selected-slots.has-selection {
    background: rgba(0, 123, 255, 0.2);
    color: #0056b3;
}

/* Discount Section Styles */
.discount-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 20px;
}

.discount-input-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.discount-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.apply-discount-btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.apply-discount-btn:hover {
    background: #0056b3;
}

.apply-discount-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.discount-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.discount-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.discount-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Price Breakdown Styles */
#priceBreakdown p {
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#discountRow {
    font-weight: bold;
}

/* Mobile Responsive Updates */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        left: -100%;
        top: 70px;
        width: 100%;
        height: calc(100vh - 70px);
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 15px 0;
    }
    
    .user-dropdown .dropdown-content {
        position: relative;
        display: block;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        margin-top: 0;
    }
    
    .discount-input-group {
        flex-direction: column;
    }
    
    .apply-discount-btn {
        width: 100%;
    }
}