/* styles.css - v2.4.0 响应式优化版 */

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

html, body {
    height: 100%;
    width: 100%;
}


/* 手机端允许滚动 */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        overflow-x: auto;
    }
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ========== 导航栏 ========== */
.top-nav {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1vh 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2vw;
}

.logo {
    display: flex;
    align-items: center;
    font-size: clamp(1rem, 2vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 1.5px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo img {
    height: clamp(30px, 5vh, 50px);
    margin-right: 1vw;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 0.8vw;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 0.8vh 1.5vw;
    border-radius: 14px;
    transition: all 0.3s ease;
    font-weight: 700;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.15);
    /* 移除上浮动画 */
}

.login-section button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 0.8vh 2vw;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    font-size: clamp(0.85rem, 1.2vw, 1rem);
    transition: all 0.3s ease;
}

.login-section button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.25));
    transform: translateY(-3px);
}

/* ========== 公告栏 ========== */
.announcement-bar {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.95), rgba(255, 152, 0, 0.95));
    backdrop-filter: blur(15px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    box-shadow: 0 4px 20px rgba(255, 152, 0, 0.3);
    flex-shrink: 0;
    z-index: 999;
    min-height: 80px;
    max-height: 100px;
    display: flex;
    align-items: center;
}

.announcement-container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5vw;
    padding: 1vh 2vw;
}

.announcement-icon {
    font-size: clamp(24px, 3vw, 32px);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.announcement-content {
    flex: 1;
    position: relative;
    min-height: 60px;
    display: flex;
    align-items: center;
}

.announcement-item {
    width: 100%;
    display: none;
    animation: fadeInAnnouncement 0.5s ease;
}

.announcement-item.active {
    display: block;
}

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

.announcement-title {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4vh;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 1.4em;
}

.announcement-text {
    font-size: clamp(0.85rem, 1.1vw, 0.95rem);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.4;
    margin-bottom: 0.3vh;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-text:hover {
    color: #fff;
}

.announcement-time {
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.announcement-indicators {
    display: flex;
    gap: 0.5vw;
    align-items: center;
}

.announcement-indicators .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.announcement-indicators .dot.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.announcement-indicators .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* ========== 主内容区域 ========== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5vh 2vw;
    overflow: hidden;
    min-height: 0;
}

/* ========== 登录容器 ========== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

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

.login-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
    padding: clamp(2rem, 4vh, 3rem) clamp(2rem, 3vw, 3rem);
    border-radius: clamp(20px, 2.5vmin, 35px);
    width: 90%;
    max-width: 520px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(30px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% { left: 100%; }
}

.login-form h2 {
    text-align: center;
    margin-bottom: clamp(1.5rem, 3vh, 2.5rem);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    animation: textGradient 4s ease infinite;
}

@keyframes textGradient {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

.form-group {
    margin-bottom: clamp(1rem, 2vh, 1.8rem);
}

.form-group label {
    display: block;
    margin-bottom: 0.8vh;
    font-weight: 800;
    color: #1a202c;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
}

.form-group input {
    width: 100%;
    padding: clamp(0.8rem, 1.5vh, 1rem) clamp(1rem, 1.5vw, 1.2rem);
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-radius: 15px;
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.95);
    color: #1a202c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

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

.captcha-container {
    display: flex;
    align-items: center;
    gap: 1vw;
}

.captcha-container input {
    flex: 1;
}

.captcha-container canvas {
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    cursor: pointer;
    flex-shrink: 0;
    background: #f7f8fc;
}

button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    border: none;
    padding: clamp(0.8rem, 1.5vh, 1.2rem);
    border-radius: 15px;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    cursor: pointer;
    transition: all 0.4s ease;
    font-weight: 900;
    letter-spacing: 2px;
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    margin-top: 1.5vh;
    text-transform: uppercase;
}

button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(102, 126, 234, 0.6);
}

/* ========== 邮件页面 ========== */
.mail-page {
    display: none;
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 1vh 1.5vw;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.mail-page.active {
    display: flex;
    flex-direction: column;
    gap: 1vh;
}

.mail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5vh 2vw;
    background: rgba(255, 255, 255, 0.98);
    border-radius: clamp(15px, 1.5vmin, 20px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.mail-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mail-actions button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1vh 2vw;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.mail-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
}

/* ========== 邮件列表 ========== */
.mail-list {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.mail-list table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

/* 自适应列宽 - 使用百分比 */
.mail-list th:nth-child(1),
.mail-list td:nth-child(1) {
    width: 25%;  /* 发件人 */
}

.mail-list th:nth-child(2),
.mail-list td:nth-child(2) {
    width: 35%;  /* 主题 */
}

.mail-list th:nth-child(3),
.mail-list td:nth-child(3) {
    width: 20%;  /* 时间 */
}

.mail-list th:nth-child(4),
.mail-list td:nth-child(4) {
    width: 20%;  /* 操作 */
}

/* 表头样式 */
.mail-list th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: white;
    font-weight: 900;
    padding: 15px 2%;  /* 使用百分比padding */
    text-align: left;
    font-size: clamp(14px, 1.5vw, 16px);
    letter-spacing: 1px;
    height: 50px;
    box-sizing: border-box;
}

/* 表格内容样式 */
.mail-list td {
    padding: 15px 2%;  /* 使用百分比padding */
    border-bottom: 1px solid rgba(102, 126, 234, 0.08);
    color: #4a5568;
    font-size: clamp(13px, 1.4vw, 15px);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    height: 50px;
    vertical-align: middle;
    box-sizing: border-box;
}

.mail-list tr:last-child td {
    border-bottom: none;
}

.mail-list tr {
    transition: all 0.3s ease;
}

.mail-list tr:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(8px);
}

.mail-list button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6vh 1.5vw;
    border-radius: 12px;
    cursor: pointer;
    font-size: clamp(0.85rem, 1vw, 1rem);
    font-weight: 800;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.35);
}

.mail-list button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.45);
}

/* ========== 分页样式 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;  /* 固定高度，不变化 */
    min-height: 60px;
    margin-top: auto;  /* 推到底部 */
}

.pagination button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.pagination button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.4);
}

.pagination button:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    box-shadow: none;
}

.page-info {
    color: #667eea;
    font-weight: 700;
    font-size: 14px;
    min-width: 100px;
    text-align: center;
}

/* ========== 新邮件提醒 ========== */
.new-mail-notification {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.5vh 2vw;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5);
    z-index: 1001;
    display: none;
    animation: bounceIn 0.8s ease;
    font-weight: 800;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

@keyframes bounceIn {
    0% { transform: scale(0.3) translateX(150px); opacity: 0; }
    50% { transform: scale(1.1); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1) translateX(0); opacity: 1; }
}

/* ========== 邮件详情模态框 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

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

.modal.active {
    display: flex;
}

.mail-detail-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 255, 255, 0.97));
    padding: clamp(2rem, 4vh, 4rem);
    border-radius: clamp(20px, 3vmin, 35px);
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.close {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: clamp(30px, 4vw, 45px);
    font-weight: 900;
    cursor: pointer;
    color: #667eea;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.1);
}

.close:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: rotate(90deg) scale(1.15);
}

.mail-detail-modal h2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 900;
    padding-right: 70px;
}

.mail-detail-info {
    padding: 2rem 0;
    border-bottom: 2px solid rgba(102, 126, 234, 0.1);
    margin-bottom: 2rem;
}

.mail-detail-info p {
    margin: 1rem 0;
    color: #4a5568;
    font-size: clamp(0.9rem, 1.2vw, 1.1rem);
}

.mail-detail-info strong {
    color: #1a202c;
    font-weight: 800;
}

.mail-content {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06), rgba(118, 75, 162, 0.06));
    padding: clamp(1.5rem, 2.5vh, 2.5rem);
    border-radius: 15px;
    margin-top: 1.5rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.mail-content p {
    color: #2d3748;
    line-height: 2;
    white-space: pre-wrap;
    font-size: clamp(0.9rem, 1.1vw, 1.05rem);
}

/* ========== 页脚 ========== */
.footer {
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 1.2vh 0 0.8vh;
    flex-shrink: 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 30%), 1fr));
    gap: 1rem;
    padding: 0 2vw;
}

.footer-section h3 {
    margin-bottom: 0.6vh;
    color: #fff;
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    font-weight: 800;
}

.footer-section p {
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 0.3rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.3rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: clamp(0.75rem, 0.9vw, 0.85rem);
}

.footer-section a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 0.8vh;
    margin-top: 0.8vh;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(0.7rem, 0.9vw, 0.8rem);
    padding: 0 2vw;
}

/* ========== 简化版页脚 ========== */
.footer-simple {
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    padding: 1.2vh 2vw;
    font-size: clamp(0.75rem, 1vw, 0.85rem);
    flex-shrink: 0;
    z-index: 100;
}

.footer-simple p {
    margin: 0;
}

.footer-simple a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* ========== 响应式设计 - 手机端优化 ========== */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .top-nav {
        padding: 0.8vh 0;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1vh;
        padding: 1vh 3vw;
    }
    
    .logo {
        font-size: clamp(1rem, 5vw, 1.5rem);
    }
    
    .logo img {
        height: clamp(28px, 8vw, 40px);
        margin-right: 2vw;
    }
    
    .nav-menu ul {
        flex-direction: column;
        flex-direction: column;
        justify-content: center;
        gap: 1.5vw;
    }
    
    .nav-menu a {
        padding: 1vh 3vw;
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
        border-radius: 10px;
    }
    
    .login-section button {
        padding: 1vh 4vw;
        font-size: clamp(0.8rem, 3.5vw, 0.95rem);
    }
    
    /* 主内容区域优化 */
    .main-content {
        padding: 2vh 4vw;
    }
    
    /* 登录表单优化 */
    .login-form {
        padding: clamp(1.5rem, 5vw, 2.5rem);
        border-radius: clamp(15px, 4vw, 25px);
        width: 95%;
        max-width: none;
    }
    
    .login-form h2 {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: clamp(1.2rem, 3vh, 2rem);
    }
    
    .form-group {
        margin-bottom: clamp(0.8rem, 2vh, 1.5rem);
    }
    
    .form-group label {
        font-size: clamp(0.85rem, 4vw, 1rem);
        margin-bottom: 0.6vh;
    }
    
    .form-group input {
        padding: clamp(0.7rem, 2vh, 1rem) clamp(0.8rem, 3vw, 1.2rem);
        font-size: clamp(0.85rem, 4vw, 1rem);
        border-radius: 12px;
    }
    
    .captcha-container {
        gap: 2vw;
    }
    
    .captcha-container canvas {
        width: clamp(90px, 25vw, 110px);
        height: clamp(38px, 10vw, 45px);
    }
    
    button[type="submit"] {
        padding: clamp(0.7rem, 2vh, 1rem);
        font-size: clamp(0.95rem, 4.5vw, 1.15rem);
        border-radius: 12px;
        letter-spacing: 1.5px;
    }
    
    /* 邮件页面优化 */
    .mail-page {
        padding: 1vh 3vw;
    }
    
    .mail-page.active {
        gap: 1.5vh;
    }
    
    .mail-header {
        flex-direction: column;
        gap: 1.5vh;
        text-align: center;
        padding: 1.5vh 4vw;
        border-radius: clamp(12px, 3vw, 18px);
    }
    
    .mail-header h2 {
        font-size: clamp(1.3rem, 6vw, 1.8rem);
    }
    
    .mail-actions button {
        padding: 1.2vh 5vw;
        font-size: clamp(0.85rem, 4vw, 1rem);
        border-radius: 10px;
    }
    
    /* 邮件列表优化 */
    .mail-list {
        border-radius: clamp(12px, 3vw, 18px);
    }
    
    /* 表格横向滚动 */
    .mail-list {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .mail-list table {
        min-width: 600px; /* 最小宽度，保证内容不被压缩 */
    }
    
    .mail-list th,
    .mail-list td {
        padding: clamp(0.6rem, 1.8vh, 1rem) clamp(0.7rem, 2.5vw, 1.2rem);
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
    }
    
    .mail-list th {
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
        letter-spacing: 0.5px;
    }
    
    .mail-list button {
        padding: 0.6vh 3vw;
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
        border-radius: 8px;
    }
    
    /* 分页优化 */
    .pagination {
        gap: 2vw;
        padding: 1.2vh 3vw;
        border-radius: 12px;
        flex-direction: column;
    }
    
    .pagination button {
        padding: 0.8vh 3vw;
        font-size: clamp(0.75rem, 3.5vw, 0.9rem);
        border-radius: 8px;
    }
    
    .page-info {
        font-size: clamp(0.8rem, 3.5vw, 0.9rem);
        width: 100%;
        text-align: center;
        order: -1;
    }
    
    /* 页脚优化 */
    .footer {
        padding: 1.5vh 0 1vh;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.2vh;
        padding: 0 4vw;
    }
    
    .footer-section h3 {
        font-size: clamp(0.85rem, 4vw, 1rem);
        margin-bottom: 0.5vh;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: clamp(0.75rem, 3.5vw, 0.85rem);
    }
    
    .footer-section a:hover {
        transform: none;
    }
    
    .footer-bottom {
        font-size: clamp(0.7rem, 3vw, 0.8rem);
        padding: 0 4vw;
    }
    
    /* 模态框优化 */
    .mail-detail-modal {
        width: 95%;
        max-height: 90vh;
        padding: clamp(1.5rem, 4vw, 2.5rem);
        border-radius: clamp(15px, 4vw, 25px);
    }
    
    .mail-detail-modal h2 {
        font-size: clamp(1.4rem, 6vw, 2rem);
        padding-right: 50px;
        margin-bottom: 1.5rem;
    }
    
    .close {
        right: 15px;
        top: 15px;
        font-size: clamp(25px, 6vw, 35px);
        width: 40px;
        height: 40px;
    }
    
    .mail-detail-info p {
        font-size: clamp(0.85rem, 3.8vw, 1rem);
        margin: 0.8rem 0;
    }
    
    .mail-content {
        padding: clamp(1rem, 3vw, 2rem);
        border-radius: 12px;
    }
    
    .mail-content p {
        font-size: clamp(0.85rem, 3.8vw, 1rem);
        line-height: 1.8;
    }
    
    /* 新邮件提醒优化 */
    .new-mail-notification {
        right: 15px;
        bottom: 20px;
        padding: 1.2vh 4vw;
        font-size: clamp(0.85rem, 4vw, 1rem);
        border-radius: 12px;
    }
}

/* 超小屏幕优化（< 480px） */
@media (max-width: 480px) {
    .nav-menu a {
        padding: 1vh 4vw;
    }
    
    .login-form {
        padding: 1.5rem;
    }
    
    .mail-list table {
        min-width: 550px;
    }
    
    .mail-list th:nth-child(1) { width: 28%; }
    .mail-list th:nth-child(2) { width: 32%; }
    .mail-list th:nth-child(3) { width: 22%; }
    .mail-list th:nth-child(4) { width: 18%; }
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

::selection {
    background: rgba(102, 126, 234, 0.35);
    color: #1a202c;
}/* ========== 滚动优化 ========== */

/* 电脑端：默认整体可滚动 */
html, body {
    overflow: auto;
}

/* 当窗口足够大时，锁定整体滚动，只让邮件列表滚动 */
@media (min-width: 769px) and (min-height: 700px) {
    html, body {
        overflow: hidden;
    }
}

/* 窗口太小时，允许整体滚动 */
@media (max-width: 768px), (max-height: 699px) {
    html, body {
        overflow-y: auto;
        overflow-x: auto;
    }
}

/* 邮件页面布局优化 */
.mail-page {
    display: none;
    width: 100%;
    padding: 1vh 1.5vw;
    flex: 1;
    min-height: 0;
    flex-direction: column;
}

.mail-page.active {
    display: flex;
    flex-direction: column;
    overflow: visible; position: relative;
}

/* 邮件头部固定 */
.mail-header {
    flex-shrink: 0;
}

/* 邮件列表容器 - 可滚动 */
.mail-list-wrapper {
    flex: 1;
    min-height: 150px;
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 窗口太小时，取消最大高度限制 */
@media (max-height: 699px) {
    .mail-list-wrapper {
        max-height: none;
        min-height: 200px;
    }
}

/* 邮件列表样式 */
.mail-list {
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 15px;
    overflow: visible; position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.6);
}

/* 分页固定 */
.pagination {
    flex-shrink: 0;
}

/* 公告栏固定 */
.announcement-bar {
    flex-shrink: 0;
}

/* 简化版页脚固定 */
.footer-simple {
    flex-shrink: 0;
    position: relative;
}

/* ========== 联系方式美化 ========== */
.contact-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-direction: column;
}

.contact-item {
    max-width: 180px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
    }
    
    .contact-item {
    max-width: 180px;
        justify-content: center;
    }
}

/* ========== 联系方式美化 ========== */
.contact-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-direction: column;
}

.contact-item {
    max-width: 180px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.contact-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
    }
    .contact-item {
    max-width: 180px;
        justify-content: center;
    }
}

/* ========== 友情链接框框样式 ========== */
.friend-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.link-item {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    max-width: 180px;
    text-align: center;
}

.link-item:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 限制联系方式框框宽度 */
.contact-item {
    max-width: 180px;
    max-width: 160px;
    justify-content: flex-start;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .link-item {
        max-width: 100%;
    }
    .contact-item {
    max-width: 180px;
        max-width: 100%;
        justify-content: center;
    }
}

/* ========== 邮件列表表头固定 ========== */
.mail-list thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.mail-list thead th {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ========== 减少 mail-header 高度 ========== */
.mail-header {
    padding: 0.5rem 1rem !important;
    margin-bottom: 0.5rem !important;
}

.mail-header h2 {
    font-size: clamp(1rem, 1.5vw, 1.2rem) !important;
    margin-bottom: 0.3rem !important;
}

.mail-actions {
    margin-top: 0.3rem !important;
}

.mail-actions button {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
}

/* ========== 减少 pagination 高度 ========== */
.pagination {
    padding: 0.5rem 1rem !important;
    margin-top: 0.5rem !important;
}

.pagination button {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.85rem !important;
}

/* ========== 调整邮件列表包装器高度 ========== */
.mail-list-wrapper {
    max-height: calc(100vh - 320px) !important;
}


/* 邮件内容样式 */
.mail-body {
    padding: 15px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    min-height: 200px;
    max-height: 600px;
    overflow-y: auto;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.mail-body img {
    max-width: 100%;
    height: auto;
}

.mail-body a {
    color: #1a73e8;
}

.mail-body table {
    border-collapse: collapse;
}

.mail-body pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    white-space: pre-wrap;
    word-wrap: break-word;
}
