:root {
    --bg-color: #f5f5f7;
    --card-bg: rgba(255, 255, 255, 0.8);
    --text-color: #1d1d1f;
    --accent-color: #0071e3;
    --secondary-text: #86868b;
    --border-radius: 20px;
    --transition-speed: 0.4s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 40px 20px;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent-color);
    width: 0%;
    transition: width var(--transition-speed) ease;
}

.step-counter {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 13px;
    color: var(--secondary-text);
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}


.step {
    display: none;
    animation: fadeIn var(--transition-speed) ease;
}

.step.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

p.subtitle {
    color: var(--secondary-text);
    margin-bottom: 30px;
    font-size: 17px;
}

.question-label {
    font-size: 19px;
    font-weight: 500;
    margin-bottom: 20px;
    display: block;
}

input[type="text"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    outline: none;
    transition: border-color 0.2s;
    background: #fff;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-color);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.option-button {
    padding: 18px;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-size: 17px;
    transition: all 0.2s;
    display: block;
    width: 100%;
}

.option-button:hover {
    background: #f5f5f7;
}

.option-button.selected {
    border-color: var(--accent-color);
    background: rgba(0, 113, 227, 0.05);
}

.controls {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    padding-top: 30px;
}

button.primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

button.primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.secondary {
    background: transparent;
    color: var(--accent-color);
    border: none;
    padding: 12px 20px;
    font-size: 17px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Range input styling */
.range-container {
    margin-top: 20px;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-color);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    color: var(--secondary-text);
    font-size: 14px;
    margin-top: 10px;
}

.reset-bar {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #d2d2d7;
    padding-top: 15px;
}

.reset-link {
    background: none;
    border: none;
    color: var(--secondary-text);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.reset-link:hover {
    color: #ff3b30;
}

/* Success screen */
.success-icon {
    width: 80px;
    height: 80px;
    background: #e1f5fe;
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: iconPulse 2s infinite;
}

.success-icon svg {
    width: 40px;
    height: 40px;
}

.thanks-actions {
    margin-top: 40px;
}

.small-info {
    font-size: 12px;
    color: var(--secondary-text);
    margin-top: 20px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

@keyframes iconPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(0, 122, 255, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}
