:root {
    --primary-color: #FB923C;
    --primary-light: #fdba74;
    --primary-dark: #f97316;
    --secondary-color: #F43F5E;
    --accent-color: #fbbf24;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-body: #f9fafb;
    --bg-surface: #ffffff;
    --border-radius: 16px;
    --card-shadow: 0px 18px 40px rgba(0, 0, 0, 0.05);
    --input-bg: #f3f4f6;
    --transition-speed: 0.3s;

    /* Custom Gradients */
    --brand-gradient: linear-gradient(90deg, #FB923C 0%, #F43F5E 100%);
    --brand-gradient-dark: linear-gradient(90deg, #f97316 0%, #e11d48 100%);
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h2 {
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

header h2 span#eventTitle {
    color: var(--primary-color) !important;
}

header .btn-warning {
    background: var(--brand-gradient);
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(251, 146, 60, 0.3);
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    transition: all var(--transition-speed);
}

header .btn-warning:hover {
    transform: translateY(-2px);
    background: var(--brand-gradient-dark);
    color: white;
    box-shadow: 0 6px 15px rgba(251, 146, 60, 0.5);
}

/* Timer Section */
#timer {
    background: transparent;
    border-radius: var(--border-radius);
    padding: 0;
    color: var(--text-main);
    margin-top: 2rem;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

#timer::before {
    display: none;
}

.timer-header {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    text-align: center;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    display: inline-block;
    width: 100%;
    color: var(--primary-dark);
}

.timer-header span.blink {
    background-color: var(--danger-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    animation: pulse 1.5s infinite;
    font-weight: 800;
    margin-left: 0.5rem;
    box-shadow: 0 4px 10px rgba(238, 93, 80, 0.4);
}

.timer-blocks {
    display: flex;
    justify-content: center;
    gap: 1.5rem !important;
    /* Force gap */
}

.time-block {
    background: white;
    color: var(--text-main);
    padding: 1rem;
    border-radius: 16px;
    /* Slightly more rounded */
    min-width: 90px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(112, 144, 176, 0.2);
    position: relative;
    border: 2px solid transparent;
    /* Prepare for gradient border if needed */
    transition: transform 0.3s ease;
}

.time-block:hover {
    transform: translateY(-5px);
}

/* Gradient Text for Numbers */
.time-block span {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


.time-block small {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

/* Urgent Mode */
#timer.urgent .timer-header {
    background: #FFF1F0;
    /* Light red bg */
    border: 1px solid #FFA39E;
    color: #CF1322;
    animation: shake 8s cubic-bezier(.36, .07, .19, .97) both infinite;
}

#timer.urgent .time-block {
    border: 2px solid #FFCCC7;
    background: #FFF2F0;
    box-shadow: 0 4px 15px rgba(245, 34, 45, 0.15);
}

#timer.urgent .time-block span {
    background: linear-gradient(135deg, #FF4D4F 0%, #CF1322 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#timer.urgent .time-block small {
    color: #CF1322;
}

@keyframes shake {

    1%,
    9% {
        transform: translate3d(-1px, 0, 0);
    }

    2%,
    8% {
        transform: translate3d(2px, 0, 0);
    }

    3%,
    5%,
    7% {
        transform: translate3d(-4px, 0, 0);
    }

    4%,
    6% {
        transform: translate3d(4px, 0, 0);
    }

    10%,
    100% {
        transform: translate3d(0, 0, 0);
    }
}

/* Location Helper */
.location-tag {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--text-main);
}

.location-tag i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Table Grid */
#tableGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 12px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-top: 1.5rem;
}

.table-item,
.table {
    /* Assuming .table class is used for slots */
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    background-color: #F8F9FA;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-muted);
    font-size: 0.9rem;
    position: relative;
}

.table:hover:not(.booked) {
    border-color: var(--primary-color);
    background-color: #F4F7FE;
    transform: translateY(-2px);
    color: var(--primary-color);
}

.table.selected {
    background: var(--brand-gradient);
    color: white;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.4);
    transform: scale(1.05);
    border: none;
}

.table.booked {
    background-color: #E0E5F2;
    color: #A3AED0;
    cursor: not-allowed;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 5px,
            rgba(0, 0, 0, 0.05) 5px,
            rgba(0, 0, 0, 0.05) 10px);
}

.table.premium {
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    background: rgba(255, 181, 71, 0.05);
}

.table.premium:hover:not(.booked) {
    background: var(--accent-color);
    color: white;
}

.table.premium.selected {
    background: var(--brand-gradient);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.5);
    color: white;
}

.table.premium.booked {
    border-color: #D1D5DB;
    background-color: #E5E7EB;
}

.premium-star {
    font-size: 0.7em;
    margin-left: 2px;
    vertical-align: top;
}

/* Booking Section (Right Column) */
.booking-section {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 100px;
}

.booking-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 10px;
    border: 1px solid #E0E5F2;
    padding: 0.75rem 1rem;
    background-color: var(--input-bg);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background-color: white;
}

.input-group-text {
    background-color: #E0E5F2;
    border: none;
    border-radius: 10px 0 0 10px;
    color: var(--text-muted);
}

/* Tooltip Logic */
.table[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: pre-wrap;
    text-align: center;
    font-size: 0.75rem;
    z-index: 100;
    pointer-events: none;
    min-width: 120px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    animation: fadeIn 0.2s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Selected Tables Tags */
.table-tag-container {
    min-height: 48px;
    border: 1px dashed #E0E5F2;
    border-radius: 10px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    background: var(--input-bg);
}

.table-tag {
    background: var(--brand-gradient);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(251, 146, 60, 0.2);
}

.table-tag.premium {
    background: var(--accent-color);
    color: black;
}

/* Price Box */
#price-box {
    background: linear-gradient(145deg, #0e4c73 0%, #155e3a 100%);
    /* Blue to Green Dark */
    border-radius: 12px;
    padding: 1.5rem;
    color: white;
    margin-top: 2rem;
}

#price-box h5 {
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0.9;
}

#price-box p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    opacity: 0.8;
}

#price-box hr {
    border-color: rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}

#total-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success-color);
}

/* Buttons */
.btn-success {
    background: var(--brand-gradient);
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(251, 146, 60, 0.3);
    transition: all 0.3s;
}

.btn-success:hover {
    background: var(--brand-gradient-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(251, 146, 60, 0.4);
}

/* Venue Section */
.venue-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .venue-card {
        flex-direction: row;
    }

    .venue-image {
        width: 40%;
    }

    .venue-details {
        padding: 3rem;
        width: 60%;
    }
}

.venue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 300px;
}

.venue-details {
    padding: 2rem;
}

.venue-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.venue-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: white !important;
    border-top: 1px solid #E0E5F2;
    padding: 2rem !important;
}

footer p {
    color: var(--text-muted);
}

/* Keyframes */
@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Mobile Corrections */
@media (max-width: 767px) {
    .booking-section {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }

    #tableGrid {
        grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
    }

    .table-item,
    .table {
        font-size: 0.8rem;
    }
}

/* Upcoming Events modal styles */
#upcomingEventsModal .modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

#upcomingEventsModal .card {
    border: 1px solid #E0E5F2;
    transition: transform .15s ease, box-shadow .15s ease;
    border-radius: 12px;
}

#upcomingEventsModal .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    border-color: var(--primary-color);
}

#upcomingEventsModal .card-title {
    font-weight: 700;
    margin-bottom: .35rem;
    color: var(--primary-color);
}

#upcomingEventsModal .card-text {
    font-size: .925rem;
    color: var(--text-main);
}

#upcomingEventsModal .badge {
    font-size: .75rem;
    padding: .4rem .55rem;
}

#upcomingEventsModal a.text-decoration-none {
    color: inherit;
}

#upcomingEventsModal .modal-title {
    font-weight: 700;
    color: var(--text-main);
}

/* Redesigned Event Cards */
.event-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    border-radius: 12px;
}

.event-card-link {
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.event-card .object-fit-cover {
    object-fit: cover;
}

.event-card .card-title {
    font-size: 1rem;
    line-height: 1.4;
}

/* Dark mode adjustments (optional if you want to keep them) */
@media (prefers-color-scheme: dark) {
    /* 
       For now, disabling auto dark mode overrides to ensure the new 
       light/clean design persists unless specific dark mode vars are added. 
       If dark mode is needed, we would redefine root variables here.
    */
}

/* Floating Share Button */
.share-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--brand-gradient);
    color: white;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(251, 146, 60, 0.4);
    cursor: pointer;
    z-index: 1050;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    font-weight: 700;
}

.share-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--brand-gradient-dark);
    box-shadow: 0 15px 35px rgba(251, 146, 60, 0.5);
}

.share-float-btn i {
    font-size: 1.2rem;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .share-float-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 16px;
    }
}

/* Login/OTP Modal Styles */
.icon-box-soft-primary {
    width: 64px;
    height: 64px;
    background-color: rgba(251, 146, 60, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.letter-spacing-2 {
    letter-spacing: 5px;
    font-weight: 700;
    font-size: 1.25rem;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

/* Modal Inputs Focus */
#otpModal .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
    /* Removed default shadow */
}

#otpModal .input-group-text {
    background-color: transparent;
}

/* Instagram and Helpline Styles */
.nav-social-link {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-social-link:hover {
    transform: translateY(-3px) rotate(8deg);
    box-shadow: 0 8px 15px rgba(225, 48, 108, 0.2);
    border-color: #E1306C;
}

.instagram-btn {
    color: #E1306C;
}

.helpline-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
}

.helpline-box:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 15px rgba(251, 146, 60, 0.15);
}

.helpline-icon {
    font-size: 0.95rem;
    color: var(--primary-color);
    background: rgba(251, 146, 60, 0.1);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.helpline-icon i {
    display: block;
    line-height: 1;
}

.helpline-details {
    display: flex;
    flex-direction: column;
}

.helpline-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
}

.helpline-number {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

@media (max-width: 991px) {
    header .container {
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .helpline-details {
        display: none;
    }

    .helpline-box {
        padding: 8px;
        gap: 0;
    }

    .helpline-icon {
        background: transparent;
        width: auto;
        height: auto;
    }
}