* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

:root {
    --primary-blue: #1a73e8;
    --dark-blue: #1557b0;
    --light-blue: #4a90e2;
    --gray-dark: #374151;
    --gray-medium: #6b7280;
    --gray-light: #9ca3af;
    --gray-bg: #f3f4f6;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 移动设备支持上下滑动 */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/6c75ebef-bceb-4198-b449-f476f36573e3.png');
    background-size: cover;
    background-position: center -50px;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    margin-top: 20px;
}

.content-bottom {
    margin-top: 40px;
    padding-bottom: 100px;
    width: 100%;
    position: relative;
    z-index: 999;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
}

.logo-container {
    margin-bottom: 25px;
    width: 240px;
    height: 240px;
}

.school-logo {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: #333333;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(26, 115, 232, 0.8), 0 0 20px rgba(26, 115, 232, 0.6), 0 0 30px rgba(26, 115, 232, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
    max-width: 95%;
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-description {
    margin-bottom: 25px;
}

@keyframes glow {
    from {
        text-shadow: 0 0 10px rgba(26, 115, 232, 0.8), 0 0 20px rgba(26, 115, 232, 0.6), 0 0 30px rgba(26, 115, 232, 0.4), 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    to {
        text-shadow: 0 0 15px rgba(26, 115, 232, 1), 0 0 25px rgba(26, 115, 232, 0.8), 0 0 35px rgba(26, 115, 232, 0.6), 0 2px 10px rgba(0, 0, 0, 0.3);
    }
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-blue);
    margin-bottom: 30px;
    font-weight: 300;
    letter-spacing: 8px;
}

.hero-description {
    margin-bottom: 25px;
}

.hero-description p {
    font-size: 1.1rem;
    margin-bottom: 12px;
    line-height: 1.6;
    overflow: hidden;
    border-right: 3px solid var(--primary-blue);
    white-space: nowrap;
    margin: 0 auto;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
    background: linear-gradient(90deg, var(--primary-blue), var(--light-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--primary-blue); }
}

.feature-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.feature-tag {
    padding: 8px 20px;
    background: rgba(26, 115, 232, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.3);
    border-radius: 25px;
    color: #333333;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.feature-tag:hover {
    background: rgba(26, 115, 232, 0.2);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--primary-blue) 100%);
}

.btn-secondary {
    background: transparent;
    color: #333333;
    border: 2px solid #cccccc;
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-blue);
}

.quick-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.quick-link {
    color: #666666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.quick-link:hover {
    color: var(--primary-blue);
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px 0;
    background-color: #333333;
    font-size: 12px;
    color: #ffffff;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.footer .footmess {
    font-size: 12px;
    line-height: 1.6;
    color: #cccccc;
    padding: 0 10px;
}
.footer .footmess a {
    color: #3598db;
    text-decoration: none;
}
.footer .footmess a:hover {
    text-decoration: underline;
}

/* 登录容器样式 */
.auth-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: absolute;
    right: -450px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    opacity: 0;
    transition: all 0.5s ease;
}

/* 学校Logo样式 */
.auth-container .school-logo img {
    max-width: 200px;
    margin-bottom: 1rem;
    width: 100%;
    height: auto;
}

/* 标题样式 */
.auth-container h2 {
    color: #1a73e8;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* 分割线样式 */
.auth-container hr {
    margin: 1rem auto;
    width: 80%;
    border: none;
    border-top: 1px solid #ddd;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

/* 表单标签样式 */
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 500;
}

/* 输入框样式 */
.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #797878;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.2s;
}

/* 输入框聚焦效果 */
.form-group input:focus {
    border-color: var(--primary-blue);
    outline: none;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

/* 允许输入框选择文本 */
input, textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* 提交按钮样式 */
button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

/* 提交按钮悬停效果 */
button[type="submit"]:hover {
    background-color: #1557b0;
}

/* RFID 按钮样式 */
.rfid-button {
    padding: 10px 15px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

/* RFID 按钮悬停效果 */
.rfid-button:hover {
    background-color: #45a049;
}

/* 错误容器样式 */
.error-container {
    color: #d32f2f;
    background-color: #ffebee;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: none;
    font-size: 0.9rem;
}

/* 登录/注册切换链接 */
.switch-auth-link {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.switch-auth-link a {
    color: var(--primary-blue);
    text-decoration: none;
}

.switch-auth-link a:hover {
    text-decoration: underline;
}

/* ==================== 手机端UI（设备识别：html.mobile） ==================== */
/* 返回按钮：桌面端隐藏 */
.mobile-back-btn {
    display: none;
}

html.mobile body {
    overflow: auto;
}

/* 手机端首页布局 */
html.mobile .hero-content {
    padding: 32px 16px 80px;
    min-height: 100vh;
    justify-content: center;
}

html.mobile .logo-container {
    width: 150px;
    height: 150px;
    margin-bottom: 16px;
}

html.mobile .hero-title {
    font-size: 1.6rem;
    margin-bottom: 12px;
    white-space: normal;
    animation: none;
}

html.mobile .hero-description p {
    font-size: 0.95rem;
    white-space: normal;
    animation: none;
    border-right: none;
}

html.mobile .content-bottom {
    margin-top: 28px;
    padding-bottom: 60px;
    gap: 18px;
}

html.mobile .feature-tags {
    gap: 10px;
}

html.mobile .feature-tag {
    padding: 6px 14px;
    font-size: 0.85rem;
}

/* 手机端按钮：垂直排列、大尺寸易点按 */
html.mobile .action-buttons {
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

html.mobile .btn {
    width: 100%;
    max-width: 320px;
    padding: 14px 0;
    font-size: 1.05rem;
    text-align: center;
}

html.mobile .footer {
    font-size: 11px;
}
html.mobile .footer .footmess {
    font-size: 10px;
    line-height: 1.4;
}

/* 手机端背景：默认本地淡色回退；JS随机选取壁纸接口（1秒超时），
   加载成功后替换为壁纸并提亮至完全不透明 */
html.mobile .hero-overlay {
    background-image: url('../img/6c75ebef-bceb-4198-b449-f476f36573e3.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    opacity: 0.12;
    transition: opacity 0.4s ease;
}

html.mobile .hero-overlay.bg-loaded {
    opacity: 1;
}

/* 手机端认证面板：全屏覆盖，可滚动 */
html.mobile .auth-container {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    border-radius: 0;
    padding: 24px 20px;
    overflow-y: auto;
    right: 0;
    top: 0;
    transform: none;
    opacity: 0;
    visibility: hidden;
    z-index: 1500;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

html.mobile .auth-container.show-login {
    opacity: 1;
    visibility: visible;
}

/* 手机端返回按钮 */
html.mobile .mobile-back-btn {
    display: block;
    margin-bottom: 16px;
    padding: 8px 16px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    cursor: pointer;
}

html.mobile .mobile-back-btn:active {
    background-color: var(--gray-bg);
}

/* 手机端弹窗占满更满一些 */
html.mobile .modal-overlay {
    padding: 12px;
}

html.mobile .modal-box {
    max-height: 90vh;
}

/* 动画类 */
.slide-left {
    transform: translateX(-30%) translateY(0);
    opacity: 0.8;
    transition: all 0.5s ease;
}

.shrink-title {
    font-size: 2rem !important;
    transition: font-size 0.5s ease;
}

.hide-button {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    pointer-events: none;
}

.show-login {
    right: 50px;
    opacity: 1;
    transition: all 0.5s ease 0.2s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .auth-container {
        width: 90%;
        padding: 1.5rem;
        right: -95%;
    }
    
    .auth-container .school-logo img {
        max-width: 150px;
    }
    
    .auth-container h2 {
        font-size: 1.3rem;
    }
    
    .show-login {
        right: 5%;
    }
}

@media (max-width: 480px) {
    .auth-container {
        width: 95%;
        padding: 1rem;
        right: -100%;
    }
    
    .auth-container .school-logo img {
        max-width: 120px;
    }
    
    .auth-container h2 {
        font-size: 1.1rem;
    }
    
    button[type="submit"] {
        padding: 0.8rem;
    }
    
    .show-login {
        right: 2.5%;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 4px;
    }
    
    .hero-description p {
        font-size: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .logo-container {
        width: 190px;
        height: 190px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        letter-spacing: 2px;
    }
    
    .feature-tags {
        gap: 10px;
    }
    
    .feature-tag {
        padding: 6px 15px;
        font-size: 0.85rem;
    }
}

/* ==================== 协议模态框样式 ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background-color: var(--white);
    border-radius: 12px;
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 18px 24px;
    border-bottom: 1px solid #e5e7eb;
}

/* 人机验证弹窗：网页中间偏上置顶显示 */
#captchaModal {
    align-items: flex-start;
}

#captchaModal .captcha-modal-box {
    max-width: 380px;
    margin-top: 10vh;
}

#captchaModal #captcha-modal-container {
    display: flex;
    justify-content: center;
    padding: 18px 24px 22px;
}

/* ============ 账号状态弹窗（封禁/删除） ============ */
.status-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.status-modal.active {
    display: flex;
}

/* —— 封禁弹窗（中央小卡片） —— */
.status-modal-box.ban-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px 48px;
    width: 90%;
    max-width: 460px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: banPop 0.3s ease;
}

@keyframes banPop {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.status-code {
    font-size: 80px;
    font-weight: 700;
    color: #d32f2f;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 0 20px rgba(211, 47, 47, 0.3);
}

.status-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.status-title-en {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-bottom: 18px;
    letter-spacing: 1px;
}

.status-countdown {
    font-size: 1.6rem;
    font-weight: 600;
    color: #1a73e8;
    background: rgba(26, 115, 232, 0.08);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-variant-numeric: tabular-nums;
}

.status-reason {
    background: #f3f4f6;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 24px;
    text-align: left;
}

.status-reason-label {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.status-reason-text {
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.5;
    word-break: break-all;
}

.status-btn {
    padding: 10px 32px;
    background: #1a73e8;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
}

.status-btn:hover {
    background: #1557b0;
}

/* —— 删除弹窗（全屏，acdn.PNG 背景，居中文字） —— */
.delete-modal {
    /* 全屏背景由 .delete-bg 提供，这里只做布局 */
    background: transparent;
}

.delete-modal .delete-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/acdn.PNG');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
    /* 半透明遮罩让文字更清晰 */
    box-shadow: inset 0 0 0 9999px rgba(0, 0, 0, 0.35);
}

.delete-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 40px;
    max-width: 90%;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.delete-title {
    font-size: 3.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.delete-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 18px;
}

.delete-en {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 60px;
    letter-spacing: 0.5px;
}

.delete-foot {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
    font-variant-numeric: tabular-nums;
}

/* 右上角"再见!"按钮 */
.delete-goodbye {
    position: absolute;
    top: 24px;
    right: 28px;
    z-index: 3;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 24px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
    letter-spacing: 1px;
}

.delete-goodbye:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px) scale(1.04);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.delete-goodbye:active {
    transform: scale(0.96);
}

/* 推荐歌曲提示 */
.delete-song {
    margin-top: 10px;
    margin-bottom: 28px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.delete-song span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ============ 毕业弹窗动画 ============ */
/* 背景缓慢推近（30s 一个来回，营造电影感） */
.delete-modal.active .delete-bg {
    animation: deleteBgZoom 30s ease-in-out infinite alternate;
}

@keyframes deleteBgZoom {
    from { transform: scale(1); }
    to { transform: scale(1.12); }
}

/* 标题：放大淡入 + 轻微下落 */
.delete-modal.active .delete-title {
    animation: titleDropIn 1.2s cubic-bezier(0.2, 0.8, 0.25, 1) both;
}

@keyframes titleDropIn {
    0% { opacity: 0; transform: translateY(-30px) scale(0.7); letter-spacing: 8px; }
    60% { opacity: 1; }
    100% { opacity: 1; transform: translateY(0) scale(1); letter-spacing: 2px; }
}

/* 副标题/英文/歌曲/底部依次延迟淡入上滑 */
.delete-modal.active .delete-subtitle {
    animation: fadeUp 0.9s ease 0.6s both;
}

.delete-modal.active .delete-en {
    animation: fadeUp 0.9s ease 0.9s both;
}

.delete-modal.active .delete-song {
    animation: fadeUp 0.9s ease 1.2s both;
}

.delete-modal.active .delete-foot {
    animation: fadeUp 0.9s ease 1.5s both;
}

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

/* 再见按钮延迟出现 */
.delete-modal.active .delete-goodbye {
    animation: fadeUp 0.8s ease 0.3s both;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .status-modal-box.ban-box {
        padding: 28px 24px;
    }

    .status-code {
        font-size: 64px;
    }

    .status-countdown {
        font-size: 1.3rem;
    }

    .delete-title {
        font-size: 2rem;
    }

    .delete-subtitle {
        font-size: 1.1rem;
    }

    .delete-en {
        font-size: 0.85rem;
    }

    .delete-foot {
        font-size: 0.72rem;
    }
}

.modal-header h3 {
    color: var(--primary-blue);
    font-size: 1.15rem;
    margin: 0;
}

.modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 50%;
    color: var(--gray-medium);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--gray-bg);
    color: var(--gray-dark);
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
}

/* 协议正文允许选择文本 */
.modal-body,
.modal-body * {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.modal-body h4 {
    color: var(--gray-dark);
    font-size: 1rem;
    margin: 18px 0 8px;
}

.modal-body h4:first-child {
    margin-top: 0;
}

.modal-body p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 8px;
}

.modal-body ul {
    margin: 0 0 8px;
    padding-left: 1.4em;
}

.modal-body li {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 6px;
}

.modal-meta {
    color: var(--gray-light);
    font-size: 0.85rem;
}

@media (max-width: 480px) {
    .modal-overlay {
        padding: 10px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-body p,
    .modal-body li {
        font-size: 0.9rem;
    }
}
