* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    color: #fff;
    overflow-y: auto;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 15px 0;
    flex-shrink: 0;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #f39c12;
    text-align: center;
}

.address {
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

.header-phone {
    color: #f39c12;
    font-size: 2rem;
    font-weight: bold;
    margin: 5px 0 0 0;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

.footer-phone {
    color: #f39c12;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 0 0 10px 0;
}

.subtitle-block {
    flex-shrink: 0;
    padding: 10px 15px;
}

.subtitle {
    color: #bdc3c7;
    font-size: 0.95rem;
    text-align: left;
    margin: 0;
}

.date-header {
    margin-bottom: 10px;
}

.date-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.booking-form {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

.price-display {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.2) 0%, rgba(230, 126, 34, 0.2) 100%);
    border: 2px solid rgba(243, 156, 18, 0.5);
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.price-label {
    color: #bdc3c7;
    font-size: 0.95rem;
    font-weight: 500;
}

.price-value {
    color: #f39c12;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

@media (max-width: 768px) {
    .price-display {
        flex-direction: column;
        text-align: center;
    }
    
    .price-value {
        font-size: 1.3rem;
    }
}

.booking-form::-webkit-scrollbar {
    width: 6px;
}

.booking-form::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.booking-form::-webkit-scrollbar-thumb {
    background: rgba(243, 156, 18, 0.5);
    border-radius: 3px;
}

.form-section {
    margin-bottom: 15px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #f39c12;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #bdc3c7;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input[type="date"] {
    padding: 12px 15px;
    font-size: 1rem;
    cursor: pointer;
    min-height: 45px;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
    width: 20px;
    height: 20px;
}

.date-section input[type="date"] {
    padding: 14px 18px;
    font-size: 1.05rem;
    cursor: pointer;
    min-height: 50px;
    background: #ffffff;
    border-color: rgba(243, 156, 18, 0.5);
    color: #1a1a2e;
    border-radius: 15px;
}

.date-section input[type="date"]:focus {
    background: #ffffff;
    border-color: #f39c12;
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

.date-section input[type="date"]::-webkit-calendar-picker-indicator {
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #f39c12;
}

.form-group input::placeholder {
    color: #7f8c8d;
}

.form-group select option {
    background: #1a1a2e;
    color: #fff;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
}

.time-slots::-webkit-scrollbar {
    width: 6px;
}

.time-slots::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.time-slots::-webkit-scrollbar-thumb {
    background: rgba(243, 156, 18, 0.5);
    border-radius: 3px;
}

.time-slot {
    padding: 10px 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.time-slot:hover {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
}

.time-slot.selected {
    border-color: #f39c12;
    background: #f39c12;
    color: #1a1a2e;
}

.time-slot.booked {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(231, 76, 60, 0.3);
    border-color: #e74c3c;
}

.info-text {
    color: #7f8c8d;
    font-style: italic;
    font-size: 0.9rem;
}

.info-text.no-slots {
    color: #e74c3c;
    font-style: normal;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    padding: 20px 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, opacity 0.3s;
    flex-shrink: 0;
}

.submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(243, 156, 18, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.success-message,
.error-message {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.success-message h2 {
    color: #2ecc71;
    margin-bottom: 15px;
}

.error-message h2 {
    color: #e74c3c;
    margin-bottom: 15px;
}

.success-message p,
.error-message p {
    color: #bdc3c7;
    margin-bottom: 20px;
}

footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
}

/* Адаптивность для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 95%;
        padding: 15px;
    }

    header h1 {
        font-size: 2.2rem;
    }

    .booking-form {
        padding: 25px;
    }
}

/* Адаптивность для мобильных устройств - с прокруткой */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
    }

    .container {
        max-width: 100%;
        padding: 10px;
        max-height: none;
        overflow: visible;
        display: block;
    }

    header {
        padding: 25px 0;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .address {
        font-size: 0.95rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .booking-form {
        padding: 20px;
        border-radius: 15px;
        overflow: visible;
    }

    .form-section {
        margin-bottom: 20px;
    }

    .form-section h2 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group input,
    .form-group select {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .date-section input[type="date"] {
        padding: 16px 20px;
        font-size: 1.1rem;
        min-height: 55px;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(85px, 1fr));
        gap: 8px;
        max-height: none;
        overflow: visible;
    }

    .time-slot {
        padding: 10px;
        font-size: 0.9rem;
    }

    .submit-btn {
        padding: 14px;
        font-size: 1.1rem;
    }

    .success-message,
    .error-message {
        padding: 30px 20px;
    }
}

/* Адаптивность для маленьких экранов */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .address {
        font-size: 0.85rem;
    }

    .footer-phone {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .booking-form {
        padding: 15px;
        border-radius: 12px;
    }

    .form-section h2 {
        font-size: 1rem;
    }

    .date-section input[type="date"] {
        padding: 14px 16px;
        font-size: 1rem;
        min-height: 50px;
    }

    .time-slots {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 6px;
    }

    .time-slot {
        padding: 8px 5px;
        font-size: 0.85rem;
        border-radius: 8px;
    }

    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    .submit-btn {
        padding: 12px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .success-message h2,
    .error-message h2 {
        font-size: 1.2rem;
    }

    .success-message p,
    .error-message p {
        font-size: 0.95rem;
    }

    footer {
        padding: 20px 0;
        font-size: 0.85rem;
    }
}

/* Улучшение для touch-устройств */
@media (hover: none) and (pointer: coarse) {
    .time-slot {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-group input,
    .form-group select,
    .submit-btn {
        min-height: 44px;
    }
}
