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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.section {
    display: none;
}

.section.active {
    display: block;
}

h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

p {
    color: #666;
    margin-bottom: 20px;
}

.pin-input-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.pin-input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    letter-spacing: 8px;
    text-align: center;
}

.pin-input-group input:focus {
    outline: none;
    border-color: #667eea;
}

button {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

button:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.submit-btn {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    font-size: 18px;
}

.link-btn {
    background: none;
    color: #667eea;
    padding: 4px 0;
    margin-bottom: 16px;
    font-size: 14px;
}

.link-btn:hover {
    background: none;
    color: #5a67d8;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

.error {
    color: #e53e3e;
    background: #fff5f5;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.success {
    color: #38a169;
    background: #f0fff4;
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.hidden {
    display: none;
}

/* Questionnaire list */
.list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.list-item:hover {
    border-color: #667eea;
    background: #f7f8ff;
}

.list-item .count {
    color: #888;
    font-size: 14px;
}

.list-item a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
}

/* Form questions */
.question {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.question-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 16px;
}

.question input[type="text"],
.question input[type="email"],
.question input[type="number"],
.question textarea,
.question select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.question input:focus,
.question textarea:focus,
.question select:focus {
    outline: none;
    border-color: #667eea;
}

.question textarea {
    resize: vertical;
    min-height: 80px;
}

.question input[type="radio"],
.question input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 5px 0;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
    color: #555;
}

.question select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }

    .pin-input-group {
        flex-direction: column;
    }
}
