/* Red-Black lightly tinted theme */
:root {
    --primary-color: #ef4444; /* Red 500 */
    --primary-hover: #dc2626; /* Red 600 */
    --bg-color: #111827; /* Fallback dark */
    --text-color: #1f2937; /* Dark text for cards */
    --card-bg: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(254, 226, 226, 0.95)); /* Light red/rose tint instead of plain white */
    --secondary-color: #4b5563; /* Gray */
    --secondary-hover: #374151;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    /* For Vercel: Using absolute path starting with / guarantees it finds the static folder */
    background-image: linear-gradient(135deg, rgba(153, 27, 27, 0.8), rgba(0, 0, 0, 0.9)), url('/static/bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.card {
    background: var(--card-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

.login-card {
    max-width: 420px;
    margin: 10vh auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(220, 38, 38, 0.15);
    padding-bottom: 15px;
}

.text-center {
    text-align: center;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #450a0a;
    font-size: 0.95rem;
}

input, select, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #fffafb;
    color: #450a0a;
    transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

button, .btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), #991b1b);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    margin-bottom: 15px;
    box-shadow: 0 4px 6px -1px rgba(153, 27, 27, 0.2);
    transition: all 0.2s ease;
}

button.auto-width, .btn.auto-width {
    width: auto;
    margin-bottom: 0;
}

button:hover, .btn:hover {
    background: linear-gradient(135deg, var(--primary-hover), #7f1d1d);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px -1px rgba(153, 27, 27, 0.3);
}

button:active, .btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), #1f2937);
    box-shadow: 0 4px 6px -1px rgba(31, 41, 55, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--secondary-hover), #111827);
    box-shadow: 0 6px 8px -1px rgba(31, 41, 55, 0.3);
}

.stats-grid, .sports-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 30px;
}

.stat-item {
    flex: 1;
    min-width: 180px;
    text-align: center;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.9), rgba(255, 255, 255, 0.9));
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.stat-item h2 {
    color: #b91c1c;
    font-size: 2.2rem;
    margin-bottom: 5px;
    font-weight: 700;
}

.stat-item p {
    color: #7f1d1d;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sport-card {
    flex: 1;
    min-width: 250px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(254, 242, 242, 0.95), rgba(255, 255, 255, 0.95));
}

.sport-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 15px 30px -5px rgba(153, 27, 27, 0.15);
}

.sport-card h3 {
    margin: 15px 0 10px;
    color: #450a0a;
    font-weight: 700;
}

.sport-card p {
    color: #7f1d1d;
    margin-bottom: 20px;
    font-size: 0.95rem;
    padding: 0 10px;
}

.sport-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.booking-layout {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.booking-form {
    flex: 2;
    min-width: 320px;
}

.booking-sidebar {
    flex: 1;
    min-width: 280px;
    background: linear-gradient(135deg, rgba(255, 241, 242, 0.95), rgba(254, 242, 242, 0.95));
    border: 1px solid rgba(239, 68, 68, 0.1);
}

.time-slot {
    padding: 12px 15px;
    border: 2px solid #fca5a5;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 8px;
    background-color: #fffafb;
    font-weight: 600;
    color: #7f1d1d;
    text-align: center;
    transition: all 0.2s ease;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background-color: #fef2f2;
    color: var(--primary-color);
}

.time-slot.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.2);
}

.time-slot.booked {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

.time-slot.booked:hover {
    border-color: #e5e7eb;
    background-color: #f3f4f6;
    color: #9ca3af;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px dashed #fca5a5;
    padding-bottom: 10px;
    font-size: 0.95rem;
}

.info-item {
    margin-top: 15px;
    padding: 15px 20px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    font-weight: 500;
}

.row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #450a0a;
    font-weight: 700;
}

.text-success {
    color: #16a34a;
}

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    padding: 20px;
    z-index: 1000;
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: linear-gradient(135deg, #fffafb, #fef2f2);
    width: 100%;
    max-width: 600px;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(220, 38, 38, 0.15);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.btn-close {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    font-size: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    color: #991b1b;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
    box-shadow: none;
}

.btn-close:hover {
    color: #450a0a;
    background: rgba(239, 68, 68, 0.25);
    transform: none;
    box-shadow: none;
}
