/**
 * TikTok Shop管理系统 - 主样式文件
 * 现代化科技公司风格UI
 */

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

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #111827;
    --text-muted: #6b7280;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: #f3f4f6;
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 48px;
    overflow: hidden;
}

.nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    flex-shrink: 0;
    margin-right: 1rem;
    white-space: nowrap;
}

.nav-brand i {
    font-size: 1.2rem;
}

.nav-menu {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.2;
    height: 32px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-link i {
    font-size: 0.875rem;
}

.nav-user {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
    margin-left: 0.5rem;
    white-space: nowrap;
}

.nav-user span {
    white-space: nowrap;
    font-size: 0.875rem;
    line-height: 1.2;
}

/* ===== 主内容区 ===== */
.main-content {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== 登录页面 ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.login-header p {
    color: var(--text-muted);
}

.login-form {
    margin-top: 2rem;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== 页面容器 ===== */
.page-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===== 仪表盘 ===== */
.dashboard {
    background: transparent;
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-icon.teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.stat-icon.red { background: linear-gradient(135deg, #ef4444, #dc2626); }

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.dashboard-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.dashboard-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    table-layout: auto;
}

.data-table th,
.data-table td {
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table td code {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: normal;
}

.data-table thead {
    background-color: var(--light-color);
}

.data-table th {
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background-color: var(--light-color);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

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

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* ===== 徽章 ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--light-color);
    color: var(--text-color);
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

/* ===== 提示框 ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* ===== 模态框 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalSlideIn 0.3s;
}

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

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-header h2,
.modal-header h3 {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close:hover {
    opacity: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-body-compact {
    padding: 1.25rem;
}

.modal form {
    margin: 0;
}

.form-group-compact {
    margin-bottom: 1rem;
}

.form-group-compact:last-child {
    margin-bottom: 0;
}

.form-control-compact {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.form-label-compact {
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
}

.form-section-compact {
    margin: 1rem 0;
    padding: 1rem;
}

.form-section-compact h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.player-setting-card-compact {
    padding: 0.875rem;
    min-height: auto;
}

.player-setting-card-compact .form-group {
    margin-bottom: 0.75rem;
}

.player-setting-card-compact .form-group:last-child {
    margin-bottom: 0;
}

.form-actions-compact {
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* ===== 信息框 ===== */
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.info-box p {
    margin: 0.5rem 0;
    color: #1e40af;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.info-item span {
    color: var(--text-color);
    font-size: 1rem;
}

.info-item .highlight {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===== 状态选择 ===== */
.status-select {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
}

/* ===== 页脚 ===== */
.footer {
    background: white;
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

/* ===== 响应式设计 ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 1rem;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    
    .nav-user {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        padding-top: 1rem;
        padding-left: 0;
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8 {
        flex: 0 0 100%;
    }
    
    .modal-body-compact {
        padding: 1rem;
    }
    
    .form-section-compact {
        padding: 0.875rem;
    }
}

/* ===== 设置表单 ===== */
.settings-form {
    max-width: 800px;
}

.settings-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
}

/* ===== 视频生成表单 ===== */
.video-generate-form {
    background: #f9fafb;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.video-generate-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.video-generate-form .form-row .form-group:only-child {
    grid-column: 1 / -1;
}

.form-row-full {
    margin-bottom: 1.5rem;
}

/* 视频生成表单两栏布局 */
.video-form-layout {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    margin-bottom: 1.5rem;
    align-items: stretch;
    width: 100%;
}

.video-form-left,
.video-form-right {
    display: flex !important;
    flex-direction: column;
    width: 100%;
}

.video-form-left {
    min-height: 500px;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.video-form-left .form-group {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
}

.video-form-left textarea {
    flex: 1;
    min-height: 450px;
    resize: none;
    font-size: 0.95rem;
    line-height: 1.6;
    padding: 1rem;
    font-family: inherit;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.char-count {
    margin-top: 0.5rem;
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.char-count span {
    font-weight: 600;
    color: var(--primary-color);
}

.video-form-right {
    gap: 1.5rem !important;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    min-height: 500px;
    display: flex !important;
    flex-direction: column !important;
}

.video-form-right .form-group {
    margin-bottom: 0;
    flex-shrink: 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.checkbox-label:hover {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

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

.checkbox-label span {
    font-weight: 500;
    color: var(--text-color);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
}

/* 任务进度条样式 */
.task-progress {
    width: 100%;
    max-width: 300px;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.progress-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* 视频播放器样式 */
.video-player-container {
    margin-bottom: 2rem;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.video-player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.video-player-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.video-player-header button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.video-player-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.video-player-content {
    padding: 1.5rem;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.video-player-content video {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .video-form-layout {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .video-form-left {
        min-height: auto;
    }
    
    .video-form-left textarea {
        min-height: 300px;
    }
    
    .video-form-right {
        min-height: auto;
    }
}

.text-muted {
    color: var(--text-muted);
}

/* ===== 图片上传区域 ===== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    background: white;
    transition: all 0.3s;
    cursor: pointer;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f0f4ff;
}

.upload-placeholder {
    color: var(--text-muted);
}

.upload-placeholder i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.upload-placeholder p {
    margin: 0.5rem 0;
    font-size: 1rem;
    color: var(--text-color);
}

.upload-placeholder small {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.upload-preview {
    position: relative;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 300px;
    width: auto;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    object-fit: contain;
    margin-bottom: 1rem;
    display: block;
}

.upload-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.upload-status {
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    display: none;
    font-weight: 500;
}

.upload-status-info {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}

/* 低价标记样式 */
.low-price-cell {
    background-color: #fff3cd !important;
    border-left: 3px solid #ffc107;
}

.low-price {
    color: #dc3545;
    font-weight: bold;
}

.low-price-cell .low-price {
    color: #dc3545;
    font-weight: bold;
}

/* 任务ID折叠显示 */
.task-id-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 300px;
}

.task-id-short {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    word-break: break-all;
}

.task-id-full {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-color);
    word-break: break-all;
    display: block;
    width: 100%;
}

.task-id-container .btn-xs {
    padding: 0.125rem 0.25rem;
    font-size: 0.75rem;
    min-width: auto;
    flex-shrink: 0;
}

/* 图片缩略图 */
.task-image-thumbnail {
    width: 100px;
    height: 100px;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f9fafb;
}

.task-image-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.task-image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.task-image-thumbnail img:hover {
    transform: scale(1.1);
}

.upload-status-success {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #81c784;
}

.upload-status-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.image-url-display {
    margin-top: 1rem;
    padding: 1rem;
    background: #f5f5f5;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.image-url-display label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.url-box {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.url-box input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: white;
    color: var(--text-color);
}

.url-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-copy {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.3s;
}

.btn-copy:hover {
    background: var(--primary-hover);
}

.upload-status-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.upload-status-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.upload-status-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ===== 卡片组件 ===== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.card-header {
    padding: 0.75rem 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-color);
}

.card-header h2 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 0.75rem;
}

/* ===== 通用表格 ===== */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.table thead th {
    background-color: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    border: none;
    font-size: 0.8rem;
}

.table tbody td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8rem;
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

.table-striped tbody tr:nth-child(odd) {
    background-color: var(--light-color);
}

.table-bordered {
    border: 1px solid var(--border-color);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
    background-color: #f0f4ff;
}

.table-active {
    background-color: #e0e7ff !important;
}

.table-success {
    background-color: #d1fae5 !important;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    border-radius: var(--radius);
}

.text-center {
    text-align: center;
}

/* ===== 计分游戏样式 ===== */
.game-info-badges {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    align-items: center;
}

.section-title {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.score-board {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.score-card {
    position: relative;
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid transparent;
}

.score-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.score-card.score-winner {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    border: 2px solid var(--warning-color);
    animation: scorePulse 2s infinite;
}

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

.score-player {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.625rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0.5rem 0;
}

.score-base {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3125rem;
}

.score-winner-badge {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: var(--warning-color);
    color: white;
    padding: 0.3125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.add-round-section {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.875rem;
}

.score-input {
    font-size: 1.125rem;
    text-align: center;
    font-weight: 600;
}

.rounds-section,
.results-section {
    margin-top: 2rem;
}

.player-setting-card {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 3px solid transparent;
}

.player-setting-card label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.875rem;
}

.player-setting-card .form-group {
    margin-bottom: 1rem;
}

.player-setting-card .form-group:last-child {
    margin-bottom: 0;
}

.form-section {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: var(--light-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-section h4 {
    margin-bottom: 1.25rem;
    color: var(--text-color);
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge-primary {
    background-color: #ddd6fe;
    color: #5b21b6;
}

/* ===== 响应式布局辅助类 ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.col-md-3,
.col-md-6,
.col-sm-6 {
    padding: 0 0.75rem;
    flex: 0 0 100%;
}

@media (min-width: 576px) {
    .col-sm-6 {
        flex: 0 0 50%;
    }
}

@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 25%;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
    }
    
    .col-md-6 {
        flex: 0 0 50%;
    }
    
    .col-md-8 {
        flex: 0 0 66.666667%;
    }
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.round-score-input {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 500;
    padding: 0.2rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s;
    width: 55px;
}

.round-score-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
    outline: none;
}

.player-name-input,
.player-base-input {
    font-size: 0.75rem;
    padding: 0.1rem 0.3rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.player-name-input:focus,
.player-base-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
    outline: none;
}

.modal-content-large {
    max-width: 900px;
    max-height: 95vh;
}

.text-primary {
    color: var(--primary-color);
}

.weighted-score {
    font-size: 1.2em;
    color: var(--primary-color);
    font-weight: 700;
}
