/* Rally Custom Styles */

/* Sport-themed colors and styling */
:root {
    --electric-blue: #2563EB;
    --vibrant-green: #16A34A;
    --electric-blue-contrast: #1D4ED8;
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-600: #475569;
    --slate-400: #94A3B8;
    --soft-gray: #F3F4F6;
    --surface: #FFFFFF;
    --card-border: #E2E8F0;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    --sidebar-bg: #ffffff;
    --sidebar-width: 400px;

    /* Legacy mapping */
    --tennis-green: var(--vibrant-green);
    --tennis-green-light: #22c55e;
    --tennis-green-dark: #15803d;
    --tennis-court: #14532d;
    --tennis-ball: #ccff33;
    --basketball-orange: #F97316;
    --football-blue: #2563EB;
    --badminton-purple: #7C3AED;

    --court-line: #ffffff;
    --primary-sport-color: var(--vibrant-green);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--slate-800);
    background: #ffffff;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--slate-900);
    font-weight: 700;
}

a {
    color: var(--electric-blue);
    text-decoration: none;
}

a:hover {
    color: var(--electric-blue-contrast);
    text-decoration: none;
}

.brand-name {
    color: var(--slate-900);
}

.btn-tennis-green {
    background-color: var(--vibrant-green);
    border-color: var(--vibrant-green);
    color: white;
}

.btn-tennis-green:hover {
    background-color: var(--tennis-green-dark);
    border-color: var(--tennis-green-dark);
    color: white;
}

.btn-outline-tennis-green {
    border-color: var(--vibrant-green);
    color: var(--vibrant-green);
}

.btn-outline-tennis-green:hover {
    background-color: var(--vibrant-green);
    border-color: var(--vibrant-green);
    color: white;
}

.btn-electric {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.btn-electric:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.btn-outline-electric {
    color: var(--electric-blue);
    border-color: var(--electric-blue);
    background: transparent;
}

.btn-outline-electric:hover, .btn-outline-electric.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--electric-blue);
    border-color: var(--electric-blue);
}

.btn-hero-light {
    background: #ffffff;
    color: var(--electric-blue);
    border-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.btn-hero-light:hover {
    background: #f8fafc;
    color: var(--electric-blue);
    border-color: #f1f5f9;
}

.eyebrow {
    letter-spacing: 0.12em;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--slate-600);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--slate-900);
}

.bg-surface {
    background: var(--soft-gray);
}

.text-electric {
    color: var(--electric-blue);
}

.hero-wrap {
    background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.18), transparent 35%), radial-gradient(circle at 80% 30%, rgba(22, 163, 74, 0.18), transparent 28%), #0f172a;
    color: #fff;
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

.hero-tall {
    padding: 110px 0 90px;
    background-image:
        linear-gradient(120deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.2)),
        url('/static/hero_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.35) 0%, rgba(37, 99, 235, 0.18) 50%, rgba(22, 163, 74, 0.18) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 12px;
    color: #fff;
}

.hero-subtitle {
    font-size: 1.125rem;
    max-width: 900px;
    color: #f8fafc;
    white-space: nowrap;
}

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 18px;
    color: #fff;
    backdrop-filter: blur(10px);
}

.mini-ticket {
    background: rgba(255,255,255,0.1);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px dashed rgba(255,255,255,0.2);
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: var(--vibrant-green);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5);
    animation: pulse 2s infinite;
}

.cta-row .btn {
    min-width: 170px;
}

.hero-meta .meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    font-size: 0.9rem;
}

.activity-selector {
    background: #fff;
    padding: 8px 0;
    position: sticky;
    top: 56px; /* sits directly under the navbar */
    z-index: 9;
    margin-top: 0;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
}

.selector-grid {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.activity-pill {
    padding: 10px 14px;
    border: 1px solid var(--card-border);
    border-radius: 999px;
    color: var(--slate-800);
    background: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}

.activity-pill .icon {
    font-size: 1rem;
}

.activity-pill:hover {
    border-color: var(--electric-blue);
    color: var(--electric-blue);
}

.activity-pill.active {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--electric-blue);
    color: var(--electric-blue);
}

.section-padded {
    padding: 24px 0;
}

.event-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 320px;
}

.event-thumb {
    height: 140px;
    background-size: cover;
    background-position: center;
}

.event-thumb.tennis { background-image: url('https://images.unsplash.com/photo-1505666287802-931dc83948e0?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.basketball { background-image: url('https://images.unsplash.com/photo-1519861531473-9200262188bf?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.football { background-image: url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.badminton { background-image: url('https://images.unsplash.com/photo-1504274066651-8d31a536b11a?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.multi { background-image: url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=900&q=80'); }

.event-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.event-body .btn {
    margin-top: auto;
}

.empty-card {
    border: 1px solid var(--card-border);
    background: #fff;
}

.empty-hero {
    width: 160px;
    height: auto;
    margin: 0 auto;
}

.horizontal-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 10px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 999px;
}

.sub-filter-bar {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid var(--card-border);
}

.spots-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--slate-800);
    font-weight: 600;
}

.spot-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

.ticket-label {
    letter-spacing: 0.02em;
}

.how-steps {
    max-width: 960px;
    margin: 0 auto;
}

.how-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.how-icon {
    font-size: 2.6rem;
    color: var(--slate-900);
}

.how-step h5 {
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0;
    color: var(--slate-900);
}

.how-step p {
    margin: 0;
    color: var(--slate-800);
    font-size: 1rem;
}

.event-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.event-thumb {
    height: 140px;
    background-size: cover;
    background-position: center;
}

.event-thumb.tennis { background-image: url('https://images.unsplash.com/photo-1505666287802-931dc83948e0?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.basketball { background-image: url('https://images.unsplash.com/photo-1519861531473-9200262188bf?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.football { background-image: url('https://images.unsplash.com/photo-1508098682722-e99c43a406b2?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.badminton { background-image: url('https://images.unsplash.com/photo-1504274066651-8d31a536b11a?auto=format&fit=crop&w=900&q=80'); }
.event-thumb.multi { background-image: url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?auto=format&fit=crop&w=900&q=80'); }

.event-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.event-body .btn {
    margin-top: auto;
}

.pill {
    padding: 6px 10px;
    background: var(--soft-gray);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--slate-800);
}

.slots-chip {
    background: rgba(22, 163, 74, 0.12);
    color: var(--vibrant-green);
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.18);
}

.bg-soft {
    background: rgba(37, 99, 235, 0.08);
    color: var(--electric-blue);
}

.view-toggle .btn {
    border-radius: 999px !important;
    padding: 10px 14px;
}

.view-panels {
    margin-top: 12px;
}

.map-panel {
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-shell {
    position: relative;
}

.map-canvas {
    width: 120%;
    height: 600px;
}

.map-note {
    position: absolute;
    bottom: 14px;
    left: 14px;
    background: rgba(255,255,255,0.9);
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--slate-800);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.map-locate-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    background: #ffffff;
    border: 2px solid var(--electric-blue);
    border-radius: 8px;
    color: var(--electric-blue);
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-locate-btn:hover {
    background: var(--electric-blue);
    color: #ffffff;
    transform: scale(1.05);
}

.map-locate-btn:active {
    transform: scale(0.95);
}

.map-locate-btn.locating {
    animation: pulse-locate 1.5s infinite;
}

@keyframes pulse-locate {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* User location marker */
.user-location-marker {
    position: relative;
    width: 24px;
    height: 24px;
}

.user-location-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: var(--electric-blue);
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(37, 99, 235, 0.6);
    z-index: 2;
}

.user-location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 2px solid var(--electric-blue);
    border-radius: 50%;
    animation: pulse-user-location 2s infinite;
}

@keyframes pulse-user-location {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        opacity: 0;
    }
}

.user-location-popup h6 {
    color: var(--electric-blue);
    font-size: 14px;
    margin-bottom: 8px;
}

/* Clustered map markers */
.cluster-wrapper {
    background: transparent;
}

.cluster-marker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #0f172a;
    color: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255,255,255,0.12);
}

.cluster-icon {
    font-size: 1rem;
    line-height: 1;
}

.cluster-count {
    font-weight: 700;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.14);
    padding: 4px 8px;
    border-radius: 999px;
}

.empty-state-card {
    background: #fff;
    border: 1px dashed var(--card-border);
    border-radius: 18px;
    padding: 32px;
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-illustration {
    margin: 0 auto 18px;
    width: 240px;
    height: 160px;
    position: relative;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(22, 163, 74, 0.08));
    border-radius: 16px;
    overflow: hidden;
}

.empty-illustration .court-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: rgba(255,255,255,0.6);
    top: 70%;
}

.empty-illustration .watcher {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
}

.watcher .body {
    width: 40px;
    height: 70px;
    background: #cbd5e1;
    border-radius: 10px 10px 6px 6px;
    margin: 0 auto;
    position: relative;
}

.watcher .body::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: #94a3b8;
    border-radius: 50%;
    top: -16px;
    left: 5px;
    box-shadow: 0 0 0 6px rgba(255,255,255,0.2);
}

.watcher .leg {
    width: 8px;
    height: 24px;
    background: #64748b;
    margin: -4px auto 0;
    border-radius: 4px;
}

.watcher .shadow {
    width: 80px;
    height: 12px;
    background: rgba(15,23,42,0.15);
    border-radius: 999px;
    margin: 6px auto 0;
    filter: blur(6px);
}

.pulse-btn {
    animation: pulse 2s infinite;
}

.how-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(37, 99, 235, 0.1);
    color: var(--electric-blue);
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    margin: 0 auto 12px;
}

.seo-footer {
    border-top: 1px solid var(--card-border);
}

.footer-heading {
    letter-spacing: 0.08em;
    font-weight: 800;
    color: var(--slate-800);
    margin-bottom: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.footer-links a {
    color: var(--slate-600);
}

.footer-links a:hover {
    color: var(--electric-blue);
}

.footer-stat {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--slate-600);
}

.create-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--electric-blue);
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.35);
    z-index: 20;
}

.glassy {
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

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

    .hero-wrap {
        padding: 52px 0 40px;
    }

    .selector-grid {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .selector-grid .activity-pill {
        white-space: nowrap;
    }

    .ticket-card {
        grid-template-columns: 1fr;
    }

    .ticket-left {
        flex-direction: row;
        justify-content: flex-start;
        border-right: none;
        border-bottom: 1px dashed var(--card-border);
    }

    .map-canvas {
        height: 380px;
    }

    .activity-selector {
        top: 60px;
    }
}

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

    .cta-row .btn {
        width: 100%;
    }

    .ticket-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .view-toggle {
        width: 100%;
    }

    .activity-selector {
        top: 58px;
    }
}

/* Map Layout */
.map-layout {
    display: flex;
    height: calc(100vh - 76px); /* Subtract navbar height */
    width: 100%;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: calc(100vh - 76px); /* Full height minus navbar */
}

.map-container {
    flex: 1;
    position: relative;
}

.tennis-map-full {
    width: 100% !important;
    height: 100% !important;
}

/* Sidebar Sections */
.filters-section {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.search-box .form-control {
    padding-left: 40px;
    border-radius: 25px;
    border: 1px solid #ddd;
}

.filter-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-tab {
    background: white;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-tab:hover {
    background: #f0f0f0;
}

.filter-tab.active {
    background: var(--tennis-green);
    color: white;
    border-color: var(--tennis-green);
}

.filter-content {
    margin-bottom: 15px;
}

.filter-group {
    display: none;
}

.filter-group.active {
    display: block;
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.results-count {
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.count-badge {
    background: var(--tennis-green);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: bold;
    font-size: 12px;
}

.count-text {
    color: #6c757d;
    font-size: 12px;
}

/* Slots List */
.slots-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    min-height: 0; /* Important for flex child to be scrollable */
    max-height: calc(100vh - 350px); /* Ensure scrollable on desktop */
}

.slot-card {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.2s;
}

.slot-card:hover {
    background: #f8f9fa;
}

.slot-card.highlighted {
    background: #e3f2fd;
    border-left: 4px solid var(--tennis-green);
}

.slot-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
}

.slot-title {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.slot-region {
    flex-shrink: 0;
}

.slot-details {
    margin-bottom: 12px;
}

.slot-details > div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666;
}

.slot-details i {
    width: 14px;
    text-align: center;
    color: #888;
}

.skill-badge {
    font-size: 10px !important;
    padding: 2px 6px !important;
    border-radius: 10px;
}

.capacity-indicator {
    margin-left: auto;
    width: 60px;
}

.capacity-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: var(--tennis-green);
    transition: width 0.3s;
}

.level-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.level-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 8px;
}

.slot-actions {
    text-align: right;
}

.empty-state {
    padding: 30px 16px;
    text-align: center;
    color: #666;
}

.empty-icon {
    font-size: 36px;
    color: #ddd;
    margin-bottom: 12px;
}

.empty-state h6 {
    color: #333;
    margin-bottom: 6px;
    font-size: 14px;
}

.empty-state p {
    font-size: 12px;
}

.add-activity-btn {
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.add-activity-btn .btn {
    width: 100%;
    border-radius: 20px;
    padding: 8px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Mobile View Selection */
.view-selector {
    margin-bottom: 10px;
}

.view-selector .btn-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.view-selector .btn {
    padding: 12px 20px;
    font-weight: 600;
    border-radius: 0;
    transition: all 0.3s ease;
}

.view-selector .btn:first-child {
    border-top-left-radius: 25px;
    border-bottom-left-radius: 25px;
}

.view-selector .btn:last-child {
    border-top-right-radius: 25px;
    border-bottom-right-radius: 25px;
}

/* Mobile Map Overlay */
.mobile-map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    max-height: 40vh;
    overflow-y: auto;
}

.overlay-content {
    padding: 0;
}

.overlay-header {
    padding: 15px 20px 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.overlay-body {
    padding: 15px 20px 20px;
}

.mobile-slot-details {
    font-size: 14px;
}

.mobile-slot-details .btn-sm {
    padding: 8px 12px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .map-layout {
        flex-direction: column;
        height: auto;
    }

    .sidebar {
        width: 100%;
        max-height: none;
        height: calc(100vh - 200px);
    }

    .map-container {
        height: calc(100vh - 200px);
        min-height: 400px;
        position: relative;
    }

    /* Initially hide map on mobile, show list */
    .map-container {
        display: none;
    }
}

@media (min-width: 769px) {
    /* Hide mobile view selector on desktop */
    .view-selector {
        display: none !important;
    }

    /* Show both sidebar and map on desktop */
    .sidebar,
    .map-container {
        display: block !important;
    }
}

/* Theme toggle button styling */
#theme-toggle {
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Light theme specific adjustments */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
}

[data-bs-theme="light"] .hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

[data-bs-theme="light"] .card {
    border: 1px solid #dee2e6;
}

/* Dark theme specific adjustments */
[data-bs-theme="dark"] {
    --bs-body-bg: #212529;
    --bs-body-color: #ffffff;
}

/* Hero section styling */
.hero-section {
    background: linear-gradient(135deg, var(--tennis-green) 0%, var(--tennis-court) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

/* Hero section with background image */
.hero-section.with-bg-image {
    background-attachment: fixed;
    background-repeat: no-repeat;
    position: relative;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section.with-bg-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero-section.with-bg-image .container {
    position: relative;
    z-index: 2;
}

/* Enhanced hero content styling */
.hero-section h1 {
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin-bottom: 2rem;
}

/* Hero buttons with enhanced styling */
.hero-section .btn {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid transparent;
    font-weight: 600;
    padding: 12px 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.hero-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.hero-section .btn-outline-light:hover {
    background-color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.9);
    color: var(--tennis-green);
}

/* Tennis ball animation */
.tennis-ball-icon {
    animation: bounce 2s infinite;
}

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

/* Card hover effects */
.card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Status badges */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Button enhancements */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Form styling */
.form-control:focus {
    border-color: var(--tennis-green);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Custom input group styling */
.input-group-text {
    background-color: var(--bs-secondary-bg);
    border-color: var(--bs-border-color);
}

/* Table enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: var(--bs-secondary-bg);
}

.table-hover tbody tr:hover {
    background-color: var(--bs-secondary-bg);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Footer styling */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Loading spinner for forms */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading:after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* NTRP Skill level badge colors with improved contrast */
.skill-1\.0, .skill-1\.5 {
    background-color: #495057 !important; /* Darker gray for new players */
    color: #ffffff !important;
    border: 2px solid #6c757d !important;
}

.skill-2\.0, .skill-2\.5 {
    background-color: #198754 !important; /* Darker green for beginners */
    color: #ffffff !important;
    border: 2px solid #28a745 !important;
}

.skill-3\.0, .skill-3\.5 {
    background-color: #fd7e14 !important; /* Orange for intermediate */
    color: #ffffff !important;
    border: 2px solid #ffc107 !important;
}

.skill-4\.0, .skill-4\.5 {
    background-color: #b02a37 !important; /* Darker red for advanced */
    color: #ffffff !important;
    border: 2px solid #dc3545 !important;
}

/* Fallback for legacy skill levels */
.skill-beginner {
    background-color: #198754 !important;
    color: #ffffff !important;
    border: 2px solid #28a745 !important;
}

.skill-intermediate {
    background-color: #fd7e14 !important;
    color: #ffffff !important;
    border: 2px solid #ffc107 !important;
}

.skill-advanced {
    background-color: #b02a37 !important;
    color: #ffffff !important;
    border: 2px solid #dc3545 !important;
}

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

::-webkit-scrollbar-track {
    background: var(--bs-secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-secondary);
}

/* Profile picture placeholder */
.profile-picture {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tennis-green), var(--tennis-court));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Court booking status indicators */
.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-unmatched {
    background-color: #ffc107;
}

.status-matched {
    background-color: #28a745;
}

.status-expired {
    background-color: #dc3545;
}

/* Tennis court visual element */
.court-lines {
    background-image: 
        linear-gradient(90deg, var(--court-line) 2px, transparent 2px),
        linear-gradient(var(--court-line) 2px, transparent 2px);
    background-size: 20px 20px;
    background-position: 0 0, 0 0;
    opacity: 0.1;
}

/* Empty state styling */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: var(--bs-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Success animations */
@keyframes checkmark {
    0% {
        stroke-dasharray: 44;
        stroke-dashoffset: 44;
    }
    100% {
        stroke-dasharray: 44;
        stroke-dashoffset: 0;
    }
}

.checkmark {
    animation: checkmark 0.6s ease-in-out;
}

/* Notification dots */
.notification-dot {
    width: 8px;
    height: 8px;
    background-color: #dc3545;
    border-radius: 50%;
    position: absolute;
    top: -2px;
    right: -2px;
}

/* Match status styling */
.match-status {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tennis court map styles */
.tennis-map {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
    position: relative;
    z-index: 1;
}

.tennis-map-small {
    height: 300px;
    min-height: 300px;
}

.tennis-map-large {
    height: 500px;
    min-height: 500px;
}

/* Address picker specific styles */
.address-picker-helper {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #2196f3;
    margin-bottom: 10px;
    font-size: 14px;
}

/* Ensure map containers have proper dimensions */
#addressPickerMap {
    height: 300px !important;
    width: 100% !important;
}

.court-popup {
    min-width: 200px;
}

.court-popup h6 {
    color: #0d6efd;
    margin-bottom: 0.5rem;
}

.court-popup .badge {
    font-size: 0.75rem;
}

/* Red and white location pin marker styling */
.custom-location-marker {
    background: none !important;
    border: none !important;
}

.map-location-pin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.map-location-pin .pin-head {
    width: 32px;
    height: 32px;
    background: #dc3545;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.5);
    border: 3px solid white;
    position: relative;
}

.map-location-pin .pin-center {
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    transform: rotate(45deg);
}

.map-location-pin .pin-point {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid #dc3545;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Sport-specific marker styling */
.activity-location-marker {
    background: none !important;
    border: none !important;
}

.sport-marker-pin {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    --activity-color: #4CAF50;
}

.sport-marker-pin .sport-marker-head {
    width: 36px;
    height: 36px;
    background: var(--activity-color);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border: 3px solid white;
    position: relative;
}

.sport-marker-pin .sport-marker-head i {
    transform: rotate(45deg);
}

.sport-marker-pin .sport-marker-point {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid var(--activity-color);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

/* Pill-style sport markers */
.activity-pill-marker {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--activity-color, #2563EB);
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 20px;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.activity-pill-marker .pill-emoji {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35));
}

.popup-actions .btn-primary {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
    color: #fff;
}

/* Precise location marker */
.precise-location-marker {
    background: none !important;
    border: none !important;
    position: relative;
}

.crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
}

.crosshair-h, .crosshair-v {
    position: absolute;
    background: #dc3545;
    box-shadow: 0 0 4px rgba(220, 53, 69, 0.5);
}

.crosshair-h {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

.crosshair-v {
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.location-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #dc3545;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.court-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #dc3545;
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    margin-top: 5px;
    white-space: nowrap;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Enhanced popup styling */
.enhanced-court-popup,
.precise-location-popup {
    min-width: 280px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.popup-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
}

.court-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

.court-info h6 {
    color: #0d6efd;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.popup-body p {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.popup-body i {
    width: 16px;
    color: #6c757d;
}

.popup-actions {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

/* Map controls */
.map-controls {
    margin-bottom: 1rem;
}

.map-controls .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.match-status.pending {
    background-color: rgba(255, 193, 7, 0.2);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.5);
}

.match-status.approved {
    background-color: rgba(40, 167, 69, 0.2);
    color: #155724;
    border: 1px solid rgba(40, 167, 69, 0.5);
}

.match-status.rejected {
    background-color: rgba(220, 53, 69, 0.2);
    color: #721c24;
    border: 1px solid rgba(220, 53, 69, 0.5);
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .match-status.pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ffc107;
}

[data-bs-theme="dark"] .match-status.approved {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

[data-bs-theme="dark"] .match-status.rejected {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}
