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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: #6b7280;
    font-size: 0.875rem;
}

.lead-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group input.error {
    border-color: #ef4444;
}

.error-message {
    display: block;
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.header p {
    color: #6b7280;
    font-size: 1rem;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 2rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #2563eb;
    transition: width 0.3s ease;
}

/* Question Card */
.question-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.question-card h2 {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.required {
    color: #ef4444;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-label {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: #eff6ff;
}

.option-label.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.option-label span {
    color: #374151;
    flex: 1;
}

/* Rating */
.rating-container {
    margin-bottom: 1rem;
}

.rating-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-button {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rating-button:hover {
    background: #f3f4f6;
}

.rating-button.selected {
    background: #2563eb;
    border-color: #2563eb;
    color: white;
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0 0.5rem;
}

/* Textarea */
textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    transition: border-color 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: #2563eb;
}

/* Navigation */
.navigation {
    display: flex;
    justify-content: space-between;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: transparent;
    color: #6b7280;
}

.btn-secondary:hover:not(:disabled) {
    background: #f3f4f6;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #15803d;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Completion Screen */
.completion-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
}

.completion-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: #16a34a;
}

.completion-card h2 {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.completion-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.next-steps {
    background: #eff6ff;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
}

.next-steps strong {
    display: block;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.next-steps ul {
    list-style: none;
    color: #374151;
}

.next-steps li {
    padding: 0.25rem 0;
}

/* Utility */
.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    /* Tablets */
    .modal-content {
        max-width: 90%;
    }
    
    .container {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    /* Small tablets and large phones */
    body {
        padding: 1rem 0.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 0;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .lead-form {
        padding: 1.5rem;
    }
    
    .question-card {
        padding: 1.5rem;
    }
    
    .question-card h2 {
        font-size: 1.1rem;
    }
    
    .option-label {
        padding: 0.75rem;
        font-size: 0.875rem;
    }
    
    .rating-button {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    /* Mobile phones */
    body {
        padding: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.25rem;
    }
    
    .header p {
        font-size: 0.875rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .progress-container {
        margin-bottom: 1.5rem;
    }
    
    .progress-info {
        font-size: 0.75rem;
    }
    
    .question-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .question-card h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .option-label {
        padding: 0.65rem;
        font-size: 0.813rem;
    }
    
    .option-label input[type="radio"],
    .option-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
        margin-right: 0.5rem;
    }
    
    .rating-buttons {
        gap: 0.35rem;
    }
    
    .rating-button {
        padding: 0.65rem 0.5rem;
        font-size: 0.938rem;
    }
    
    .rating-labels {
        font-size: 0.688rem;
        padding: 0 0.25rem;
    }
    
    textarea {
        padding: 0.75rem;
        font-size: 0.938rem;
    }
    
    .navigation {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.938rem;
    }
    
    .form-group input {
        padding: 0.65rem;
        font-size: 0.938rem;
    }
    
    .btn-block {
        margin-top: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Small mobile phones */
    .modal-content {
        border-radius: 8px;
    }
    
    .question-card {
        border-radius: 8px;
        padding: 1rem;
    }
    
    .option-label {
        padding: 0.6rem;
    }
    
    .rating-buttons {
        gap: 0.25rem;
    }
    
    .rating-button {
        padding: 0.6rem 0.4rem;
        font-size: 0.875rem;
        min-width: 0;
    }
    
    .navigation {
        flex-direction: column-reverse;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .completion-card {
        padding: 1.5rem;
    }
    
    .completion-icon {
        width: 48px;
        height: 48px;
    }
    
    .completion-card h2 {
        font-size: 1.25rem;
    }
    
    .next-steps {
        padding: 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    /* Very small phones */
    .header h1 {
        font-size: 1.1rem;
    }
    
    .question-card h2 {
        font-size: 0.938rem;
    }
    
    .option-label {
        font-size: 0.75rem;
    }
    
    .rating-button {
        font-size: 0.813rem;
        padding: 0.5rem 0.3rem;
    }
}