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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.booking-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    flex: 1;
    position: relative;
    overflow: hidden;
}

.booking-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ee5a24, #ff9ff3, #54a0ff);
}

.step {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 25px;
}

.step-title {
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.step-subtitle {
    color: #7f8c8d;
    font-size: 14px;
}

.service-options,
.detail-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

.service-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.service-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.service-btn.manicure {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.3);
}

.service-btn.pedicure {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d7 100%);
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(210, 153, 194, 0.3);
}

/* Детальный выбор услуг */
.detail-options {
    display: grid;
    gap: 15px;
    margin-bottom: 20px;
}

/* По умолчанию: белый фон, фиолетовый текст */
.detail-option {
    text-align: left;
    padding: 20px;
    border: 2px solid #ffffff;
    border-radius: 15px;
    background: #ffffff;
    /* белый фон */
    color: #000000;
    /* фиолетовый текст */
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    cursor: pointer;
    transition: all 0.2s ease;
}

.detail-option:hover {
    transform: none;
    /* Убираем всплытие, чтобы корректно работало в Telegram WebApp */
}

/* При выборе: фиолетовый фон, белый текст */
.detail-option.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Детали услуги внутри кнопки */
.service-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: inherit;
}

.service-description {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    line-height: 1.4;
    color: inherit;
}

.service-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
}

.service-price {
    font-size: 16px;
    font-weight: 700;
    color: inherit;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.calendar-header {
    text-align: center;
    font-weight: 600;
    color: #7f8c8d;
    padding: 10px 0;
    font-size: 12px;
}

.calendar-day {
    aspect-ratio: 1;
    border: none;
    border-radius: 10px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover:not(.disabled) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.calendar-day.disabled {
    background: #dee2e6;
    color: #adb5bd;
    cursor: not-allowed;
}

.calendar-day.unavailable {
    background: #ffebee;
    color: #e57373;
    cursor: not-allowed;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.time-slot {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.time-slot:hover:not(.unavailable) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: translateY(-1px);
}

.time-slot.selected {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.time-slot.unavailable {
    background: #ffebee;
    color: #e57373;
    cursor: not-allowed;
}

.summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.summary-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    font-weight: 600;
    color: #495057;
}

.summary-value {
    color: #6c757d;
    font-weight: 500;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    padding: clamp(10px, 4vw, 18px) clamp(10px, 4vw, 30px);
    color: white;
    font-size: clamp(12px, 4vw, 16px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    background: #dee2e6;
    color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid #dee2e6;
    color: #6c757d;
    margin-right: 10px;
    width: auto;
    flex: 1;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between
}

.btn-help {
    margin-top: 10px;
    /* Отступ сверху */
    display: inline-block;
}

.progress-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.month-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.month-nav button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #667eea;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.month-nav button:hover {
    background: #f8f9fa;
}
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading p {
    color: #666;
    font-size: 16px;
}