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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    width: 100%;
    min-height: 100vh;
    background: white;
    display: flex;
    flex-direction: column;
}

.header {
    background: #ffffff;
    color: #333;
    padding: 30px;
    padding-top: 100px !important;
    text-align: center;
}

.title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.form-container {
    padding: 30px;
    padding-left: max(30px, env(safe-area-inset-left, 0px));
    padding-right: max(30px, env(safe-area-inset-right, 0px));
    padding-bottom: max(30px, env(safe-area-inset-bottom, 0px));
    flex: 1;
}

/* 用户信息展示区 */
.user-info-display {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.info-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.edit-btn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* 首次使用提示 */
.first-time-tip {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    margin-bottom: 20px;
}

.tip-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.tip-desc {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.setup-btn {
    background: white;
    color: #667eea;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.setup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* 编辑表单 */
.edit-form {
    margin-top: 20px;
}

.edit-form .form-group {
    margin-bottom: 20px;
}

.save-btn {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

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

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

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

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.status-card {
    background: #f0f7ff;
    border-left: 4px solid #4caf50;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-card.warning {
    background: #fff8e1;
    border-left-color: #ff9800;
}

.status-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.status-text {
    flex: 1;
}

.status-title {
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 4px;
}

.status-desc {
    font-size: 13px;
    color: #666;
}

.checkin-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.checkin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.checkin-btn:active {
    transform: translateY(0);
}

.checkin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tips {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 16px;
    text-align: center;
}

.tips-text {
    font-size: 13px;
    color: #6c757d;
    line-height: 1.6;
    margin: 0;
}

.footer {
    padding: 20px 30px;
    padding-left: max(30px, env(safe-area-inset-left, 0px));
    padding-right: max(30px, env(safe-area-inset-right, 0px));
    padding-bottom: max(20px, env(safe-area-inset-bottom, 0px));
    text-align: center;
    font-size: 12px;
    color: #999;
    border-top: 1px solid #f0f0f0;
}

.footer a {
    color: #667eea;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover,
.close:focus {
    color: #000;
}

#modalTitle {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

#modalBody {
    line-height: 1.8;
    color: #666;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 480px) {
    .container {
        border-radius: 0;
    }
    
    .header {
        padding: 30px 20px;
    }
    
    .title {
        font-size: 28px;
    }
    
    .form-container {
        padding: 20px;
    }
}
