/* ========================================
   统一账户系统 - 纯净沉浸式全局样式表
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    background: #f4f7fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* 统一沉浸式卡片 */
.card {
    max-width: 480px;
    width: 100%;
    min-width: 320px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.01), 
        0 20px 40px -15px rgba(43, 63, 103, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    animation: cardFadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    overflow: visible;
}

@keyframes cardFadeInUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.content {
    padding: 2.2rem 2rem;
}

h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.sub {
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
    border-left: 3px solid #3C96CA;
    padding-left: 0.75rem;
}

/* 表单与输入框 */
.form-field {
    margin-bottom: 1.2rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.form-label i {
    color: #3C96CA;
    font-size: 0.85rem;
    width: 18px;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1.1rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: #fff;
    color: #1e293b;
}

.form-input:focus {
    outline: none;
    border-color: #3C96CA;
    box-shadow: 0 0 0 3px rgba(60, 150, 202, 0.08);
}

.form-input:disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* 🔘 按钮指令体系 */
.btn-submit {
    width: 100%;
    background: #3C96CA;
    border: none;
    color: white;
    padding: 0.85rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-submit:hover:not(:disabled) { background: #2B3F67; }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-success-jump {
    width: 100%;
    background: #2e7d32;
    border: none;
    color: white;
    padding: 0.85rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-success-jump:hover { background: #1b5e20; }

.btn-logout {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8rem;
    cursor: pointer;
    margin-top: 1.2rem;
    width: 100%;
    text-align: center;
    transition: color 0.2s;
}
.btn-logout:hover { color: #ef4444; text-decoration: underline; }

.btn-retry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 1.2rem;
    padding: 0.6rem 1.2rem;
    background: #2B3F67;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* 📊 提示状态条 */
.error { background: #fef2f2; border-left: 4px solid #ef4444; padding: 0.85rem 1rem; font-size: 0.85rem; color: #991b1b; margin-bottom: 1.35rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.success { background: #f0fdf4; border-left: 4px solid #22c55e; padding: 0.85rem 1rem; font-size: 0.85rem; color: #166534; margin-bottom: 1.35rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.info-box { background: #f8fafc; border-left: 4px solid #64748b; padding: 0.85rem 1rem; font-size: 0.85rem; color: #334155; margin-bottom: 1.35rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; }

/* 用户信息看板 */
.user-profile {
    background: #f8fafc;
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    border: 1px solid #f1f5f9;
    text-align: center;
}
.avatar {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #4eaadb, #3C96CA);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.3rem;
    margin: 0 auto 0.6rem;
}

/* 🎵 歌曲媒体列表框样式 (升级：支持权重排序及加降权按钮) */
.media-section {
    margin-top: 1.8rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1.5rem;
}
.media-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.song-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px; 
    overflow-y: auto;
    padding-right: 4px;
}
.song-list::-webkit-scrollbar { width: 4px; }
.song-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.song-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}
.song-item:hover { background: #f1f5f9; }
.song-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.song-name { font-size: 0.88rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-artist { font-size: 0.78rem; color: #64748b; display: flex; align-items: center; gap: 4px; }

/* 🗳️ 加权与降权微动控制组 */
.song-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}
.btn-action-weight {
    background: white;
    border: 1px solid #e2e8f0;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}
.btn-action-weight.up { color: #22c55e; }
.btn-action-weight.up:hover:not(:disabled) { background: #f0fdf4; border-color: #22c55e; }
.btn-action-weight.down { color: #ef4444; }
.btn-action-weight.down:hover:not(:disabled) { background: #fef2f2; border-color: #ef4444; }
.btn-action-weight:disabled { opacity: 0.4; cursor: not-allowed; background: #f1f5f9; }

.song-time { font-size: 0.72rem; color: #94a3b8; font-family: 'Inter', monospace; white-space: nowrap; margin-left: 8px;}
.song-empty { text-align: center; color: #94a3b8; font-size: 0.82rem; padding: 2rem 0; }

/* 骨架屏 */
.skeleton-loader { display: flex; flex-direction: column; gap: 12px; }
.skeleton-block { height: 38px; background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: loadingSkeleton 1.5s infinite; border-radius: 8px; }
@keyframes loadingSkeleton { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

[v-cloak] { display: none !important; }

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 0.4; transform: scale(0.96); }
}
/* ========================================
   🗳️ 权重计算过程模态框体系样式
   ======================================== */
.modal-mask {
    position: fixed;
    z-index: 9999; /* 提高层级，确保在最上层 */
    top: 0;
    left: 0;
    width: 100vw;  /* 使用 100vw 确保占满屏幕宽度 */
    height: 100vh; /* 使用 100vh 确保占满屏幕高度 */
    background-color: rgba(15, 23, 42, 0.6); /* 稍微加深遮罩颜色增强对比 */
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

/* 确保模态框显现时，卡片不会裁剪或限制它 */
.card {
    overflow: visible !important;
}

/* 调整模态框容器，使其更加适配全屏居中效果 */
.modal-container {
    width: 90%;
    max-width: 400px;
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* 增强全屏下的阴影厚重感 */
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 1.2rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.05rem;
    color: #1e293b;
    font-weight: 700;
}
.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
}
.modal-close-btn:hover { color: #475569; }

.modal-body {
    padding: 1.5rem;
}
.modal-song-title {
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 1rem;
    text-align: center;
}

/* 公式卡片 */
.calc-box {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.2rem;
    text-align: center;
}
.calc-formula-title {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.4rem;
}
.calc-formula-code {
    font-family: 'Inter', Courier, monospace;
    font-size: 1.05rem;
    font-weight: bold;
    color: #0f172a;
}

/* 详情表格 */
.calc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: #475569;
}
.calc-table td {
    padding: 0.6rem 0;
    border-bottom: 1px dashed #f1f5f9;
}
.calc-table td.num {
    text-align: right;
    font-family: 'Inter';
    color: #1e293b;
    font-size: 0.9rem;
}
.calc-table tr.total-row td {
    border-bottom: none;
    padding-top: 0.8rem;
    font-size: 0.9rem;
    color: #0f172a;
}
.calc-table .font-bold {
    font-weight: 700;
    color: #3C96CA !important;
    font-size: 1.05rem !important;
}

/* 让歌曲列表项鼠标浮动上去显示手势 */
.song-item {
    cursor: pointer;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter';
}
/* ========================================
   🌟 新增：高级纵向信息公告栏组件样式（限高自动滚动）
   ======================================== */
.notice-box-wrapper {
    background: #f8fafc; /* 干净优雅的浅灰色偏蓝底色 */
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.02);
}

/* 头部常规标题区 */
.notice-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.45rem;
    margin-bottom: 0.5rem;
}

.notice-icon {
    color: #3C96CA; /* 主题天蓝色 */
    font-size: 0.9rem;
}

.notice-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.5px;
}

/* 核心：限制高度的容器 */
.notice-body-container {
    height: 48px;            /* 🌟 限制最大可视高度 (约两行公告的高度) */
    overflow: hidden;        /* 超出部分直接隐藏 */
    position: relative;
}

/* 垂直滚动包裹器 */
.notice-scroll-content {
    display: flex;
    flex-direction: column;
    animation: noticeVerticalScroll 12s linear infinite; /* 纵向滚动动画 */
}

/* 🌟 当鼠标悬停在公告区域内时，动画立刻暂停，极大提升用户查阅体验 */
.notice-box-wrapper:hover .notice-scroll-content {
    animation-play-state: paused;
}

/* 每一条单行公告行高 */
.notice-item {
    font-size: 0.82rem;
    line-height: 24px;       /* 严格统一高度，方便精准控制循环衔接 */
    height: 24px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;  /* 单行极长时末尾自动变省略号 */
}

/* 纵向无缝循环关键帧动画 */
@keyframes noticeVerticalScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(0, -50%, 0); /* 刚好滚完第一组，无缝对齐第二组 */
    }
}
/* ========================================
   🌟 新增：页面内高沉浸式 Toast 提示组件样式
   ======================================== */
.toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* 确保不阻挡底层元素点击 */
}

.toast-item {
    pointer-events: auto; /* 恢复自身交互 */
    background: rgba(15, 23, 42, 0.9); /* 深色高斯沉浸底色 */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 90vw;
    width: max-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
    /* 触发淡入并向上微调的动画 */
    animation: toastFadeInUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 根据消息属性赋予不同的提示图标颜色（可选拓展） */
.toast-item i {
    font-size: 0.95rem;
}
.toast-item.toast-success i { color: #22c55e; }
.toast-item.toast-error i { color: #ef4444; }
.toast-item.toast-info i { color: #3c96ca; }

@keyframes toastFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 退出动画类：由 JS 在销毁前动态赋予 */
.toast-item.fade-out {
    animation: toastFadeOut 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }
}

/* ========================================
   🔧 修复按钮图标文字重叠问题
   ======================================== */

/* 强制所有按钮使用 flex 布局并保持间距 */
.btn-submit,
.btn-success-jump,
.btn-logout,
.btn-retry {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

/* 确保图标不会撑开额外宽度 */
.btn-submit i,
.btn-success-jump i,
.btn-logout i,
.btn-retry i {
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

/* 移动端小屏幕适配：允许文字换行，但保持图标不压缩 */
@media (max-width: 450px) {
    .btn-submit,
    .btn-success-jump {
        white-space: normal !important;
        flex-wrap: wrap !important;
        padding: 12px 16px !important;
        min-height: 48px !important;
    }
    
    /* 确保换行后图标仍在上方或左侧正确位置 */
    .btn-submit i,
    .btn-success-jump i {
        margin-bottom: 0 !important;
    }
}

/* 加载状态时保持图标旋转不破坏布局 */
.btn-submit:disabled i.fa-spin {
    display: inline-block !important;
}

/* 针对按钮内可能的多余边距重置 */
button i,
a i {
    pointer-events: none;
}
