/* 避难所人员应急管理系统 (ShelterIMS) v5.0 */
/* 幸存者端样式 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    padding-bottom: 80px; /* 为SOS栏留出空间 */
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header h1 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 10px;
}

header p {
    color: #7f8c8d;
    font-size: 1em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.input-with-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label {
    white-space: nowrap;
    font-weight: normal;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #219653;
}

.qr-container {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
}

.qr-container #qrcode {
    margin: 20px auto;
    display: inline-block;
}

/* SOS固定悬浮栏 */
.sos-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    padding: 15px;
    text-align: center;
    z-index: 10000;
}

.sos-btn {
    width: 100%;
    padding: 18px;
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    animation: sos-pulse 2s infinite;
}

@keyframes sos-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 90%;
    width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-content h3 {
    margin-bottom: 15px;
    color: #e74c3c;
}

.modal-buttons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-confirm {
    padding: 10px 20px;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

.btn-cancel {
    padding: 10px 20px;
    background-color: #95a5a6;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex: 1;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        margin: 0;
        padding: 15px;
        border-radius: 0;
        box-shadow: none;
    }
    
    header h1 {
        font-size: 1.5em;
    }
    
    .input-with-checkbox {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .sos-btn {
        padding: 15px;
        font-size: 18px;
    }
}

/* 错误状态 */
.error {
    border-color: #e74c3c !important;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3) !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    display: block;
}