/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

/* ===== Screen Management ===== */
.screen {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screen.active {
    display: block;
    opacity: 1;
}

/* ===== Splash Screen ===== */
.splash-bg {
    position: absolute;
    inset: 0;
    background: url('images/alania.jpg') center/cover no-repeat;
    z-index: 0;
}

.splash-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(0, 71, 109, 0.85) 0%, 
        rgba(0, 119, 182, 0.75) 30%, 
        rgba(244, 162, 97, 0.65) 70%, 
        rgba(231, 111, 81, 0.75) 100%);
    z-index: 1;
}

/* ===== Book Button Animation ===== */
.book-btn {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(244, 162, 97, 0.4); }
    50% { box-shadow: 0 10px 60px rgba(244, 162, 97, 0.7); }
}

/* ===== Calendar Day Styles ===== */
.cal-day {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.cal-day:hover:not(.cal-disabled):not(.cal-selected) {
    background-color: #e6f4f9;
}

.cal-day.cal-today {
    border: 2px solid #0077B6;
    color: #0077B6;
    font-weight: 700;
}

.cal-day.cal-selected {
    background: #0077B6;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

.cal-day.cal-disabled {
    color: #d1d5db;
    cursor: default;
    pointer-events: none;
}

.cal-day.cal-other {
    color: #d1d5db;
}

/* ===== Time Slot Styles ===== */
.slot-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    user-select: none;
}

.slot-btn:hover:not(.slot-booked):not(.slot-selected) {
    border-color: #0077B6;
    background: #f0f9ff;
}

.slot-btn.slot-booked {
    background: #f3f4f6;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.55;
}

.slot-btn.slot-selected {
    background: linear-gradient(135deg, #0077B6, #33a7cf);
    border-color: #0077B6;
    color: white;
    box-shadow: 0 4px 16px rgba(0, 119, 182, 0.35);
    transform: scale(1.02);
}

.slot-btn.slot-adjacent {
    border-color: #F4A261;
    background: #FFFBF0;
}

.slot-btn .slot-time {
    font-weight: 600;
    font-size: 0.85rem;
}

.slot-btn .slot-price {
    font-weight: 700;
    font-size: 0.8rem;
}

.slot-btn.slot-selected .slot-price {
    color: #FFD54F;
}

.slot-btn.slot-booked .slot-time,
.slot-btn.slot-booked .slot-price {
    color: #9ca3af;
}

/* ===== Gender Radio Styles ===== */
.gender-option {
    transition: all 0.2s ease;
}

.gender-option:has(input:checked) {
    border-color: #0077B6;
    background-color: #e6f4f9;
    color: #0077B6;
}

/* ===== Book Button Booking ===== */
.book-btn-booking:not(:disabled):hover {
    transform: translateY(-2px);
}

/* ===== Confirmation Modal Animation ===== */
#confirmation-modal.showing .relative {
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
    from { transform: scale(0.7); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ===== Custom Scrollbar for Slots ===== */
#court1-slots::-webkit-scrollbar,
#court2-slots::-webkit-scrollbar {
    width: 4px;
}

#court1-slots::-webkit-scrollbar-track,
#court2-slots::-webkit-scrollbar-track {
    background: transparent;
}

#court1-slots::-webkit-scrollbar-thumb,
#court2-slots::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

/* ===== Form Input Focus Enhancement ===== */
input:focus, select:focus {
    outline: none;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 480px) {
    .slot-btn {
        padding: 8px 10px;
        border-radius: 10px;
    }
    
    .slot-btn .slot-time {
        font-size: 0.78rem;
    }
    
    .slot-btn .slot-price {
        font-size: 0.72rem;
    }

    .cal-day {
        font-size: 0.8rem;
        border-radius: 8px;
    }
}

@media (min-width: 768px) {
    #court1-slots,
    #court2-slots {
        max-height: 520px;
    }
}

/* ===== Selection indicator dot ===== */
.cal-day.cal-selected::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: white;
}

/* ===== Photo upload hover ===== */
#photo-preview:hover {
    border-color: #0077B6;
}

/* ===== Loading Shimmer ===== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.slot-btn.slot-booked {
    background-image: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 3s infinite;
}

.slot-my-booking {
    background: linear-gradient(135deg, #e6f4f9 0%, #cce9f3 100%);
    border: 2px solid #0077B6 !important;
    opacity: 1;
    cursor: default;
}

.slot-my-booking .slot-time {
    color: #0077B6;
}

.slot-my-booking .slot-price {
    color: #005f92;
}

#menu-dropdown {
    transition: all 0.2s ease;
}

#menu-dropdown button:hover i {
    transform: scale(1.05);
}

#forgot-modal-1, #forgot-modal-2, #forgot-modal-3 {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}