/* 基础样式 */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

body {
    font-family: "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* 登录页样式 */
.login-container {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.login-form {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.login-form .description {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-check {
    margin: 1rem 0 1.5rem;
}

/* 分类列表样式 - 新的紧凑样式 */
.category-list {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.category-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.category-item:last-child {
    border-bottom: none;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.category-item h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
}

.category-item small {
    display: block;
    margin-top: 3px;
    color: #6c757d;
    font-size: 0.85rem;
}

/* 子分类样式 - 新的紧凑样式 */
.subcategory-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 1rem;
}

.subcategory-item {
    display: inline-block;
    padding: 6px 12px;
    background-color: #f0f4f8;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s;
}

.subcategory-item:hover {
    background-color: #e0e8f0;
    transform: translateY(-2px);
}

/* 话术表格样式 - 参考图片布局 */
.phrase-table {
    width: 100%;
    background-color: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.phrase-row {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: #fff;
    margin-bottom: 10px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

/* 标题样式 */
.phrase-title {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
    padding-right: 15px;
    font-weight: 500;
    color: #0d6efd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* 内容样式 */
.phrase-content {
    flex: 1;
    padding: 0 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    color: #666;
    width: auto !important; /* 防止其他样式覆盖 */
    max-width: calc(100% - 245px) !important; /* 防止其他样式覆盖 */
    box-sizing: border-box;
}

/* 操作区域样式 */
.phrase-action {
    width: 80px;
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
    margin-left: auto;
}

.phrase-action .copy-btn {
    width: 100%;
    font-size: 0.9rem;
}

/* 复制成功提示 */
.copy-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #198754;
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1050;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.copy-success-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.copy-success-notification i {
    margin-right: 8px;
}

/* 复制按钮样式 */
.copy-btn {
    transition: all 0.2s;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .login-form {
        padding: 1.5rem;
    }
    
    .phrase-row {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .phrase-title {
        width: 25%;
        min-width: 25%;
        max-width: 25%;
        margin-bottom: 0;
        font-size: 0.9rem;
    }
    
    .phrase-content {
        width: 55% !important;
        max-width: 55% !important;
        padding: 0 10px 0 0;
    }
    
    .phrase-action {
        width: 20%;
        min-width: 20%;
    }
    
    .phrase-action .copy-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* 面包屑导航样式 */
.breadcrumb {
    padding: 0.75rem 1rem;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

/* 提示框样式 */
.toast {
    opacity: 1 !important;
}

.toast-header {
    color: #fff;
}

/* 页脚样式 */
footer {
    padding: 2rem 0;
    margin-top: auto;
    border-top: 1px solid #e9ecef;
}

/* 模态框内容样式 */
#modalContent {
    white-space: pre-line;
    max-height: 300px;
    overflow-y: auto;
}

/* 分类标题样式 */
.category-title {
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* 分类容器样式 */
.category-container {
    margin-bottom: 3rem;
}

/* 自定义滚动条 */
.phrase-content::-webkit-scrollbar {
    width: 6px;
}

.phrase-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.phrase-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.phrase-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 左侧边栏样式 */
.category-sidebar {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.sidebar-header h5 {
    margin: 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
}

.sidebar-content {
    padding: 10px 0;
}

/* 侧边栏分类树样式 */
.category-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-tree ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-tree li {
    position: relative;
    margin: 0;
    line-height: 2.2;
    list-style-type: none;
    margin-bottom: 3px;
}

.category-tree a {
    display: block;
    padding: 5px 10px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 18px;
    border-radius: 0;
}

.category-tree a:hover {
    background-color: #f0f4f8;
    color: var(--primary-color);
}

.category-tree a.active {
    background-color: #e0e8f0;
    color: var(--primary-color);
    font-weight: 500;
}

/* 分类层级缩进 - 简单缩进方式，减少缩进量 */
.category-tree a.level-0 {
    padding-left: 10px;
    font-weight: bold;
    font-size: 18px;
}

.category-tree a.level-1 {
    padding-left: 18px;
}

.category-tree a.level-2 {
    padding-left: 26px;
}

.category-tree a.level-3 {
    padding-left: 34px;
}

.category-tree a.level-4 {
    padding-left: 42px;
}

.category-tree a.level-5 {
    padding-left: 50px;
}

/* 响应式侧边栏 */
@media (max-width: 768px) {
    .category-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 80%;
        height: 100%;
        z-index: 1040;
        transition: left 0.3s;
        border-radius: 0;
        max-height: 100%;
    }
    
    .category-sidebar.show {
        left: 0;
    }
    
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1030;
        display: none;
    }
    
    .sidebar-backdrop.show {
        display: block;
    }
    
    .sidebar-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background-color: var(--primary-color);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        z-index: 1020;
        cursor: pointer;
    }
} 