/* ===== COSMIC DESIGN VARIABLES ===== */
:root {
    --bg-color: #050505;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(0, 195, 255, 0.5);
    --text-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Accessibility: Hide labels visually but keep for screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
    touch-action: manipulation; /* Disable double-tap zoom completely */
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* ===== STARFIELD BACKGROUND ===== */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
    z-index: -2;
}

.stars::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(white, rgba(255, 255, 255, 0.2) 2px, transparent 3px),
        radial-gradient(white, rgba(255, 255, 255, 0.15) 1px, transparent 2px),
        radial-gradient(white, rgba(255, 255, 255, 0.1) 2px, transparent 3px);
    background-size: 550px 550px, 350px 350px, 250px 250px;
    background-position: 0 0, 40px 60px, 130px 270px;
    animation: starMove 40s linear infinite;
    opacity: 0.75;
}

@keyframes starMove {
    from {
        transform: translateY(0);
    }
    to {
        transform: translateY(-500px);
    }
}

/* ===== MAIN CONTAINER ===== */
.main-container {
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
    padding-top: env(safe-area-inset-top, 20px);
    padding-bottom: env(safe-area-inset-bottom, 20px);
    padding-left: 20px;
    padding-right: 20px;
}

/* ===== LOGO SECTION ===== */
.logo-container {
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 16px;
}

.logo-title {
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.logo-subtitle {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 8px;
    margin-top: 10px;
    text-transform: uppercase;
}

/* ===== STEP CONTAINERS ===== */
.step-container {
    flex: 1;
    display: none;
    opacity: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#step-phone,
#step-name,
#step-services,
#step-calendar,
#step-time,
#step-summary {
    overflow: hidden;
}

/* EXTRA режим - растянуть контейнер вверх */
#step-services.extra-mode-active {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding-top: 20px;
}
#step-calendar,
#step-time {
    margin-top: -28px;
}

.step-container.active {
    display: flex;
    opacity: 1;
}

.step-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* ===== INPUT STYLES ===== */
.tech-input-container {
    position: relative;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
}

#step-phone .tech-input-container {
    margin-top: -24px;
}

#step-phone .tech-input-container input {
    font-family: Tahoma, 'Segoe UI', sans-serif;
    font-size: 28px;
    font-weight: 700;
}

#step-phone .tech-placeholder {
    font-family: Tahoma, 'Segoe UI', sans-serif;
    font-size: 24px;
    font-weight: 700;
}

#step-phone .tech-placeholder.placeholder-small {
    font-size: 19px;
}

.tech-input-container input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    text-align: center;
    width: 100%;
    padding: 15px 0;
    outline: none;
    letter-spacing: 2px;
    font-family: inherit;
    z-index: 2;
    position: relative;
}

.tech-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    pointer-events: none;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 50%, #4facfe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: shineText 3s linear infinite;
    opacity: 0.7;
    white-space: nowrap;
}

#step-name .tech-placeholder {
    font-size: 14px;
    font-weight: 700;
    font-style: italic;
}

#step-name .booking-btn {
    margin-top: 10px;
}

#step-name .tech-placeholder.placeholder-large {
    font-size: 20px;
}

@keyframes shineText {
    to {
        background-position: 200% center;
    }
}

.tech-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #4facfe, #00f2fe, transparent);
    background-size: 200% auto;
    animation: flowLine 2s linear infinite;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.6);
}

@keyframes flowLine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.tech-input-container input:not(:placeholder-shown) + .tech-placeholder {
    opacity: 0;
}

/* ===== BUTTON STYLES ===== */
.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: rgba(255, 255, 255, 0.7);
    padding: 15px;
    font-size: 14px;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.4s ease;
    text-align: center;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    animation: pulseBorder 4s infinite;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes pulseBorder {
    0% {
        border-color: rgba(255, 255, 255, 0.1);
    }
    50% {
        border-color: rgba(255, 255, 255, 0.25);
    }
    100% {
        border-color: rgba(255, 255, 255, 0.1);
    }
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.glass-btn.selected {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    font-weight: 600;
    animation: none;
}

.glass-btn.disabled {
    opacity: 0.2;
    pointer-events: none;
    border: none;
    text-decoration: line-through;
}

/* ===== SERVICE BUTTON STYLE (From 777) ===== */
#services-list {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#services-list.extra-mode {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 60px;
}

#services-list.extra-mode .category-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#services-list.extra-mode .category-header {
    font-size: 14px;
    font-weight: 700;
    color: rgba(0, 195, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(0, 195, 255, 0.5);
}

#services-list.extra-mode .category-header.header-cosmic {
    color: #00f2fe;
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.6), 0 0 20px rgba(0, 195, 255, 0.4);
}

#services-list.extra-mode .category-header.header-yellow {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 0 20px rgba(255, 165, 0, 0.4);
}

#services-list.extra-mode .s2-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding-top: 10px;
    padding-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    /* grid fixes for mobile */
    min-width: 0;
    max-width: 100%;
}

#services-list.extra-mode .s2-scroll::-webkit-scrollbar {
    display: none;
}

#services-list.extra-mode .s2-scroll::before,
#services-list.extra-mode .s2-scroll::after {
    content: '';
    flex: 0 0 1px;
}

#services-list.extra-mode .s2-card {
    min-width: 0;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

#services-list.extra-mode .s2-card.card-cosmic {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 195, 255, 0.2);
}

#services-list.extra-mode .s2-card.card-cosmic.active {
    background: linear-gradient(135deg, rgba(0, 195, 255, 0.2), rgba(153, 0, 255, 0.3));
    border-color: #00c3ff;
    border-width: 2px;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 195, 255, 0.4), inset 0 0 10px rgba(153, 0, 255, 0.4);
}

#services-list.extra-mode .s2-card.card-yellow {
    background: rgba(184, 134, 11, 0.6);
    border: 1px solid #DAA520;
}

#services-list.extra-mode .s2-card.card-yellow .title {
    color: #000;
    font-weight: 700;
}

#services-list.extra-mode .s2-card.card-yellow.active {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFF8DC;
    border-width: 2px;
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.6), inset 0 0 10px rgba(255, 255, 255, 0.5);
}

#services-list.extra-mode .s2-card.card-yellow.active .title {
    color: #000;
    text-shadow: none;
}

#services-list.extra-mode .s2-card .title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.service-btn {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, rgba(0,195,255,0.12), rgba(58,123,213,0.12));
    border: none;
    border-radius: 12px;
    padding: 8px 40px;
    margin-bottom: 10px;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,195,255,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
}

.service-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 2.2s ease-in-out infinite;
}

.service-btn:hover {
    border-color: rgba(0,195,255,0.7);
    box-shadow: 0 0 30px rgba(0,195,255,0.5), 0 0 60px rgba(0,195,255,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-3px) scale(1.02);
}

.service-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(0,195,255,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.service-btn.selected {
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    color: #000;
    border-color: #00d2ff;
    box-shadow: 0 0 40px rgba(0,210,255,0.8), 0 0 80px rgba(0,210,255,0.4);
    font-weight: 700;
    transform: scale(1.05);
}

.service-btn.extra-toggle {
    background: linear-gradient(135deg, #ffd700, #ffed4e, #ffd700);
    background-size: 200% 200%;
    animation: goldShimmer 3s ease infinite;
    color: #000;
    border: 2px solid #ffed4e;
    box-shadow: 0 0 30px rgba(255,215,0,0.6), 0 0 60px rgba(255,237,78,0.4), inset 0 2px 0 rgba(255,255,255,0.3);
    font-weight: 900;
}

.service-btn.extra-toggle::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,0,0.7), transparent);
    animation: yellowEcho 2s ease-in-out infinite;
}

.service-btn.extra-toggle:hover {
    box-shadow: 0 0 50px rgba(255,215,0,0.9), 0 0 100px rgba(255,237,78,0.6);
    border-color: #ffd700;
}

@keyframes goldShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes yellowEcho {
    0% { left: -100%; }
    100% { left: 100%; }
}

.service-btn.max-btn {
    background: linear-gradient(135deg, #6b3f1d, #8a5a2b, #6b3f1d);
    background-size: 200% 200%;
    animation: maxGlow 3s ease infinite;
    color: #000;
    font-weight: 800;
    border: none;
    box-shadow: 0 0 25px rgba(255,215,0,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}

.service-btn.max-btn::before {
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.7), transparent);
    animation: maxEcho 2.4s ease-in-out infinite;
}

@keyframes maxGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes maxEcho {
    0% { left: -100%; }
    100% { left: 100%; }
}

.service-btn.back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(30, 30, 40, 0.7);
    border: none;
    width: auto;
    padding: 10px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    box-shadow: 0 2px 15px rgba(100, 180, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    z-index: 1000;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-btn.back-btn:hover {
    background: rgba(40, 50, 70, 0.9);
    color: rgba(255,255,255,1);
    box-shadow: 0 4px 20px rgba(255, 0, 255, 0.5), 0 0 30px rgba(0, 255, 255, 0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}

.service-btn.back-btn:active {
    background: rgba(60, 70, 100, 1);
    color: rgba(255,255,255,1);
    box-shadow: 0 0 40px rgba(255, 0, 255, 1), 0 0 60px rgba(0, 255, 255, 0.8), 0 0 80px rgba(255, 20, 147, 0.6), inset 0 2px 10px rgba(255, 255, 255, 0.3);
    transform: scale(0.98);
}

.service-btn.cosmic-next-btn {
    margin-top: 0;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    padding: 12px 40px;
    border-radius: 12px;
    background: rgba(0, 198, 255, 0.1);
    border: none;
    color: #00c6ff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.5), inset 0 0 10px rgba(0, 198, 255, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    display: none;
    cursor: pointer;
    animation: slideInFromRight 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    position: relative;
    overflow: hidden;
}

.service-btn.cosmic-next-btn:hover {
    animation: cosmicGlow 1.5s ease-in-out infinite !important;
}

.service-btn.cosmic-next-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 198, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes slideInFromRight {
    from { transform: translateX(300px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutToRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(300px); opacity: 0; }
}

@keyframes cosmicGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 198, 255, 0.5), inset 0 0 10px rgba(0, 198, 255, 0.2); }
    50% { box-shadow: 0 0 40px rgba(0, 198, 255, 0.8), inset 0 0 15px rgba(0, 198, 255, 0.4); }
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== BOOKING BUTTON ===== */
.booking-btn {
    background: #000033;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 14px 30px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    width: auto;
    margin: 20px auto 0;
    display: block;
    -webkit-user-select: none;
    user-select: none;
    animation: pulseBlueWhite 3s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(0, 50, 255, 0.4);
    transition: all 1s ease;
    position: relative;
    min-height: 44px;
    font-family: inherit;
}

@keyframes pulseBlueWhite {
    0% {
        background: #050520;
        color: #fff;
        box-shadow: 0 0 10px rgba(0, 50, 255, 0.4);
    }
    50% {
        background: #e0eaff;
        color: #000;
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    }
    100% {
        background: #050520;
        color: #fff;
        box-shadow: 0 0 10px rgba(0, 50, 255, 0.4);
    }
}

.booking-btn:hover {
    animation: none;
    background: #fff;
    color: #000;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
}

/* ===== RECEIPT CARD ===== */
.receipt-card {
    background: rgba(10, 10, 20, 0.6);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 25px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.05);
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 10px;
    line-height: 0.8; /* 🔴 FIX: Reduce line-height by 50% */
}

.receipt-header {
    text-align: center;
    font-weight: 300;
    padding-bottom: 15px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px; /* 🔴 FIX: Reduce from 12px to 6px */
    font-size: 14px;
}

.receipt-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-transform: uppercase;
}

.receipt-val {
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    text-align: right;
    color: rgba(0, 210, 255, 0.9);
}

/* ===== GRID LAYOUTS ===== */
.grid-options {
    display: grid;
    width: 100%;
    gap: 10px;
    max-width: 320px;
}

.grid-1-col {
    grid-template-columns: 1fr;
}

.grid-3-col {
    grid-template-columns: repeat(3, 1fr);
}

.grid-7-col {
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* ===== CALENDAR STYLES ===== */
.calendar-nav {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 320px;
    margin-bottom: 15px;
    color: #fff;
    font-weight: 300;
}

.nav-arrow {
    cursor: pointer;
    padding: 5px 15px;
    opacity: 0.7;
    -webkit-user-select: none;
    user-select: none;
    font-size: 18px;
    min-height: 44px;
    display: flex;
    align-items: center;
}

#calendar-grid .glass-btn {
    opacity: 0.3;
    animation: none;
    border-color: rgba(255, 255, 255, 0.1);
    cursor: default;
}

#calendar-grid .glass-btn.day-available {
    opacity: 1;
    border-color: rgba(0, 195, 255, 0.5);
    background: rgba(0, 195, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 195, 255, 0.2);
    cursor: pointer;
    animation: pulseBorder 4s infinite;
}

#calendar-grid .glass-btn.day-available:active {
    transform: scale(0.92);
    background: rgba(0, 195, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 195, 255, 0.5);
    transition: transform 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
}

/* ===== TIME GRID ===== */
#time-grid {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 5px;
}

#time-grid::-webkit-scrollbar {
    width: 3px;
}

#time-grid::-webkit-scrollbar-thumb {
    background: rgba(0, 195, 255, 0.4);
    border-radius: 10px;
}

#time-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 195, 255, 0.7);
}

#time-grid::-webkit-scrollbar-track {
    background: transparent;
}

#time-grid .glass-btn {
    border-radius: 12px;
}

#time-grid .glass-btn:not(.disabled):active {
    transform: scale(0.95);
    background: rgba(0, 195, 255, 0.25);
    box-shadow: 0 0 20px rgba(0, 195, 255, 0.5);
    transition: transform 0.1s ease, background 0.1s ease, box-shadow 0.1s ease;
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 15px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    font-weight: 500;
}

.error-message.show {
    opacity: 1;
}

/* ===== STEP SUMMARY ===== */
#step-summary {
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 40px;
    position: relative;
    z-index: 2;
    pointer-events: auto;
    overflow-y: auto;
    width: 100%;
}

.receipt-final-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
    margin-top: 10px;
}

.receipt-final-row .receipt-label {
    font-weight: 600;
    font-size: 13px;
}

.receipt-final-row .receipt-val {
    color: #4facfe;
    font-weight: 700;
    font-size: 16px;
}

/* Receipt Extras/Megasale Items */
#receipt-extras-list {
    margin-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 10px;
}

#receipt-extras-list .receipt-row {
    font-size: 12px;
    padding: 6px 0;
    border: none;
    margin: 0;
}

#receipt-extras-list .receipt-label {
    color: #46dcc8;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#receipt-extras-list .receipt-val {
    color: #46dcc8;
    font-size: 13px;
    font-weight: 600;
}

/* ===== MOBILE OPTIMIZATION ===== */
@media (max-width: 480px) {
    .main-container {
        max-width: 100%;
        padding: 15px;
    }

    .logo-container {
        height: 100px;
        margin-bottom: 15px;
    }

    .logo-title {
        font-size: 24px;
        letter-spacing: 3px;
    }

    .logo-subtitle {
        font-size: 9px;
        letter-spacing: 6px;
        margin-top: 8px;
    }

    .tech-input-container {
        max-width: 100%;
    }

    .tech-input-container input {
        font-size: 20px;
        padding: 12px 0;
    }

    .tech-placeholder {
        font-size: 20px;
    }

    .step-container {
        justify-content: center;
    }

    .glass-btn {
        padding: 12px;
        font-size: 13px;
        min-height: 48px;
    }


    .booking-btn {
        padding: 12px 25px;
        font-size: 13px;
        min-height: 48px;
        margin-top: 15px;
    }

    .receipt-card {
        padding: 20px;
        border-radius: 12px;
    }

    .receipt-header {
        font-size: 14px;
        padding-bottom: 12px;
        margin-bottom: 15px;
    }

    .receipt-row {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .receipt-label {
        font-size: 11px;
    }

    .grid-options {
        max-width: 100%;
    }

    .grid-7-col {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
    }

    .grid-3-col {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .calendar-nav {
        max-width: 100%;
        margin-bottom: 12px;
    }

    .nav-arrow {
        padding: 4px 12px;
        font-size: 16px;
        min-height: 44px;
    }

    #month-display {
        font-size: 14px;
    }

    .error-message {
        font-size: 11px;
        margin-top: 12px;
    }
}

@media (max-width: 375px) {
    .logo-title {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .glass-btn {
        padding: 10px;
        font-size: 12px;
    }


    .receipt-row {
        font-size: 12px;
    }

    .grid-7-col {
        gap: 2px;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media (max-height: 500px) {
    .main-container {
        padding: 10px;
    }

    .logo-container {
        height: 80px;
        margin-bottom: 10px;
    }

    .logo-title {
        font-size: 20px;
    }

    .step-container {
        justify-content: center;
    }

    .glass-btn {
        padding: 10px;
    }
}

/* ===== MEGASALE MODAL ===== */
.megasale-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.megasale-modal.show {
    display: flex;
    animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.megasale-card {
    width: 85%;
    max-width: 320px;
    background: #b8860b;
    border: none;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 0 30px rgba(218, 165, 32, 0.7),
                0 0 80px rgba(255, 215, 0, 0.35),
                inset 0 0 25px rgba(30, 20, 0, 0.55);
    color: #000;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}

.megasale-card::before,
.megasale-card::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 22px;
    background: rgba(0, 0, 0, 0.35);
    filter: blur(6px);
}

.megasale-card::before {
    left: -10px;
}

.megasale-card::after {
    right: -10px;
}

/* Row 1: Red blinking timer */
.megasale-row-1 {
    font-size: 13px;
    text-align: center;
    color: #ff0000;
    font-weight: 700;
    margin-bottom: 12px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.4; }
}

/* Row 2-3: Service name (2 lines) */
.megasale-row-23 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 12px;
    color: #000;
    font-weight: 700;
    line-height: 1.3;
}

/* Row 4: Discount left, Prices right */
.megasale-row-4 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    gap: 12px;
}

.megasale-discount {
    font-size: 18px;
    color: #ff0000;
    font-weight: 800;
    flex: 0 0 auto;
}

.megasale-prices-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.megasale-price-new {
    font-size: 18px;
    color: #000;
    font-weight: 700;
}

.megasale-price-old {
    font-size: 13px;
    text-decoration: line-through;
    color: rgba(0, 0, 0, 0.6);
}

.megasale-actions {
    display: flex;
    flex-direction: row;
    gap: 8px;
}

.megasale-btn {
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 14px;
    padding: 10px 8px;
    min-height: 44px;
    flex: 1;
}

.megasale-btn-primary {
    background: #ffd700;
    color: #000;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.6);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.megasale-btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}

.megasale-btn-secondary {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.2) 100%);
    background-size: 200% 100%;
    color: #000;
    font-size: 11px;
    font-weight: 400;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.megasale-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.3);
    animation: none;
}

.megasale-btn:active {
    transform: scale(0.98);
}
/* Services mode styling is defined above to match 777.html */

/* === RECEIPT STYLES === */
.receipt-wrapper {
    width: 100%;
    max-width: 100%; /* Force full expansion within parent padding */
    margin-top: 0; /* Reset negative shift */
    margin-bottom: 20px;
    transition: transform 1.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: fadeUp 1s forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.receipt-rise {
    transform: translateY(-100px);
}

.receipt-card {
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    background: rgba(10, 10, 20, 0.6);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 25px;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(255,255,255,0.05);
    font-family: 'Segoe UI', sans-serif;
    margin-bottom: 10px;
    line-height: 0.8; /* 🔴 FIX: Reduce by 50% */
}

.receipt-header {
    text-align: center;
    font-weight: 300;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
    letter-spacing: 1px;
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    border-bottom: none;
    padding-bottom: 0;
}

.receipt-label {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.receipt-val {
    font-weight: 500;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
    text-align: right;
    color: rgba(0, 210, 255, 0.9);
}

.receipt-final-row .receipt-val {
    font-size: 16px;
    font-weight: 600;
    color: #9ad8ff;
}

/* === BOOKING BUTTON === */
.booking-btn {
    background: #000033;
    color: #fff;
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    width: auto;
    margin: 0 auto;
    display: block;
    animation: pulseBlueWhite 3s infinite ease-in-out;
    box-shadow: 0 0 20px rgba(0, 50, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    font-weight: 600;
}

@keyframes pulseBlueWhite {
    0% {
        background: #050520;
        color: #fff;
        box-shadow: 0 0 10px rgba(0, 50, 255, 0.4);
    }
    50% {
        background: #e0eaff;
        color: #000;
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.8);
    }
    100% {
        background: #050520;
        color: #fff;
        box-shadow: 0 0 10px rgba(0, 50, 255, 0.4);
    }
}

.booking-btn:hover {
    box-shadow: 0 0 18px rgba(0, 100, 255, 0.35), 0 0 28px rgba(0, 100, 255, 0.2);
    transform: translateY(-1px);
}

.booking-btn:active {
    transform: translateY(0) scale(0.98);
}

#btn-book-again {
    margin-top: -27px; /* Shifted up by 12px (~3mm) */
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

/* ===== BUTTON FLY ANIMATIONS ===== */
@keyframes flyOutLeft {
    to {
        opacity: 0;
        transform: translateX(-100vw) scale(0.5);
    }
}

@keyframes flyInRight {
    from {
        opacity: 0;
        transform: translateX(100vw) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.booking-btn.fly-out-left {
    animation: flyOutLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.booking-btn.fly-in-right {
    animation: flyInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ===== TIME LOADER SPINNER ===== */
#time-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 0;
    width: 100%;
}

#time-loader.hidden {
    display: none;
}

.glass-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* ===== RECEIPT DOWNLOAD BUTTON ===== */
.receipt-download-btn {
    background: transparent;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    transition: all 0.3s ease;
    font-weight: 500;
    width: 40px;
    height: 40px;
}

.receipt-download-btn:hover {
    background: rgba(0, 210, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 210, 255, 0.4);
    transform: translateY(-2px);
}

.receipt-download-btn:active {
    transform: translateY(0) scale(0.95);
}

/* ===== RECEIPT FINISH STATE ===== */
.receipt-wrapper.finished {
    pointer-events: none;
    opacity: 0.7;
}

/* ===== RECEIPT RISE ANIMATION ===== */
.receipt-rise {
    transform: translateY(-100px);
    opacity: 0.8;
}

/* ===== EXTRA MENU FLIGHT MODE (COSMIC STYLE 3) ===== */
#services-list.flight-mode {
    display: block; /* Override grid/flex */
    position: relative;
    height: 55vh; /* Fixed height for scrolling */
    overflow-y: auto;
    scrollbar-width: none;
    padding: 200px 0 100px 0; /* Stretched upward: 200px top, 100px bottom */
    perspective: 1000px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

#services-list.flight-mode::-webkit-scrollbar {
    display: none;
}

/* Container for the infinite list */
.flight-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 0 20px;
}

.flight-cat-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.flight-cat-title {
    width: 100%;
    text-align: center;
    color: #ffd700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 5px;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
    opacity: 0.8;
}

/* FLIGHT CHIP BUTTONS */
.flight-chip {
    padding: 12px 22px;
    background: rgba(0, 195, 255, 0.05);
    border: none;
    border-radius: 40px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    box-shadow: 0 0 15px rgba(0, 195, 255, 0.15);
    backdrop-filter: blur(5px);
    cursor: pointer;
    
    /* Animation Init State */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease, background 0.3s, box-shadow 0.3s;
    transform: translateY(60px) scale(0.8);
    opacity: 0;
}

/* Active State (Selected) */
.flight-chip.active {
    background: #00c3ff;
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 25px #00c3ff, 0 0 50px rgba(0, 195, 255, 0.5);
    transform: translateY(0) scale(1) !important; /* Force scale on selection */
    opacity: 1 !important;
}

/* In-View State (Animation) */
.flight-chip.in-view {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Button "NEXT" for Flight Mode */
.flight-next-btn-container {
    position: absolute;
    bottom: 80px; 
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    z-index: 100;
}

.flight-next-btn {
    padding: 12px 40px;
    border-radius: 30px;
    background: rgba(0, 198, 255, 0.2);
    border: 1px solid rgba(0, 198, 255, 0.5);
    color: #fff;
    font-weight: 700;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
    display: none; /* Hidden by default */
    animation: fadeIn 0.5s ease;
}

/* GLOBAL NAVIGATION */
.nav-header {
    position: fixed; top: 10px; left: 0; width: 100%; padding: 0 15px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; pointer-events: none;
}
.nav-btn {
    pointer-events: auto; background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15); color: #fff;
    width: 40px; height: 40px; border-radius: 12px; font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; backdrop-filter: blur(8px);
    transition: all 0.3s ease; opacity: 0; transform: translateY(-20px);
}
.nav-btn.visible { opacity: 1; transform: translateY(0); }
.nav-btn:active { background: rgba(0, 195, 255, 0.3); transform: scale(0.9); }
.reset-btn { color: rgba(255, 215, 0, 0.8); border-color: rgba(255, 215, 0, 0.1); }

/* Shift calendar container up by ~2cm */
#step-calendar {
    padding-bottom: 80px;
}