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

:root {
    /* 渐变色主题 */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-warning: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-info: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --gradient-purple: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --gradient-orange: linear-gradient(135deg, #ff9a56 0%, #ff6a88 100%);
    --gradient-blue: linear-gradient(135deg, #2af598 0%, #009efd 100%);
    
    /* 颜色 */
    --primary-color: #667eea;
    --secondary-color: #f093fb;
    --success-color: #00f2fe;
    --warning-color: #fee140;
    --danger-color: #f5576c;
    --dark-color: #2d3748;
    --light-color: #f7fafc;
    --text-color: #2d3748;
    --text-light: #718096;
    
    /* 阴影 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* ==================== 页面切换 ==================== */
.page {
    display: none;
    min-height: 100vh;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* ==================== 登录页面 ==================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-container {
    background: var(--gradient-primary);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.logo-icon {
    font-size: 36px;
    color: white;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
}

.tagline {
    color: var(--text-light);
    font-size: 14px;
}

.login-body {
    margin-bottom: 20px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    z-index: 1;
}

.input-field {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    color: var(--text-light);
    font-size: 12px;
}

/* 背景动画 */
.background-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    animation: float 20s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    background: var(--gradient-primary);
    top: -100px;
    right: -100px;
}

.circle-2 {
    width: 400px;
    height: 400px;
    background: var(--gradient-secondary);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.circle-3 {
    width: 250px;
    height: 250px;
    background: var(--gradient-success);
    bottom: 50%;
    right: 30%;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -50px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: var(--gradient-warning);
    color: var(--dark-color);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: white;
    color: var(--text-color);
    border: 2px solid #e2e8f0;
}

.btn-outline:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    width: 36px;
    height: 36px;
}

/* ==================== 应用容器 ==================== */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-weight: 600;
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    display: flex;
    padding: 20px;
    gap: 20px;
}

/* 侧边栏 */
.sidebar {
    width: 300px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 20px;
    height: fit-content;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-actions {
    margin-bottom: 20px;
}

.task-list {
    max-height: 70vh;
    overflow-y: auto;
}

.task-item {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.task-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.task-item.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.task-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.task-id {
    font-weight: 700;
    font-size: 16px;
}

.task-item-body {
    font-size: 13px;
    opacity: 0.9;
}

/* 工作区 */
.workspace {
    flex: 1;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 30px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    color: var(--text-light);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.work-area {
    animation: fadeIn 0.5s ease-in;
}

.work-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.work-title h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.task-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: var(--gradient-success);
    color: white;
}

.work-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.select-field {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 标注条目 */
.annotation-list {
    margin-bottom: 30px;
}

.annotation-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.annotation-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.annotation-item.modified {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
}

.annotation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.annotation-title {
    font-weight: 600;
    font-size: 16px;
}

/* 重要性选择控件样式 */
.importance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    font-size: 12px;
    color: #666;
}

.importance-label {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.importance-select {
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--gradient-warning);
    color: var(--dark-color);
    box-shadow: var(--shadow-sm);
    outline: none;
}

.importance-select:focus {
    box-shadow: 0 0 0 2px rgba(250, 112, 154, 0.3);
}

.modified-badge {
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: var(--gradient-secondary);
    color: white;
    animation: pulse 2s infinite;
}

.btn-delete {
    padding: 4px 12px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(238, 90, 111, 0.4);
}

.btn-delete:active {
    transform: translateY(0);
}

.btn-delete i {
    font-size: 11px;
}

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

.audio-player {
    width: 100%;
    margin-bottom: 15px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.annotation-text {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 80px;
}

.annotation-text:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.save-status {
    margin-top: 8px;
    font-size: 12px;
    color: var(--success-color);
    font-weight: 600;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
}

.page-info {
    font-weight: 600;
    color: var(--text-color);
    padding: 0 20px;
}

/* ==================== 管理员后台 ==================== */
.admin-content {
    flex: 1;
    padding: 20px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: var(--light-color);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

.panel {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-body {
    padding: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* 表格 */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--gradient-primary);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
}

.data-table .btn-group {
    display: flex;
    gap: 8px;
}

/* 表单 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== Toast 通知 ==================== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-100px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background: var(--gradient-success);
    color: white;
}

.toast.error {
    background: var(--gradient-secondary);
    color: white;
}

.toast.warning {
    background: var(--gradient-warning);
    color: var(--dark-color);
}

/* ==================== 消息提示 ==================== */
.message {
    padding: 12px;
    border-radius: var(--radius-md);
    margin-top: 15px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

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

.message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
    }
    
    .work-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .work-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .tabs {
        flex-direction: column;
    }
}

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* ==================== 全屏加载蒙层 ==================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-in-out;
}

.loading-content {
    background: white;
    padding: 40px 60px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    animation: scaleIn 0.4s ease-in-out;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-subtext {
    font-size: 14px;
    color: var(--text-light);
}

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

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

