/* ============================================
   AI漫剧制作管理系统 - 全局样式
   ============================================ */

/* ----- 基础重置 & 全局配色 ----- */
:root {
    --primary: #6c5ce7;
    --primary-dark: #5a4bd1;
    --secondary: #00b894;
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-input: #0d1117;
    --text-main: #e6edf3;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --radius: 12px;
}

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

body {
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
    color: var(--text-main);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    padding-top: 70px;
}

a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    color: #a29bfe;
}

/* ----- 导航栏 ----- */
.navbar-custom {
    background: rgba(10, 20, 30, 0.9) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #00aaff;
    box-shadow: 0 0 20px rgba(0, 170, 255, 0.3);
}
.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: #aaddff !important;
    text-shadow: 0 0 5px #00aaff;
}
.navbar-custom .navbar-brand span {
    color: var(--primary);
}
.navbar-custom .nav-link {
    color: #aaddff !important;
    text-shadow: 0 0 5px #00aaff;
    transition: 0.2s;
}
.navbar-custom .nav-link:hover {
    color: #fff !important;
    text-shadow: 0 0 10px #00aaff;
}

/* ----- 卡片组件 ----- */
.card-glass {
    background: rgba(20, 30, 40, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid #2a4c6e;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 150, 255, 0.2);
    color: #ddd;
    padding: 24px;
    margin-bottom: 20px;
}

/* ----- 按钮 ----- */
.btn-primary-custom {
    background: linear-gradient(45deg, #0066aa, #0099ff);
    border: none;
    box-shadow: 0 0 15px #0099ff;
    color: #fff;
    padding: 8px 24px;
    border-radius: 8px;
    transition: 0.3s;
}
.btn-primary-custom:hover {
    background: linear-gradient(45deg, #0088dd, #00bbff);
    box-shadow: 0 0 25px #00bbff;
    transform: scale(1.02);
    color: #fff;
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid #2a6f9c;
    color: #aaddff;
    padding: 8px 24px;
    border-radius: 8px;
    transition: 0.3s;
}
.btn-outline-custom:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(108,92,231,0.1);
}

/* ----- 表单输入 ----- */
.form-control-custom {
    background: rgba(10, 20, 30, 0.8);
    border: 1px solid #2a6f9c;
    color: #e0e0e0;
    padding: 10px 14px;
    border-radius: 8px;
    width: 100%;
    transition: 0.3s;
}
.form-control-custom:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px #00aaff;
    color: #fff;
}

/* ----- 树形结构 ----- */
.tree-root {
    padding-left: 0;
    list-style: none;
}
.tree-node {
    padding: 6px 0 6px 20px;
    border-left: 2px solid var(--border-color);
    margin-left: 8px;
    position: relative;
}
.tree-node .node-label {
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 6px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tree-node .node-label:hover {
    background: rgba(108, 92, 231, 0.1);
}
.tree-node .node-label .icon {
    font-size: 1.1rem;
}
.tree-node .node-label .badge-count {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 8px;
    border-radius: 12px;
    margin-left: 6px;
}
.tree-node .toggle-icon {
    font-size: 0.7rem;
    margin-right: 4px;
}

/* ----- 关联资产缩略图标签 ----- */
.asset-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(108,92,231,0.15);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 0.9rem;
    margin: 2px;
    flex-wrap: wrap;
    border: 1px solid rgba(108,92,231,0.2);
}
.asset-tag img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 4px;
}
.asset-tag .remove {
    cursor: pointer;
    opacity: 0.6;
    margin-left: 6px;
}
.asset-tag .remove:hover {
    opacity: 1;
}

/* ----- 资产卡片网格 ----- */
.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.asset-card {
    background: rgba(22,27,34,0.8);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #333;
}
.asset-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

/* ----- 视频预览 ----- */
video {
    background: #000;
    border-radius: 8px;
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* ----- 镜头编辑横向布局 ----- */
.shot-edit-layout {
    display: flex;
    gap: 20px;
    width: 70%;
    margin: 0 auto;
}
.shot-edit-menu {
    flex: 0 0 200px;
    background: rgba(22,27,34,0.9);
    border-radius: 12px;
    padding: 16px;
    position: sticky;
    top: 80px;
    height: fit-content;
}
.shot-edit-content {
    flex: 1;
    background: rgba(22,27,34,0.9);
    border-radius: 12px;
    padding: 24px;
}

/* 搜索框 */
.search-box {
    max-width: 300px;
}
.search-box input {
    background: rgba(255,255,255,0.1);
    border: 1px solid #444;
    color: white;
    border-radius: 20px;
    padding: 8px 16px;
    width: 100%;
}
.search-box input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 10px rgba(108,92,231,0.3);
}

/* ----- 工具类 ----- */
.text-muted-custom {
    color: var(--text-muted);
}
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
/* 确保所有输入框文本可见 */
input, textarea, select {
    color: #e0e0e0 !important;
    background-color: rgba(10, 20, 30, 0.8) !important;
}
.form-control, .form-control-custom {
    background-color: rgba(10, 20, 30, 0.8) !important;
    color: #e0e0e0 !important;
    border: 1px solid #2a6f9c;
}
.form-control:focus, .form-control-custom:focus {
    background-color: rgba(10, 20, 30, 0.9) !important;
    color: #fff !important;
}
/* 关联资产缩略图方形 */
.asset-tag img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 4px;
}

/* 居中提示 */
#messageContainer .alert {
    background: rgba(40, 167, 69, 0.95);
    color: #fff;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}