/* style.css */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.survey-container {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 800px;
    width: 100%;
    margin-top: 40px;
    margin-bottom: 40px;
    animation: fadeIn 0.5s ease-out;
}

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

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.question-block {
    margin-bottom: 30px;
    padding: 20px;
    border-radius: var(--border-radius);
    background: #fff;
    border: 1px solid #eee;
    transition: var(--transition);
}

.question-block:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.1);
}

.question-text {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: block;
}

.options-list {
    list-style: none;
    padding: 0;
}

.option-item {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.option-item input {
    margin-right: 10px;
    cursor: pointer;
}

.free-text-area {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    min-height: 100px;
    resize: vertical;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 20px;
}

.submit-btn:hover {
    background: #357abd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

#message {
    margin-top: 20px;
    padding: 15px;
    border-radius: var(--border-radius);
    text-align: center;
    display: none;
}

#message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Loading state */
.loading {
    display: none;
    text-align: center;
    margin-top: 20px;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-left-color: var(--primary-color);
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Multi-page sections */
.survey-section {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.survey-section.active {
    display: block;
}

.section-title {
    color: #555;
    font-size: 1.4rem;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.progress-indicator {
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 20px;
}

.section-nav {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.nav-btn {
    flex: 1;
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.next-btn {
    background: var(--primary-color);
    color: white;
    border: none;
}

.next-btn:hover {
    background: #357abd;
}

.prev-btn {
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.prev-btn:hover {
    background: #f9f9f9;
}
