/* Maybe Padel Club Rm. Valcea - Premium Stylesheet */

:root {
    color-scheme: dark;
    --bg-dark: #080808;
    --bg-card: rgba(30, 30, 30, 0.75);
    --bg-card-solid: #1e1e1e;
    --accent: #ccff00; /* Neon Lime Green */
    --accent-hover: #b5e600;
    --text-primary: #ffffff;
    --text-muted: #a0a0a0;
    --glass-border: rgba(204, 255, 0, 0.15);
    --glass-shadow: rgba(0, 0, 0, 0.5);
    --status-booked: #dc3545;
    --status-pending: #ffc107;
    --status-available: #28a745;
}

body.light-theme {
    color-scheme: light;
    --bg-dark: #f5f6fa;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-solid: #ffffff;
    --text-primary: #121212;
    --text-muted: #6c757d;
    --glass-border: rgba(0, 0, 0, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.08);
}

select, select option, .form-select, .form-select option {
    background-color: var(--bg-card-solid) !important;
    color: var(--text-primary) !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    position: relative;
}

/* Blurred & dimmed background image overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(204, 255, 0, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.02) 0%, transparent 40%),
        url('/assets/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    filter: blur(10px) brightness(0.22) contrast(1.05);
    z-index: -3;
    pointer-events: none;
    transition: filter 0.3s ease;
}

body.light-theme::before {
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(204, 255, 0, 0.01) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 229, 255, 0.01) 0%, transparent 40%),
        url('/assets/bg.jpg');
    filter: blur(10px) brightness(0.92) contrast(0.95);
}

/* General Dark Mode Font Visibility overrides */
p, label, .form-label, h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, td, th {
    color: var(--text-primary);
}

.text-muted, .text-secondary {
    color: var(--text-muted) !important;
}

/* Preserve bootstrap semantic color rules */
.text-success { color: #2ecc71 !important; }
.text-warning { color: #f1c40f !important; }
.text-danger { color: #e74c3c !important; }
.text-info { color: #3498db !important; }
.text-accent { color: var(--accent) !important; }

/* Glassmorphism Card styling */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 var(--glass-shadow);
    padding: 24px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(204, 255, 0, 0.3);
    box-shadow: 0 8px 32px 0 rgba(204, 255, 0, 0.05);
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

.text-accent {
    color: var(--accent) !important;
}

/* Date Selector slider style */
.date-selector-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 12px;
    padding: 8px 0;
    scrollbar-width: none; /* Firefox */
}

.date-selector-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.date-btn {
    flex: 0 0 75px;
    height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.date-btn:hover {
    background: rgba(204, 255, 0, 0.1);
    border-color: rgba(204, 255, 0, 0.5);
}

.date-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
    font-weight: bold;
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(204, 255, 0, 0.3);
}

.date-btn .day-num {
    font-size: 22px;
    font-weight: 700;
}

.date-btn .day-name {
    font-size: 11px;
    text-transform: uppercase;
    opacity: 0.8;
}

/* Court Select tab button styling */
.court-select-btn {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.court-select-btn:hover {
    border-color: rgba(204, 255, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.court-select-btn.active {
    background: rgba(204, 255, 0, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    font-weight: bold;
}

/* Time Slot grid item styling */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.slot-btn {
    padding: 16px 10px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.slot-btn.available {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #4cd137;
}

.slot-btn.available:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(204, 255, 0, 0.2);
}

.slot-btn.booked {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #ea868f;
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.slot-btn.booked::after {
    content: '';
    position: absolute;
    width: 140%;
    height: 1px;
    background: rgba(220, 53, 69, 0.3);
    transform: rotate(30deg);
}

.slot-btn.pending {
    background: rgba(255, 193, 7, 0.08);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffda6a;
    cursor: not-allowed;
    animation: pulse-pending 2s infinite alternate;
}

.slot-btn.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg-dark);
    box-shadow: 0 4px 12px rgba(204, 255, 0, 0.3);
}

.slot-btn .slot-price {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 4px;
}

.slot-btn.selected .slot-price {
    opacity: 0.9;
    font-weight: 700;
}

@keyframes pulse-pending {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Custom form components styling */
.form-control, .form-select, select.form-control, select.form-select {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px;
    padding: 12px 16px;
    transition: all 0.2s ease;
}

select.form-control option, select.form-select option, .form-select option {
    background-color: #121212 !important;
    color: #ffffff !important;
}

.form-control:focus, .form-select:focus, select.form-control:focus, select.form-select:focus {
    background-color: #242424 !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 0.25rem rgba(204, 255, 0, 0.15) !important;
    color: #ffffff !important;
}

.form-label {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 14px;
}

.btn-primary-neon {
    background-color: var(--accent);
    color: var(--bg-dark);
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 14px 24px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(204, 255, 0, 0.15);
}

.btn-primary-neon:hover {
    background-color: var(--accent-hover);
    color: var(--bg-dark);
    box-shadow: 0 6px 20px rgba(204, 255, 0, 0.3);
    transform: translateY(-2px);
}

.btn-primary-neon:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    box-shadow: none;
    transform: none;
}

/* Custom PWA Install prompt */
.pwa-prompt {
    display: none;
    background: linear-gradient(135deg, rgba(30,30,30,0.95) 0%, rgba(20,20,20,0.95) 100%);
    border: 1px solid var(--accent);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    z-index: 1050;
}

/* Admin Specific Overrides */
.sidebar {
    background: #181818;
    border-right: 1px solid rgba(255,255,255,0.05);
    min-height: 100vh;
}

.sidebar .nav-link {
    color: var(--text-muted);
    padding: 14px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: var(--accent);
    background: rgba(204, 255, 0, 0.05);
}

.table-dark {
    --bs-table-bg: #1e1e1e;
    --bs-table-border-color: rgba(255,255,255,0.05);
}

/* Padel Player smash animation wrapper */
.padel-player-wrapper {
    position: fixed;
    right: -320px; /* Hidden offscreen */
    bottom: 30px;
    width: 280px;
    height: 380px;
    background-image: url('/assets/padel_player.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1040; /* Above cards, below dropdown overlays */
    pointer-events: none;
    opacity: 0;
}

/* Slide in, wind-up, smash swing, slide out */
@keyframes padel-smash-anim {
    0% {
        right: -320px;
        transform: rotate(0deg) scale(0.9);
        opacity: 0;
    }
    12% {
        right: 15px;
        transform: rotate(-8deg) scale(1);
        opacity: 0.95;
    }
    22% {
        right: 25px;
        transform: rotate(-18deg) scale(1.02); /* Wind up */
    }
    30% {
        right: 5px;
        transform: rotate(25deg) scale(1.15); /* Smash swing! */
        filter: drop-shadow(0 0 20px var(--accent));
    }
    38% {
        right: 15px;
        transform: rotate(5deg) scale(1); /* Follow through */
    }
    82% {
        right: 20px;
        transform: rotate(0deg) scale(1);
        opacity: 0.95;
    }
    100% {
        right: -320px;
        transform: rotate(-10deg) scale(0.9);
        opacity: 0;
    }
}

.padel-player-active {
    animation: padel-smash-anim 3.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Animated perspective 3D grid background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
}

.animated-bg::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(204, 255, 0, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(204, 255, 0, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    transform: perspective(600px) rotateX(60deg);
    animation: grid-move 25s linear infinite;
}

@keyframes grid-move {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 1000px;
    }
}

/* Padel court SVGs styling & animations */
.court-blueprint {
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.05));
    transition: all 0.4s ease;
}

.court-select-btn.active .court-blueprint {
    filter: drop-shadow(0 0 8px rgba(204, 255, 0, 0.25));
}

.court-select-btn.active .court-blueprint rect {
    stroke-opacity: 0.8;
}

.court-select-btn.active .court-blueprint text {
    fill: var(--accent) !important;
    opacity: 0.95;
    animation: text-pulse 2s infinite alternate;
}

@keyframes text-pulse {
    0% { opacity: 0.65; }
    100% { opacity: 1; }
}

/* Court card premium transitions */
.court-select-btn {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    background: rgba(30, 30, 30, 0.4) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 24px !important;
}

.court-select-btn:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(204, 255, 0, 0.25) !important;
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.court-select-btn.active {
    background: rgba(204, 255, 0, 0.03) !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 25px rgba(204, 255, 0, 0.1) !important;
}

/* Time slot buttons animation on render */
.slot-btn {
    animation: fade-slide-up 0.45s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    opacity: 0;
    transform: translateY(12px);
}

/* Delay slots animation sequentially for high-end look */
.slot-btn:nth-child(1) { animation-delay: 0.03s; }
.slot-btn:nth-child(2) { animation-delay: 0.06s; }
.slot-btn:nth-child(3) { animation-delay: 0.09s; }
.slot-btn:nth-child(4) { animation-delay: 0.12s; }
.slot-btn:nth-child(5) { animation-delay: 0.15s; }
.slot-btn:nth-child(6) { animation-delay: 0.18s; }
.slot-btn:nth-child(7) { animation-delay: 0.21s; }
.slot-btn:nth-child(8) { animation-delay: 0.24s; }
.slot-btn:nth-child(9) { animation-delay: 0.27s; }
.slot-btn:nth-child(10) { animation-delay: 0.3s; }

@keyframes fade-slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive header logo size */
.header-logo {
    height: 105px;
    width: auto;
    object-fit: contain;
    border-radius: 50%;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.header-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(204, 255, 0, 0.15);
}

@media (max-width: 576px) {
    .header-logo {
        height: 85px;
    }
}

/* Booking card specific styles */
.booking-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 30, 30, 0.45) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
}

.booking-card:hover {
    transform: translateY(-2px);
    border-color: rgba(204, 255, 0, 0.4) !important;
    box-shadow: 0 8px 30px rgba(204, 255, 0, 0.08) !important;
}

.match-details-panel {
    background: rgba(0, 0, 0, 0.25) !important;
    border-left: 3px solid var(--accent) !important;
    transition: background 0.2s ease;
}

.match-details-panel:hover {
    background: rgba(0, 0, 0, 0.35) !important;
}

