/* 全局重置+浪漫基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", "SimHei", sans-serif;
}


/* 新增：头像展示样式 */
.avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: clamp(10px, 3vw, 15px);
}

.avatar-wrapper {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar {
    width: clamp(60px, 15vw, 100px);
    height: clamp(60px, 15vw, 100px);
    border-radius: 50%;
    border: 3px solid #f8bbd0;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(248, 166, 193, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 头像点击/悬浮交互 */
.avatar-wrapper:hover .avatar {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(236, 76, 127, 0.3);
}

/* 头像下方昵称 */
.avatar-nickname {
    text-align: center;
    margin-top: 5px;
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    color: #7d5a68;
}

/* 中间爱心元素（浪漫动态） */
.love-icon {
    font-size: clamp(20px, 5vw, 30px);
    color: #e64c7f;
    animation: loveBeat 1.5s infinite ease-in-out;
}

@keyframes loveBeat {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* 头像点击弹出提示（可选交互） */
.avatar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: #e64c7f;
    box-shadow: 0 2px 8px rgba(248, 166, 193, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.avatar-wrapper:hover .avatar-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: calc(100% + 10px);
}

/* 全局浪漫渐变背景 */
body {
    background: linear-gradient(120deg, #fff5f8, #ffeef5, #fff0f7);
    color: #5a3b48;
    line-height: 1.7;
    padding: 20px;
    min-height: 100vh;
}

/* 响应式容器 - 柔角+轻阴影+内边距适配 */
.container {
    max-width: 1000px;
    width: 100%;
    margin: 30px auto;
    background: #ffffff;
    padding: clamp(15px, 4vw, 30px);
    border-radius: clamp(20px, 5vw, 30px);
    box-shadow: 0 8px 30px rgba(236, 158, 186, 0.15), 0 2px 10px rgba(248, 166, 193, 0.1);
    border: 1px solid rgba(255, 183, 207, 0.2);
}

/* 头部样式 - 居中+爱心元素+浪漫配色 */
.header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: clamp(20px, 5vw, 30px);
    padding-bottom: clamp(15px, 3vw, 20px);
    border-bottom: 2px solid rgba(247, 148, 179, 0.2);
    position: relative;
}

.header::after {
    content: "💖";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
}

.header h1 {
    color: #e64c7f;
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 700;
    text-align: left;
    letter-spacing: 2px;
    margin-bottom: 0;
}

/* 用户信息栏 - 柔化排版+适配移动端换行 */
.user-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(10px, 3vw, 20px);
    padding: 0 10px;
}

.user-info span {
    font-size: clamp(0.9rem, 3vw, 1.05rem);
    color: #7d5a68;
    padding: 5px 10px;
    border-radius: 15px;
    background: rgba(255, 224, 236, 0.5);
}

.user-info span b {
    color: #e64c7f;
    font-weight: 600;
}

/* 通用按钮样式 - 浪漫主色+柔角+渐变+hover动效 */
.btn, .logout {
    padding: clamp(9px, 2.5vw, 12px) clamp(18px, 4vw, 25px);
    border-radius: clamp(25px, 6vw, 35px);
    text-decoration: none;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    border: none;
    cursor: pointer;
    transition: all 0.35s ease;
    display: inline-block;
    text-align: center;
    font-weight: 500;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(236, 76, 127, 0.2);
}

/* 主按钮 - 粉色渐变+爱心暗纹 */
.btn {
    background: linear-gradient(90deg, #e64c7f, #f06894);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: "❤️";
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.2;
    font-size: 16px;
}

.btn:hover {
    background: linear-gradient(90deg, #d84574, #e85a88);
    box-shadow: 0 6px 15px rgba(236, 76, 127, 0.3);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(236, 76, 127, 0.2);
}

/* 同意按钮 - 温柔绿+浪漫适配 */
.btn.agree {
    background: linear-gradient(90deg, #73c8a9, #5ac8a8);
    box-shadow: 0 4px 12px rgba(115, 200, 169, 0.2);
}

.btn.agree:hover {
    background: linear-gradient(90deg, #67b99a, #4eb998);
    box-shadow: 0 6px 15px rgba(115, 200, 169, 0.3);
}

/* 拒绝按钮 - 温柔红+浪漫适配 */
.btn.refuse {
    background: linear-gradient(90deg, #f87a9f, #f5698b);
    box-shadow: 0 4px 12px rgba(248, 122, 159, 0.2);
}

.btn.refuse:hover {
    background: linear-gradient(90deg, #f76992, #f35885);
    box-shadow: 0 6px 15px rgba(248, 122, 159, 0.3);
}

/* 退出按钮 - 浅紫浪漫风 */
.logout {
    background: linear-gradient(90deg, #a88fd8, #987ed6);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(168, 143, 216, 0.2);
}

.logout:hover {
    background: linear-gradient(90deg, #997fd0, #896ecd);
    box-shadow: 0 6px 15px rgba(168, 143, 216, 0.3);
    transform: translateY(-2px);
}

/* 解绑按钮专属样式 */
.btn.unbind {
    background: linear-gradient(90deg, #ff8a9d, #ff7a8f);
    margin-top: 15px;
    display: inline-block;
}

.btn.unbind:hover {
    background: linear-gradient(90deg, #ff7a8f, #ff6a7f);
}

/* 模块样式 - 浪漫子容器+柔角+渐变背景+爱心标题 */
.module {
    margin-bottom: clamp(20px, 5vw, 30px);
    padding: clamp(18px, 4vw, 25px);
    background: linear-gradient(180deg, #fff9fb, #fff5f8);
    border-radius: clamp(18px, 4vw, 25px);
    box-shadow: 0 4px 15px rgba(248, 166, 193, 0.1);
    border: 1px solid rgba(255, 196, 218, 0.3);
}

.module h2 {
    color: #e64c7f;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 600;
    margin-bottom: clamp(15px, 3vw, 20px);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1px;
}

.module h2::before {
    content: "💘";
    font-size: clamp(1rem, 3vw, 1.2rem);
}

/* 表单样式 - 浪漫柔化+聚焦动效+柔角 */
.form-group {
    margin-bottom: clamp(18px, 4vw, 22px);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #7d5a68;
    font-weight: 500;
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    padding-left: 5px;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: clamp(10px, 2.5vw, 12px) clamp(15px, 3vw, 18px);
    border: 2px solid rgba(255, 183, 207, 0.3);
    border-radius: clamp(15px, 3vw, 20px);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    background: #ffffff;
    color: #5a3b48;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 5px rgba(248, 166, 193, 0.05);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #e64c7f;
    box-shadow: 0 0 0 4px rgba(236, 76, 127, 0.1), inset 0 2px 5px rgba(248, 166, 193, 0.1);
    transform: translateY(-1px);
}

.form-group textarea {
    min-height: clamp(100px, 20vw, 120px);
    resize: vertical;
    line-height: 1.6;
}

/* 申请项样式 - 独立卡片+浪漫柔化+内边距适配 */
.request-item {
    padding: clamp(15px, 3vw, 20px);
    background: #ffffff;
    border-radius: clamp(15px, 3vw, 20px);
    margin-bottom: clamp(15px, 3vw, 20px);
    border: 1px solid rgba(255, 196, 218, 0.4);
    box-shadow: 0 3px 10px rgba(248, 166, 193, 0.08);
    transition: all 0.2s ease;
}

.request-item:hover {
    box-shadow: 0 5px 15px rgba(248, 166, 193, 0.12);
    transform: translateY(-2px);
}

.request-item p {
    margin-bottom: clamp(8px, 2vw, 10px);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #6b4b59;
}

.request-item p strong {
    color: #e64c7f;
    font-weight: 600;
}

/* 提示框 - 浪漫柔角+轻边框+适配文字 */
.alert {
    padding: clamp(12px, 3vw, 15px);
    border-radius: clamp(15px, 3vw, 20px);
    margin-bottom: clamp(15px, 3vw, 20px);
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    text-align: center;
    border: 1px solid transparent;
}

.alert.error {
    background: rgba(255, 224, 229, 0.7);
    color: #f0657f;
    border-color: rgba(255, 179, 189, 0.5);
}

.alert.success {
    background: rgba(224, 247, 231, 0.7);
    color: #67b99a;
    border-color: rgba(161, 230, 179, 0.5);
}

/* Tab切换 - 电脑/手机均横向并列 + 浪漫风格 */
.tab-nav {
    display: flex;
    gap: clamp(8px, 2vw, 15px);
    margin-bottom: clamp(15px, 3vw, 20px);
    padding-bottom: clamp(10px, 2vw, 15px);
    border-bottom: 2px solid rgba(247, 148, 179, 0.2);
    justify-content: flex-start;
    flex-wrap: nowrap !important; /* 强制所有终端横向，不换行 */
}

.tab-btn {
    background: linear-gradient(180deg, #fff5f8, #ffeef5);
    color: #e64c7f;
    border: 2px solid rgba(236, 76, 127, 0.2);
    padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 30px);
    border-radius: 25px;
    cursor: pointer;
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    font-weight: 500;
    transition: all 0.35s ease;
    text-align: center;
    flex: 1; /* 平均分配宽度，适配所有终端 */
    min-width: 90px;
}

.tab-btn.active {
    background: linear-gradient(90deg, #e64c7f, #f06894);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(236, 76, 127, 0.2);
}

.tab-btn:hover:not(.active) {
    border-color: rgba(236, 76, 127, 0.4);
    background: linear-gradient(180deg, #ffeef5, #ffe5f0);
}

.tab-panel {
    width: 100%;
}

/* 绑定状态卡片 - 浪漫柔化+信息突出 */
.binded {
    padding: clamp(15px, 3vw, 20px);
    background: linear-gradient(180deg, #fff9fb, #fff0f7);
    border-radius: clamp(15px, 3vw, 20px);
    border: 1px solid rgba(255, 196, 218, 0.4);
    box-shadow: 0 3px 10px rgba(248, 166, 193, 0.08);
}

.binded p {
    font-size: clamp(0.9rem, 2.5vw, 1.05rem);
    margin-bottom: clamp(8px, 2vw, 10px);
    color: #6b4b59;
}

.binded p:last-child {
    margin-bottom: 0;
}

/* 空状态样式 - 温柔提示+大间距+浪漫图标 */
.module .empty-state {
    padding: clamp(30px, 8vw, 40px) 0;
    color: #b89aa5;
    font-size: clamp(0.95rem, 3vw, 1.05rem);
    text-align: center;
}

.module .empty-state::before {
    content: "💔";
    display: block;
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 10px;
}

/* 后台管理专属样式 - 浪漫适配+表格柔化 */
.table-wrapper {
    overflow-x: auto;
    margin: clamp(10px, 2vw, 15px) 0;
    border-radius: clamp(15px, 3vw, 20px);
    box-shadow: 0 3px 10px rgba(248, 166, 193, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: clamp(15px, 3vw, 20px);
    overflow: hidden;
}

table th, table td {
    padding: clamp(10px, 2vw, 12px) clamp(12px, 2.5vw, 15px);
    text-align: left;
    border-bottom: 1px solid rgba(255, 196, 218, 0.3);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
}

table th {
    background: linear-gradient(90deg, #fff5f8, #ffeef5);
    color: #e64c7f;
    font-weight: 600;
    letter-spacing: 0.5px;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background: rgba(255, 240, 247, 0.5);
}

/* 状态文字配色 - 浪漫柔色 */
.status-0 { color: #ff9e7d; font-weight: 500; } /* 待审核-暖橙 */
.status-1 { color: #67b99a; font-weight: 500; } /* 已同意-柔绿 */
.status-2 { color: #f87a9f; font-weight: 500; } /* 已拒绝-柔粉 */

/* 后台登录框 - 浪漫居中+适配 */
.login-box {
    max-width: 400px;
    width: 100%;
    margin: clamp(30px, 10vw, 50px) auto;
    padding: clamp(20px, 5vw, 30px);
    background: #ffffff;
    border-radius: clamp(20px, 5vw, 30px);
    box-shadow: 0 8px 30px rgba(236, 158, 186, 0.15);
    border: 1px solid rgba(255, 183, 207, 0.2);
}

/* 电脑端专属适配 (屏幕>768px) */
@media (min-width: 768px) {
    .header {
        flex-wrap: nowrap;
    }
    .request-item .refuse-form {
        width: calc(100% - 130px) !important;
    }
    .request-item .refuse-input {
        width: 70% !important;
        margin-right: 10px !important;
    }
    .request-item .refuse-btn {
        width: calc(30% - 10px) !important;
    }
}

/* 移动端专属适配 (屏幕≤768px) */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    .container {
        margin: 10px auto;
        padding: 15px;
    }
    .header {
        flex-wrap: wrap;
        justify-content: center;
    }
    .header h1 {
        text-align: center;
        width: 100%;
        margin-bottom: 15px;
    }
    .user-info {
        justify-content: center;
        width: 100%;
    }
    .btn, .logout {
        width: 100%;
        margin-bottom: 10px;
    }
    .tab-btn {
        min-width: 90px;
    }
    .request-item form {
        width: 100% !important;
    }
    .request-item form input {
        width: 65% !important;
        margin-right: 3% !important;
    }
    .request-item form .btn.refuse {
        width: 32% !important;
    }
}

/* 小屏手机适配 (屏幕≤480px) */
@media (max-width: 480px) {
    .header h1 {
        letter-spacing: 1px;
        font-size: 1.4rem;
    }
    .module h2 {
        gap: 8px;
        font-size: 1.2rem;
    }
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        padding: 10px 15px;
    }
    .tab-btn {
        min-width: 80px;
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}