/**
 * TXT文本外链系统 - 样式表 (兼容版)
 * 支持 IE11+ 及所有现代浏览器
 */

/* IE盒模型 */
* {
    box-sizing: border-box;
}

/* IE10+ flexbox 支持 */
.flex {
    display: -webkit-box;  /* 老版本 Safari/iOS */
    display: -moz-box;     /* 老版本 Firefox */
    display: -ms-flexbox;  /* IE10 */
    display: flex;
}

/* CSS变量备用 */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

/* 文本溢出省略号（兼容版） */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 清除浮动（兼容IE） */
.clearfix:before,
.clearfix:after {
    content: " ";
    display: table;
}
.clearfix:after {
    clear: both;
}

/* IE11 placeholder 颜色 */
::-ms-input-placeholder {
    color: #6c757d;
}

/* 禁用文本选择（兼容版） */
.no-select {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* 全局样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 导航栏 */
.navbar-brand {
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* 上传区域 */
.upload-area {
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #0d6efd !important;
    background-color: #f8f9fa;
}

.upload-area.dragover {
    border-color: #0d6efd !important;
    background-color: #e7f1ff;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.05);
    border-radius: 10px 10px 0 0 !important;
}

/* 表格样式 */
.table {
    font-size: 0.95rem;
}

.table th {
    font-weight: 600;
    border-top: none;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-lg {
    border-radius: 8px;
}

/* 徽章样式 */
.badge {
    font-weight: 500;
}

/* 页脚 */
.footer {
    margin-top: auto;
}

/* 文件内容显示 */
.file-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 编辑器 */
#editor {
    tab-size: 4;
    -moz-tab-size: 4;
    padding: 15px;
    border: none;
    outline: none;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* 边框虚线 */
.border-dashed {
    border-style: dashed !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .upload-area {
        padding: 2rem !important;
    }
}

/* 管理员后台 */
.admin-sidebar {
    min-height: calc(100vh - 56px);
    background: #343a40;
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 12px 20px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link i {
    width: 24px;
}

/* 统计卡片 */
.stat-card {
    border-left: 4px solid;
}

.stat-card.primary { border-left-color: #0d6efd; }
.stat-card.success { border-left-color: #198754; }
.stat-card.warning { border-left-color: #ffc107; }
.stat-card.danger { border-left-color: #dc3545; }
.stat-card.info { border-left-color: #0dcaf0; }

/* 卡密显示 */
.card-no {
    font-family: 'Consolas', monospace;
    letter-spacing: 1px;
}

/* 提示框 */
.tooltip-inner {
    font-size: 12px;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
