/**
 * 通用样式 - 在线组局平台
 * 包含：重置样式、通用类、按钮、表单、弹窗等
 */

/* ========== CSS变量定义（主题色） ========== */
:root {
    /* 主题渐变色 */
    --theme-gradient: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    --theme-shadow: rgba(166, 192, 239, 0.4);
    
    /* 主题单色 */
    --theme-primary: #a6c0ef;
    --theme-secondary: #fbd7f2;
}

/* ========== 重置样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f5f5;
    padding-bottom: 60px;
}

/* ========== 容器 ========== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 15px;
}

/* ========== 按钮样式 ========== */
.edit-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.edit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.view-all-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.action-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f44336;
    color: white;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 10px;
}

/* ========== 表单样式 ========== */
.form-group {
    margin-bottom: 20px;
}

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

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #a6c0ef;
}

.form-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* ========== 模态框 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    margin: 20px;
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.modal-body {
    padding: 20px;
}

/* ========== 消息提示 ========== */
.message-box {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    color: #1976d2;
    animation: fadeIn 0.3s;
}

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

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 13px;
}

/* ========== 通用弹窗样式 ========== */
.logout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.logout-modal.show {
    display: flex;
}

.logout-modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 320px;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

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

.logout-modal-header {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.logout-modal-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.logout-modal-title {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
}

.logout-modal-body {
    padding: 24px;
    text-align: center;
    color: #666;
    line-height: 1.6;
}

.logout-modal-buttons {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
}

.logout-modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-modal-btn-danger {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
}

.logout-modal-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.logout-modal-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.logout-modal-btn-cancel:hover {
    background: #e0e0e0;
}

.logout-modal-btn-confirm {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
}

.logout-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(166, 192, 239, 0.4);
}

.logout-modal-btn-confirm:active {
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
}

/* ========== 性别选择 ========== */
.sex-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.sex-option {
    display: none;
}

.sex-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.sex-label:hover {
    border-color: #a6c0ef;
}

.sex-option:checked + .sex-label {
    border-color: #a6c0ef;
    background: linear-gradient(135deg, #a6c0ef 0%, #fbd7f2 100%);
    color: white;
}

