/* 西安音乐学院曲目库查询系统样式 */

/* CSS变量定义 - 按照UI风格指导 */
:root {
    --primary-color: #b42d31;
    --primary-dark: #9a1f23;
    --primary-light: #c74449;
    --text-on-primary: #ffffff;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e6e6e6;
    --text-color: #333333;
    --text-muted: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --hover-bg: rgba(180, 45, 49, 0.05);
    --selected-bg: rgba(180, 45, 49, 0.25);
    --disabled-bg: rgba(0, 0, 0, 0.3);
}

/* 全局字体设置 */
body {
    font-family: "Microsoft YaHei", "Heiti SC", sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
}

/* 导航栏样式 */
.navbar-dark.bg-primary {
    background-color: var(--primary-color) !important;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

/* 卡片样式 - 按照UI风格指导 */
.card {
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    font-weight: 600;
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0 !important;
}

.card-body {
    background-color: var(--bg-white);
}

/* 按钮样式 */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
}

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



/* 表格样式 - 按照UI风格指导 */
.table thead th {
    background-color: var(--primary-color);
    color: var(--text-on-primary);
    border: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    vertical-align: middle;
    padding: 12px 6px;
}

.table tbody td {
    padding: 10px 6px;
    vertical-align: middle;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
}

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

.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 表单控件样式 */
.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(180, 45, 49, 0.25);
}

.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.input-group-text {
    background-color: var(--bg-light);
    border-color: #ced4da;
    color: var(--text-muted);
}

/* 选择框样式 */
.form-label {
    font-size: 0.9rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

#departmentSelect, #directionSelect, #direction2Select {
    font-size: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    transition: all 0.2s ease;
}

#departmentSelect:focus, #directionSelect:focus, #direction2Select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(180, 45, 49, 0.25);
    outline: none;
}

#directionSelect:disabled, #direction2Select:disabled {
    background-color: #f8f9fa;
    color: var(--text-muted);
    cursor: not-allowed;
}

/* 徽章样式 */
.badge-primary {
    background-color: var(--primary-color);
}

.badge-type {
    background-color: var(--info-color);
    color: white;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 12px;
}

.badge-stage {
    background-color: var(--warning-color);
    color: #212529;
    font-size: 0.8em;
    padding: 4px 8px;
    border-radius: 12px;
}

/* 分页样式 */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-on-primary);
}

.pagination .page-link:hover {
    background-color: var(--hover-bg);
    border-color: var(--primary-light);
    color: var(--primary-dark);
}



/* 警告框样式 */
.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    border-color: var(--info-color);
    color: #0c5460;
    border-radius: 0.375rem;
}

/* 加载状态 */
.loading-overlay {
    position: relative;
}

.loading-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.spinner-border {
    color: var(--primary-color);
}

/* 页脚样式 */
footer {
    background-color: var(--bg-light) !important;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

/* 空状态样式 */
.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* 统计信息样式 */
.stats-info-bar {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 8px;
}

/* 竖屏阅读提示样式 */
.orientation-tip {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 8px;
    display: none; /* 默认隐藏 */
}

.stats-number {
    font-size: 1em;
    font-weight: 500;
    color: var(--primary-color);
}

/* 标题样式 */
.display-4 {
    font-size: 2.8rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .stats-info-bar {
        font-size: 1rem;
        padding: 6px 10px;
    }
    
    .stats-number {
        font-size: 1em;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 6px 3px;
    }
    
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .display-4 {
        font-size: 1.8rem;
    }
    
    .table-responsive {
        font-size: 0.7rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 5px 2px;
    }
    
    .input-group {
        margin-bottom: 10px;
    }
        
    .stats-info-bar {
        font-size: 0.95rem;
        padding: 6px 8px;
    }
    
    .stats-number {
        font-size: 1em;
    }
    
    .col-md-6, .col-md-3 {
        margin-bottom: 10px;
    }
}

/* 竖屏小设备显示阅读提示 */
@media (max-width: 768px) and (orientation: portrait) {
    .orientation-tip {
        display: block;
    }
}

/* 悬浮展开按钮样式 */
.expand-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color), #d32f36);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 20px;
    box-shadow: 0 4px 20px rgba(180, 45, 49, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 500;
    display: none; /* 默认隐藏 */
    align-items: center;
    gap: 8px;
    min-width: 90px;
    backdrop-filter: blur(10px);
}

.expand-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(180, 45, 49, 0.4);
    background: linear-gradient(135deg, #d32f36, var(--primary-color));
}

.expand-toggle-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 15px rgba(180, 45, 49, 0.3);
}

.expand-toggle-btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.expand-toggle-btn.expanded i {
    transform: rotate(45deg);
}

/* 页面展开状态 */
.page-expanded .container {
    max-width: 100%;
    margin: 0;
    padding-left: 15px;
    padding-right: 15px;
}

/* 移动端横屏时显示悬浮按钮 */
@media (max-width: 1024px) and (orientation: landscape) {
    .expand-toggle-btn {
        display: flex;
    }
}

/* 移动端横屏模式优化搜索筛选器间距 */
@media (max-width: 768px) and (orientation: landscape) {
    .col-md-6, .col-md-3 {
        padding-left: 8px;
        padding-right: 8px;
        margin-bottom: 12px;
    }
    
    .input-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        margin-bottom: 0;
    }
    
    /* 搜索和筛选区域的行间距 */
    .row.mb-3 {
        margin-bottom: 1.5rem !important;
    }
}

/* 小屏横屏设备进一步优化 */
@media (max-width: 576px) and (orientation: landscape) {
    .col-md-6, .col-md-3 {
        padding-left: 6px;
        padding-right: 6px;
        margin-bottom: 8px;
    }
    
    .input-group {
        margin-bottom: 8px;
    }
    
    /* 筛选器选择框字体稍微小一点，增加可用空间 */
    #typeFilter, #stageFilter {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
    
    /* 搜索框字体也稍微调整 */
    #searchInput {
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
    
    .input-group-text {
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* 无障碍设计 */
.btn:focus,
.form-control:focus,
.page-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 动画效果 */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

/* 搜索高亮 */
.search-highlight {
    background-color: #fff3cd;
    font-weight: 600;
    border-radius: 2px;
    padding: 1px 2px;
}

/* 曲目表格特殊样式 */
.repertoire-title {
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.4;
}

.repertoire-creator {
    color: var(--text-muted);
    font-size: 0.9em;
}

.repertoire-remark {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85em;
}

/* 选中状态指示 */
.selected-indicator {
    border-left: 4px solid var(--primary-color);
    background-color: var(--hover-bg);
}

/* 通知容器样式 */
.notification-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    width: 90%;
    max-width: 600px;
    pointer-events: none;
}

.notification-container .alert {
    pointer-events: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    border: none;
}

/* 响应式通知容器 */
@media (max-width: 768px) {
    .notification-container {
        width: 95%;
        top: 15px;
    }
} 