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

body {
    min-height: 100vh;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

header h1 {
    color: #333;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.1rem;
}

.survey-selector h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.survey-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.survey-btn {
    padding: 20px;
    font-size: 1.2rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.survey-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.loading {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
}

.survey-container {
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none;
}

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

.survey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.survey-header h2 {
    color: #333;
    font-size: 1.5rem;
}

/* Tab样式 - 支持换行 */
.tabs-wrapper {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 20px;
}

.tabs-scroll {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tab-btn {
    padding: 10px 18px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #333;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    min-height: 300px;
    padding-bottom: 80px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-group label,
.checkbox-group label {
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-group input,
.checkbox-group input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background: white;
    border-top: 2px solid #f0f0f0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn:not(.btn-primary):not(.btn-danger) {
    background: #95a5a6;
    color: white;
}

.btn:not(.btn-primary):not(.btn-danger):hover {
    background: #7f8c8d;
}

.saved-indicator {
    font-size: 0.8em;
    color: #95a5a6;
}

.survey-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.item-id {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.item-question {
    color: white;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
}

.card-content {
    padding: 20px;
}

.status-group {
    margin-bottom: 20px;
}

.select-group {
    margin-bottom: 20px;
}

.select-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

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

.field-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

/* Radio选项一行显示 */
.status-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    cursor: pointer;
    white-space: nowrap;
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
}

.remark-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.remark-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.empty-section {
    color: #95a5a6;
    font-style: italic;
    padding: 10px 0;
}

.empty-survey {
    text-align: center;
    padding: 40px;
    color: #95a5a6;
}

.empty-survey p {
    font-size: 1.1rem;
}

.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s ease;
}

.save-notification.success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.save-notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

@media (max-width: 768px) {

    header h1 {
        font-size: 2rem;
    }

    .survey-header {
        gap: 10px;
        padding: 15px;
    }

    .survey-header h2 {
        font-size: 1.2rem;
    }

    .tabs-scroll {
        gap: 4px;
    }

    .tab-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .status-group {
        gap: 15px;
    }

    .card-header {
        flex-direction: column;
        gap: 8px;
    }

    .item-id {
        align-self: flex-start;
    }

    .form-actions {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn {
        min-width: calc(30% - 10px);
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}