/* ============================================
   短剧-短剧搜 公共样式表
   现代化设计 + 全端响应式适配
   ============================================ */

/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #dbeafe;
    --secondary: #8b5cf6;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f0f4f8;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px 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: 12px;
    --radius-sm: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 渐变背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: -1;
    opacity: 0.08;
}

/* 链接 */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
a:hover {
    color: var(--primary-dark);
}

/* 卡片 */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover {
    box-shadow: var(--shadow-md);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    color: white;
}
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16,185,129,0.4);
    color: white;
}
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239,68,68,0.4);
    color: white;
}
.btn-outline {
    background: white;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

/* 输入框 */
.input, .select, .textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: all 0.2s;
    background: white;
    font-family: inherit;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.textarea {
    resize: vertical;
    min-height: 80px;
}

/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag-blue { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: #d1fae5; color: #047857; }
.tag-purple { background: #ede9fe; color: #6d28d9; }
.tag-orange { background: #fed7aa; color: #c2410c; }

/* 提示消息 */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 16px;
}
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* 表格 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-light);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}
.table tr:hover td {
    background: #f8fafc;
}

/* 导航栏 */
.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 14px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-links {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.navbar-links a {
    font-size: 14px;
    color: var(--text-light);
    transition: color 0.2s;
}
.navbar-links a:hover {
    color: var(--primary);
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.2s;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-light);
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

/* ============================================
   响应式适配
   ============================================ */

/* 大屏（桌面） */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 24px;
    }
}

/* 中屏（平板） */
@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        padding: 16px;
    }
}

/* 小屏（手机） */
@media (max-width: 767px) {
    .container {
        padding: 12px;
    }
    .navbar {
        padding: 12px 16px;
    }
    .navbar-brand {
        font-size: 16px;
    }
    .navbar-links {
        gap: 12px;
    }
    .navbar-links a {
        font-size: 13px;
    }
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    .table th, .table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    /* 隐藏手机端非必要列 */
    .hide-mobile {
        display: none;
    }
}

/* 超小屏 */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    .pagination a, .pagination span {
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 细节优化 */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}
::selection {
    background: #667eea;
    color: white;
}
img {
    -webkit-user-drag: none;
    user-select: none;
}
.btn:active {
    transform: scale(0.97);
}
a:active {
    opacity: 0.8;
}

/* 手机端导航栏优化 */
@media (max-width: 480px) {
    .navbar {
        padding: 10px 12px;
        gap: 8px;
    }
    .navbar-links {
        gap: 10px;
        width: 100%;
        justify-content: center;
    }
    .navbar-links a {
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* 加载动画 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

