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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #f8f9fa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

.container {
    background: white;
    max-width: 720px;
    width: 100%;
    padding: 2rem 2.5rem;
    border-radius: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.greeting {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #333;
}

.step {
    display: none;
    animation: fade 0.3s ease;
}
.step.active {
    display: block;
}

@keyframes fade {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 1.75rem;
}
.form-group label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
    color: #222;
}

.options-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.options-row button,
.options-list button {
    padding: 0.5rem 1.2rem;
    border: 1.5px solid #dee2e6;
    border-radius: 30px;
    background: #fafbfc;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.15s;
    color: #333;
}
.options-row button:hover,
.options-list button:hover {
    border-color: #228be6;
    background: #f1f8ff;
}
.options-row button.selected,
.options-list button.selected {
    border-color: #228be6;
    background: #228be6;
    color: white;
}

.track-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.track-btn {
    padding: 1rem 1.5rem;
    border: 2px solid #dee2e6;
    border-radius: 16px;
    background: #fafbfc;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-size: 1rem;
}
.track-btn:hover {
    border-color: #228be6;
    background: #f1f8ff;
    transform: translateY(-2px);
}
.track-btn strong {
    display: block;
    font-size: 1.1rem;
    color: #111;
}
.track-btn span {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
    font-weight: 400;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.options-list button {
    text-align: left;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 0.75rem;
}
.nav-buttons button {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 40px;
    background: #f1f3f5;
    color: #495057;
    cursor: pointer;
    transition: background 0.15s;
    flex: 1;
}
.nav-buttons button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.nav-buttons button#goal-next-btn,
.nav-buttons button#submit-btn {
    background: #228be6;
    color: white;
}
.nav-buttons button#goal-next-btn:hover:not(:disabled),
.nav-buttons button#submit-btn:hover:not(:disabled) {
    background: #1c7ed6;
}
.nav-buttons button#goal-back-btn:hover:not(:disabled),
.nav-buttons button#questions-back-btn:hover:not(:disabled) {
    background: #e9ecef;
}

#questions-container {
    margin-top: 1rem;
}
.question-block {
    margin-bottom: 1.5rem;
}
.question-block label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
    color: #222;
}
.question-block .hint {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.question-block input[type="text"],
.question-block textarea {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fafbfc;
}
.question-block input:focus,
.question-block textarea:focus {
    outline: none;
    border-color: #228be6;
    background: white;
}
.question-block textarea {
    resize: vertical;
    min-height: 60px;
}

.file-upload {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.file-upload label {
    font-weight: 400;
    color: #228be6;
    cursor: pointer;
    padding: 0.4rem 1rem;
    border: 1.5px dashed #dee2e6;
    border-radius: 12px;
    transition: all 0.2s;
    background: #fafbfc;
}
.file-upload label:hover {
    border-color: #228be6;
    background: #f1f8ff;
}
.file-upload input[type="file"] {
    display: none;
}
.file-name {
    font-size: 0.9rem;
    color: #495057;
}

#result-content {
    margin: 1.5rem 0;
    padding: 1.25rem;
    border-radius: 12px;
    background: #f1f8ff;
    border-left: 4px solid #228be6;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

#restart-btn {
    padding: 0.6rem 2rem;
    background: #f1f3f5;
    border: none;
    border-radius: 40px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
#restart-btn:hover {
    background: #e9ecef;
}

@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }
    .options-row button {
        flex: 1 0 auto;
    }
}