:root {
    --primary: #BA7626; /* Main Tone */
    --primary-light: #d68e3d;
    --accent: #89500C; /* Darker Tone */
    --bg-light: #faf7f2;
    --text-main: #2a1f15;
    --text-muted: #7a6a5d;
    --border-color: #e5dfd9;
    --shadow: 0 15px 40px rgba(186, 118, 38, 0.12);
    --glass-bg: rgba(255, 255, 255, 0.96);
    --radius: 14px;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Background Decorations */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    opacity: 0.4;
    border-radius: 50%;
}

.blob-1 {
    width: 500px;
    height: 500px;
    background: #f8eee4;
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #fdf5e6;
    bottom: -100px;
    left: -100px;
}

/* Container */
.app-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

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

.header-link {
    margin-top: 20px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #BA7626, #89500C);
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(137, 80, 12, 0.3);
}

.text-link:hover {
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(137, 80, 12, 0.4);
    background: linear-gradient(135deg, #d48a35, #a36214);
}

.text-link svg {
    stroke: white;
}

.logo-container {
    margin-bottom: 10px;
}

.main-logo {
    max-width: 320px;
    height: auto;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Progress Bar */
.progress-bar {
    margin-bottom: 40px;
}

.progress-track {
    height: 6px;
    background: #eee;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 33.33%;
    background: linear-gradient(90deg, #BA7626, #89500C);
    transition: width 0.5s ease;
}

.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.step-dot {
    width: 8px;
    height: 8px;
    background: #ddd;
    border-radius: 50%;
    transition: var(--transition);
}

.step-dot.active {
    width: 24px;
    border-radius: 10px;
    background: var(--primary);
}

/* Form Styles */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

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

.step-header {
    margin-bottom: 30px;
}

.step-header h2 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.notice {
    color: #b45309;
    background: #fffbeb;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-block;
    border: 1px solid #fef3c7;
}

/* Treatment Grid */
.treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}

.checkbox-card {
    cursor: pointer;
}

.checkbox-card input {
    display: none;
}

.card-content {
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
}

.checkbox-card input:checked + .card-content {
    border-color: var(--primary);
    background: #f0fdf4;
    box-shadow: 0 4px 12px rgba(45, 90, 39, 0.1);
}

.code {
    background: #f3f4f6;
    color: var(--text-muted);
    font-weight: 700;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    margin-right: 12px;
    font-size: 0.8rem;
}

.checkbox-card input:checked + .card-content .code {
    background: var(--primary);
    color: white;
}

/* Date Selection Spacing */
.date-selection .input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
    width: 100%;
    max-width: 320px; /* 너비 제한 */
}

.date-selection input[type="date"] {
    display: block;
    width: 100%;
    min-height: 44px;
    -webkit-appearance: none;
}

/* Custom Select for Nationality */
.custom-select {
    position: relative;
    width: 100%;
    cursor: pointer;
    margin-bottom: 20px;
}

.select-trigger {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.custom-select:hover .select-trigger {
    border-color: var(--primary);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-top: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    animation: fadeIn 0.2s ease;
}

.custom-select.active .select-options {
    display: block;
}

.option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background 0.2s;
}

.option:hover {
    background: #f8f1e9;
}

.fi {
    border-radius: 2px;
}

/* Inputs */
.input-field {
    margin-bottom: 20px;
}

.input-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Intl-Tel-Input Fixes */
.iti {
    width: 100%;
}

.iti__flag-container {
    padding: 2px;
}

/* Date Range Group */
.date-range-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-input-wrapper {
    flex: 1;
    position: relative;
}

.input-tag {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.range-separator {
    margin-top: 20px;
    font-weight: bold;
    color: var(--primary);
}

@media (max-width: 480px) {
    .date-range-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .range-separator {
        display: none;
    }
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(45, 90, 39, 0.1);
}

.hint {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Radio groups */
.radio-groups {
    margin-top: 30px;
}

.radio-field {
    margin-bottom: 24px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 400;
}

/* Policy Box */
.policy-box {
    background: #f9fafb;
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border-left: 4px solid var(--primary);
}

.policy-box p {
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.checkbox-simple {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

/* Buttons */
.actions {
    display: flex;
    justify-content: center; /* 중앙 정렬 */
    gap: 20px; /* 버튼 사이 간격 */
    margin-top: 60px; /* 상단 간격 확대 */
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #BA7626, #89500C);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f3f4f6;
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #e5e7eb;
}

.btn-submit {
    background: var(--primary);
    color: white;
    padding: 12px 32px;
}

.btn-submit:hover {
    background: var(--accent); /* #89500C */
    transform: translateY(-2px);
}

/* Success Message */
.success-message {
    text-align: center;
    padding: 40px 0;
}

.success-icon {
    margin-bottom: 20px;
}

.success-message h2 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        margin: 0;
        border-radius: 0;
        padding: 24px;
    }
    
    .grid-inputs {
        grid-template-columns: 1fr;
    }
    
    .treatment-grid {
        grid-template-columns: 1fr;
    }
    
    .clinic-name {
        font-size: 1.8rem;
    }
}

.footer {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.footer-info {
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-info p {
    margin-bottom: 4px;
}

.copyright {
    opacity: 0.7;
    margin-top: 20px;
}
