:root {
    --primary-color: #0F172A;
    --secondary-color: #334155;
    --cta-color: #0369A1;
    --bg-color: #F8FAFC;
    --text-color: #020617;
    --white: #ffffff;
    --border-color: #E2E8F0;
    --danger-color: #EF4444;
    --success-color: #22C55E;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-width: 600px;
}

h1, h2, h3 {
    font-family: 'Righteous', cursive, sans-serif;
}

/* 头部用户信息 */
.user-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 12px;
    padding: 4px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    min-width: 150px; /* 增加最小宽度 */
}

.user-name-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    flex: 1; /* 让容器填充空间 */
}

.user-role-text {
    font-size: 10px;
    opacity: 0.8;
    color: var(--white);
    margin-top: 1px;
    white-space: nowrap; /* 强制不换行 */
    overflow: visible; /* 允许文字完整显示 */
}

.avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
}

.avatar-lg {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f0f0f0;
    object-fit: cover;
}

/* 页面内容布局 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* 表格容器 */
.table-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow-x: auto;
}

/* 设置页面布局 */
.settings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.profile-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.settings-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* 弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.hidden {
    display: none !important;
}

/* 角色标签 */
.role-badge {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.role-super_admin { background: #fee2e2; color: #991b1b; }
.role-admin { background: #dcfce7; color: #166534; }
.role-conductor { background: #dbeafe; color: #1e40af; }
.role-musician { background: #fef9c3; color: #854d0e; }

/* 声部选择网格 */
.section-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 8px;
    max-height: 150px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: #f9fafb;
}

.section-checkbox-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}

.section-checkbox-item:hover {
    background: #f1f5f9;
}

.section-checkbox-item input {
    cursor: pointer;
}

/* 用户管理网格 */
.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    padding: 10px 0;
}

.user-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    padding: 10px;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 160px;
}

.user-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.user-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    gap: 4px;
}

.user-info-left {
    display: flex;
    flex-direction: column;
    max-width: 55%;
    overflow: hidden;
}

.user-card .username {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.user-card .nickname {
    font-size: 10px;
    color: var(--secondary-color);
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-right {
    flex-shrink: 0;
}

.user-role-right .role-badge {
    padding: 0px 3px;
    font-size: 9px;
    border-radius: 2px;
}

.user-card-body {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 6px;
    overflow: hidden;
}

.user-card-body .user-icon-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.user-card-body .user-icon-placeholder {
    width: 24px;
    height: 24px;
    color: var(--secondary-color);
    opacity: 0.3;
}

.user-card-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
    gap: 2px;
}

.user-card-footer .icon-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: var(--secondary-color);
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.user-card-footer .icon-btn:hover {
    background: #f1f5f9;
    color: var(--cta-color);
}

.user-card-footer .icon-btn.btn-danger:hover {
    color: var(--danger-color);
    background: #fee2e2;
}

.user-card-footer .icon-btn i {
    width: 12px;
    height: 12px;
}

.user-card.status-disabled {
    opacity: 0.8;
    background: #f1f5f9;
}

.disabled-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--danger-color);
    font-weight: bold;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--danger-color);
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
}

/* 统一按钮颜色类 */
.btn-edit, .icon-btn-edit {
    color: var(--cta-color) !important;
}
.btn-edit:hover, .icon-btn-edit:hover {
    background: #e0f2fe !important;
}

.btn-delete, .icon-btn-delete {
    color: var(--danger-color) !important;
}
.btn-delete:hover, .icon-btn-delete:hover {
    background: #fee2e2 !important;
}

.btn-disable, .icon-btn-disable {
    color: var(--danger-color) !important;
}
.btn-disable:hover, .icon-btn-disable:hover {
    background: #fee2e2 !important;
}

/* 特定于标题栏的按钮样式 */
.section-header-v .btn-xs {
    padding: 3px 6px; /* 减小内边距以更紧凑 */
    font-size: 12px; 
    min-width: auto; /* 允许按钮根据内容调整大小 */
    height: 26px; /* 固定高度 */
}

/* 弹窗尺寸补充 */
.user-modal-content {
    width: 500px;
    max-width: 95%;
}

.section-modal-content {
    width: 350px;
}

/* 声部管理列表 */
.section-manage-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.section-manage-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.section-manage-item:hover {
    border-color: var(--cta-color);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-manage-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.section-manage-actions {
    display: flex;
    gap: 4px;
}

.section-manage-actions .icon-btn.sm {
    padding: 4px;
    width: 24px;
    height: 24px;
}

/* 垂直布局通用样式 (指挥标注与异地排练) */
.conductor-mark-v-layout,
.remote-rehearsal-v-layout {
    display: flex;
    flex-direction: column;
    max-width: 1000px;
    min-width: 600px;
    margin: 0 auto;
    gap: 20px;
    width: 100%;
    /* 移除固定高度，允许页面随内容滚动 */
}

.mark-top-section,
.rehearsal-top-section {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px; /* 从8px减小到4px */
}

.project-title-v {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--primary-color);
    text-align: center;
    width: 100%;
    font-weight: 700;
}

.video-container-v {
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 9;
    transition: transform 0.3s ease, opacity 0.3s ease; /* 仅针对变换和透明度，避免布局抖动 */
}

/* 视频外层包装，用于占位防止布局塌陷 */
.video-wrapper-v {
    width: 80%;
    max-width: 640px;
    min-width: 320px;
    aspect-ratio: 16 / 9;
    position: relative;
    margin: 0 auto;
    transition: width 0.3s ease;
}

/* 视频悬浮状态 */
.video-container-v.sticky-mode {
    position: fixed;
    top: 74px; /* header 64px + 10px margin */
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 270px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid var(--white);
    border-radius: 8px;
    aspect-ratio: auto; /* 悬浮模式下使用固定宽高 */
    overflow: visible; /* 允许时间戳显示在容器外 */
}

.sticky-time-display {
    display: none;
    position: absolute;
    bottom: 12px; /* 移动到窗口内部底部 */
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    color: var(--white); /* 使用白色文字 */
    font-size: 24px;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(0,0,0,0.8), 0 2px 4px rgba(0,0,0,0.9); /* 使用深色投影增强在视频画面上的可读性 */
    z-index: 1001;
    pointer-events: none; /* 防止遮挡视频点击 */
}

.sticky-mode .sticky-time-display {
    display: block;
}


.video-container-v video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* 播放控制区 */
.mark-controls-v,
.rehearsal-controls-v {
    padding: 8px 12px; /* 减小上下内边距 */
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.progress-info-v {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    position: relative;
}

.current-time-v {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 22px;
}

.custom-progress-bar-v {
    position: relative;
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    cursor: pointer;
    margin-bottom: 8px; /* 从12px减小到8px */
}

.progress-indicator-v {
    position: absolute;
    top: -5px;
    width: 3px;
    height: 20px;
    background: var(--danger-color);
    z-index: 10;
    pointer-events: none;
    transition: left 0.1s linear;
}

.annotation-highlight-range-v {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 5px;
    opacity: 0.4;
}

.controls-row-v {
    display: flex;
    align-items: center;
    justify-content: center; /* 基础居中 */
    position: relative;
    min-height: 40px; /* 确保有足够高度 */
}

.playback-btns-v {
    display: flex;
    align-items: center;
    gap: 12px;
    /* 保持在 Flex 容器中心 */
}

.icon-btn-v {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--secondary-color);
}

.icon-btn-v:hover {
    border-color: var(--cta-color);
    color: var(--cta-color);
}

.btn-play-pause-v {
    width: 40px;
    height: 40px;
    background: var(--cta-color);
    color: #fff;
    border: none;
}

.btn-play-pause-v:hover {
    background: #0284C7;
    transform: scale(1.05);
}

.icon-btn-v i {
    width: 18px;
    height: 18px;
}

.btn-play-pause-v i {
    width: 20px;
    height: 20px;
}

/* 混音开关 */
.mix-control-v {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    width: 60px;
    position: absolute; /* 绝对定位到左侧 */
    left: 0;
}

.mix-icon-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 8px;
}

.mix-status-badge {
    position: absolute;
    top:0;
    right: -6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mix-status-badge.on {
    background: var(--success-color);
}

.mix-status-badge.off {
    background: #94a3b8;
}

.mix-badge-icon {
    width: 10px;
    height: 10px;
    color: #fff;
}

.mix-text {
    font-size: 11px;
    font-weight: 500;
}

/* 音量控制组 */
.volume-group-v {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: absolute; /* 绝对定位到右侧 */
    right: 0;
}

.volume-item-v {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.vol-label {
    width: 50px;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
}

.vol-icon {
    width: 14px;
    height: 14px;
    color: #64748b;
    flex-shrink: 0;
}

.vol-value {
    width: 25px;
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.vol-slider-v {
    flex: 1;
    min-width: 50px;
    max-width: 140px;
    height: 4px;
    cursor: pointer;
}

/* 标注表单区域 (仅指挥标注页面) */
.mark-form-section {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 12px; /* 减小间距 */
}

.mark-form-card {
    padding: 10px 16px; /* 进一步减小内边距 */
    display: flex;
    flex-direction: column;
    gap: 8px; /* 进一步减小间隙 */
}

.header-actions-v {
    display: flex;
    gap: 6px; /* 减小按钮间距 */
    align-items: center;
    flex-wrap: wrap; /* 允许换行以适应更多按钮 */
    max-width: 380px; /* 增加最大宽度以容纳更多按钮 */
}

.mark-form-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px; /* 减小列间距 */
}

.mark-form-left-col {
    display: flex;
    flex-direction: column;
    gap: 8px; /* 减小间隙 */
}

.mark-form-right-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label-v {
    font-size: 11px; /* 减小字体 */
    font-weight: 600;
    color: #64748b;
}

.form-group-v {
    display: flex;
    flex-direction: column;
    gap: 4px; /* 减小间隙 */
}

.form-group-v label {
    font-size: 11px; /* 进一步缩小字号 */
    font-weight: 600;
    color: #64748b;
}

.form-group-v input {
    padding: 5px 8px; /* 进一步减小内边距 */
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 12px; /* 进一步缩小字号 */
}

.section-scroll-view-v {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* 减小最小宽度 */
    gap: 6px;
    max-height: 118px;
    overflow-y: auto;
    padding: 8px; /* 减小内边距 */
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.form-actions-v {
    display: flex;
    gap: 12px;
    margin-top: 4px; /* 减小边距 */
}

.form-actions-v .btn {
    width: auto;
    min-width: 100px; /* 减小最小宽度 */
    padding: 8px 16px; /* 调整内边距 */
}

/* 标注列表区 */
.mark-bottom-section,
.rehearsal-bottom-section {
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header-v {
    padding: 8px 16px; /* 减小内边距 */
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header-v h3 {
    margin: 0;
    font-size: 15px; /* 减小字体大小 */
}

.mark-list-count {
    font-size: 12px;
    color: #64748b;
}

.annotation-scroll-v {
    padding: 20px;
    flex: 1; /* 允许扩展以适应内容 */
}

/* 可展开标注项 */
.annotation-expand-item-v {
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.annotation-expand-item-v.expanded {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.v-item-header {
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    cursor: pointer;
    gap: 12px;
    border-radius: 11px 11px 0 0;
}

.v-section-tag {
    background: #94a3b8;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.v-track-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.v-content-text {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.v-time-range {
    font-size: 12px;
    color: #475569;
    font-weight: 600;
    margin: 0 12px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.8);
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.v-status-tag {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.v-status-pending { background: #fee2e2; color: #ef4444; }
.v-status-done { background: #dcfce7; color: #22c55e; }

.v-expand-icon {
    transition: transform 0.3s;
    color: #94a3b8;
}

.expanded .v-expand-icon {
    transform: rotate(180deg);
}

.v-item-body {
    padding: 0 16px 16px;
    border-top: 1px solid #f1f5f9;
    display: none;
}

.expanded .v-item-body {
    display: block;
}

.recording-list-v {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.recording-item-v {
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.rec-header {
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 12px;
    background: #fcfcfd;
    border-bottom: 1px solid #f1f5f9;
}

.rec-index {
    font-weight: 600;
    font-size: 13px;
    color: #fff;
    background: var(--secondary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.rec-iteration-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    border: 1px solid #e2e8f0;
}

.review-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--cta-color);
}

.header-left-v {
    display: flex;
    align-items: center;
    gap: 24px;
}

.global-select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--secondary-color);
    cursor: pointer;
}


.v-item-header .review-checkbox {
    margin-right: 4px;
}

.rec-header .review-checkbox {
    margin-right: 4px;
}


.rec-status-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.rec-status-published { background: #dcfce7; color: #166534; }
.rec-status-uploaded { background: #dbeafe; color: #1e40af; }
.rec-status-uploading { background: #fef9c3; color: #854d0e; }

.rec-duration-tag {
    background: #f0f9ff;
    color: #0369a1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.rec-time {
    font-size: 11px;
    color: #94a3b8;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.rec-actions {
    display: flex;
    gap: 8px;
}

.rec-action-btn {
    height: 28px;
    padding: 0 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: #fff;
    transition: all 0.2s;
    color: var(--secondary-color);
    font-size: 12px;
}

.rec-action-btn:hover {
    border-color: var(--cta-color);
    color: var(--cta-color);
}

.rec-action-btn.btn-delete:hover {
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.rec-action-btn.btn-publish {
    font-weight: 600;
}

/* 波形图容器 */
.waveform-container-v {
    height: 60px;
    background: #f8fafc;
    position: relative;
    cursor: pointer;
}

.v-wave-canvas {
    width: 100%;
    height: 100%;
}

.v-wave-indicator {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--danger-color);
    z-index: 5;
    pointer-events: none;
    left: 0;
}

/* 录音占位符 */
.recording-placeholder-v {
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 80px;
}

.btn-start-rec {
    padding: 8px 20px;
    border-radius: 20px;
    background: var(--cta-color);
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-start-rec:hover {
    background: #0284C7;
    transform: translateY(-1px);
}

.btn-cancel-rec {
    background: var(--danger-color) !important;
}

.rec-prep-message {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

.countdown-timer-v {
    font-size: 24px;
    font-weight: 700;
    color: var(--cta-color);
    margin: 0 8px;
}

.recording-active-info {
    font-size: 16px;
    font-weight: 600;
    color: var(--danger-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rec-dot {
    width: 12px;
    height: 12px;
    background: var(--danger-color);
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* 标注列表项样式 */
.mark-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    height: 56px;
    padding: 0 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.mark-item:hover {
    border-color: var(--cta-color);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.mark-item.active {
    border-color: var(--cta-color);
    background: #f0f9ff;
    box-shadow: inset 0 0 0 1px var(--cta-color);
}

.mark-item-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    flex-shrink: 0;
}

.mark-item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
}

.mark-item-time {
    font-family: monospace;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 13px;
    width: 160px;
    flex-shrink: 0;
}

.mark-item-track {
    font-weight: 700;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 150px;
    flex-shrink: 0;
}

.mark-item-text {
    font-size: 14px;
    color: #475569;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mark-item-sections {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.mark-item-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login Page */
#login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1E293B 100%);
}

.login-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.brand-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.brand-subtitle {
    color: var(--secondary-color);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

/* Main Layout */
.main-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    height: 64px;
    background: var(--primary-color);
    color: var(--white);
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    align-items: center;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
}

.logo {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.nav-tabs {
    display: flex;
    gap: 0.5rem;
    height: 100%;
    justify-content: center;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 1rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    color: #94A3B8;
    height: 100%;
    border-bottom: 3px solid transparent;
}

.nav-item i {
    width: 18px;
    height: 18px;
}

.nav-item:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
    color: var(--white);
    border-bottom-color: var(--cta-color);
    background: rgba(255, 255, 255, 0.05);
}

.icon-btn.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

/* 项目管理网格 */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    padding: 10px 0;
}

.project-item {
    width: 380px;
    height: 120px;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.project-info-row {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #64748b;
}

.project-info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-status-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 60px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
}

/* 状态样式 */
.status-pending { background-color: #fef9c3; color: #ca8a04; } /* 待上传：浅黄底，明黄字 */
.status-finished { background-color: #e2e8f0; color: #000000; } /* 已结束：灰底，黑字 */
.status-ongoing { background-color: #166534; color: #ffffff; }  /* 进行中：深绿底，白字 */

/* 对话框中的用户列表 */
.user-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 10px;
    border-radius: 4px;
}

.user-select-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.project-modal-content {
    width: 600px;
    max-width: 95%;
}

.video-section {
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    text-align: center; /* 确保内容在容器中居中对齐 */
}

.video-section label {
    display: block;
    margin-bottom: 0.8rem;
    text-align: left; /* 保持 label 左对齐 */
}

.video-player-container {
    width: 100%;
    max-width: 640px;
    min-width: 320px;
    aspect-ratio: 4 / 3;
    background: #000;
    margin: 10px auto; /* 居中显示 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.video-player-container video {
    width: 100%;
    height: 100%;
    object-fit: contain; /* 保持比例显示完整视频 */
}

.video-upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.video-upload-actions {
    position: absolute;
    top: 10px;
    left: 10px;
    pointer-events: auto;
}

.video-upload-progress-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    pointer-events: auto;
}

.progress-circle-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
}

.progress-circle {
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: var(--cta-color);
    stroke-width: 2.8;
    stroke-linecap: round;
    transition: stroke-dasharray 0.3s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.tab-item.active {
    color: var(--white);
    border-bottom-color: var(--cta-color);
    background: rgba(255, 255, 255, 0.05);
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow: auto; /* 允许内容区域滚动 */
}

.page-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    min-height: 400px;
    overflow: visible; /* 确保内容不会被隐藏 */
}

.page-content h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    text-align: center;
}

.footer-links {
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    margin: 0 1rem;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--cta-color);
}

.footer-info {
    color: #64748B;
    font-size: 0.8rem;
}

/* Forms & Buttons */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

input:focus {
    border-color: var(--cta-color);
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-primary {
    background: var(--cta-color);
    color: var(--white);
    width: 100%;
}

.btn-primary:hover {
    background: #0284C7;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.icon-btn:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

/* Placeholders & Demos */
.demo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #94A3B8;
    border: 2px dashed var(--border-color);
    border-radius: 1rem;
}

.demo-placeholder p {
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #F1F5F9;
    font-weight: 600;
    font-size: 0.85rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #DCFCE7;
    color: #166534;
}

/* Responsive */
@media (max-width: 1024px) {
    .content-area {
        padding: 1.5rem;
    }
}

/* 异地排练页面布局 */
.remote-rehearsal-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    height: calc(100vh - 250px);
    min-height: 600px;
}

.rehearsal-left-area {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 1rem;
}

.rehearsal-right-area {
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
    display: flex;
    flex-direction: column;
}

.record-form-area {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.current-annotation-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border-color);
}

.current-annotation-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.current-annotation-info span {
    font-weight: 600;
    color: var(--primary-color);
}

.record-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.record-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9rem;
}

.recording-dot {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

.audio-preview-area {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.audio-preview-area audio {
    width: 100%;
}

.offset-setting {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.offset-setting label {
    font-size: 0.9rem;
    white-space: nowrap;
}

.offset-setting input {
    width: 100px;
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
}

.my-rehearsals-header {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.rehearsal-list-scroll {
    flex: 1;
    overflow-y: auto;
}

.rehearsal-item {
    padding: 1rem;
    background: #f1f5f9;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    position: relative;
}

.rehearsal-item-info {
    font-size: 0.85rem;
    color: #64748b;
}

.rehearsal-item-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .header {
        height: auto;
        display: flex;
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .nav-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        justify-content: flex-start;
    }
    
    .header-right {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }
    
    .page-content {
        padding: 1rem;
    }
}

