@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
    --primary: #f857f8;
    --primary-hover: #e03ee0;
    --bg-color: #111;
    --card-bg: #ffffff;
    --text-main: #333333;
    --text-muted: #888888;
    --border-color: #dddddd;
    --btn-gray: #f2f2f2;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background: url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    background-attachment: fixed;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 1;
}

.reservation-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 500px;
    min-height: 600px;
    border-radius: 16px;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transform: translateY(0);
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(40px); }
    100% { opacity: 1; transform: translateY(0); }
}

.header {
    text-align: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: #fdfdfd;
}

.header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-main);
}

.progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px 0;
    gap: 15px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    color: var(--border-color);
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.step-label {
    font-size: 0.75rem;
    color: var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-line {
    width: 60px;
    height: 1px;
    background: var(--border-color);
    margin-bottom: 25px;
    transition: background 0.3s ease;
}

.step-indicator.active .step-circle {
    border-color: var(--primary);
    color: var(--primary);
}

.step-indicator.completed .step-circle {
    border-color: var(--primary);
    color: var(--primary);
}
.step-indicator.completed .step-circle i {
    color: var(--primary);
}

.step-indicator.active .step-label,
.step-indicator.completed .step-label {
    color: var(--text-muted);
}

.step-line.completed {
    background: var(--primary);
}

.view-container {
    padding: 0 32px 32px 32px;
    flex: 1;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-container.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

h2.view-title {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 24px;
}

/* Step 1: People */
.people-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    margin-top: 10px;
}

.circle-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: var(--btn-gray);
    color: var(--text-main);
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 0 2px transparent;
}

.circle-btn:hover {
    background: #e9e9e9;
    transform: scale(1.05);
}

.circle-btn.selected {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(248, 87, 248, 0.4);
    transform: scale(1.1);
}

/* Step 2: Calendar */
.calendar-wrapper {
    width: 100%;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.calendar-header button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
}

.calendar-days-label {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-main);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cal-day:not(.disabled):hover {
    background: var(--btn-gray);
}

.cal-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

.cal-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(248, 87, 248, 0.4);
}

/* Step 3: Time */
.time-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.time-btn {
    padding: 14px 0;
    border-radius: 12px;
    border: none;
    background: var(--btn-gray);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.time-btn:hover {
    background: #e9e9e9;
    transform: translateY(-2px);
}

.time-btn.selected {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(248, 87, 248, 0.4);
    transform: translateY(-2px);
}

/* Step 4 & 5: Form */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
    text-transform: uppercase;
}
.form-group label span { color: #e74c3c; font-weight: normal; font-size: 0.7rem; text-transform: none; }

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(248, 87, 248, 0.1);
}

textarea.form-control {
    resize: none;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") right 16px center/14px no-repeat;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}
.input-with-icon .prefix {
    position: absolute;
    left: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 5px;
}
.input-with-icon .form-control {
    padding-left: 60px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    cursor: pointer;
}

.checkbox-group input {
    margin-top: 3px;
    accent-color: var(--primary);
    width: 16px; height: 16px;
}

.checkbox-group span {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.actions {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 24px;
}

.btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.btn-back {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-back:hover {
    background: rgba(248, 87, 248, 0.05);
}

.btn-next, .btn-submit {
    background: var(--primary);
    color: white;
    margin-left: auto;
    box-shadow: 0 4px 10px rgba(248, 87, 248, 0.3);
}

.btn-next:hover, .btn-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(248, 87, 248, 0.4);
}

.btn-next:disabled, .btn-submit:disabled {
    background: #ccc;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.success-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--card-bg);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-icon {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 24px;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.loading { background: #ccc !important; position: relative; }
.loading::after {
    content: '';
    position: absolute; width: 16px; height: 16px;
    background: transparent; border: 2px solid #fff;
    border-top-color: transparent; border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { 100% {transform: rotate(360deg);} }
