/* ============================================
   欧可电竞娱乐 - 全站样式
   ============================================ */

/* ---- 变量系统 ---- */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-bg: #eef2ff;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --success: #10b981;
    --danger: #ef4444;
    --info: #06b6d4;
    --dark: #1e293b;
    --body-bg: #f1f5f9;
    --card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    --card-shadow-hover: 0 8px 30px rgba(99,102,241,.18);
    --radius-sm: .5rem;
    --radius-md: .75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ---- 全局基础 ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-sans);
    color: #334155;
    background: var(--body-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }
::selection { background: var(--primary); color: #fff; }

/* ---- Bootstrap 覆写 ---- */
.btn {
    font-weight: 500;
    border-radius: var(--radius-sm);
    padding: .5rem 1.25rem;
    transition: all var(--transition);
    letter-spacing: .01em;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 8px rgba(99,102,241,.25); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); box-shadow: 0 4px 14px rgba(99,102,241,.35); transform: translateY(-1px); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); box-shadow: 0 2px 10px rgba(99,102,241,.2); }
.btn-warning { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-outline-danger:hover { box-shadow: 0 2px 8px rgba(239,68,68,.2); }
.btn-outline-success:hover { box-shadow: 0 2px 8px rgba(16,185,129,.2); }
.btn-lg { padding: .65rem 1.5rem; font-size: 1.05rem; border-radius: var(--radius-md); }
.btn-sm { padding: .3rem .85rem; font-size: .82rem; }
.rounded-pill { border-radius: 50rem !important; }

.text-primary { color: var(--primary) !important; }
.text-danger  { color: #ef4444 !important; }
.text-success { color: #10b981 !important; }
.text-warning { color: #f59e0b !important; }
.text-info    { color: #06b6d4 !important; }

/* 让 Bootstrap bg-opacity 系统正常工作 */
:root {
    --bs-primary-rgb: 99,102,241;
    --bs-danger-rgb: 239,68,68;
    --bs-success-rgb: 16,185,129;
    --bs-warning-rgb: 245,158,11;
    --bs-info-rgb: 6,182,212;
}
.bg-primary { background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity, 1)) !important; }

.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #e2e8f0;
    transition: border-color var(--transition), box-shadow var(--transition);
    padding: .55rem .85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}
.form-label { font-weight: 500; font-size: .88rem; color: #475569; margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.form-text { font-size: .78rem; }
.input-group-text { background: #f8fafc; border: 1.5px solid #e2e8f0; color: #94a3b8; }

/* ---- 顶部导航栏 ---- */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    padding: .6rem 0;
    transition: all .35s cubic-bezier(.4,0,.2,1);
}

/* 首页：透明 → 滚动变毛玻璃 */
.top-nav-transparent { background: transparent; }
.top-nav-transparent.scrolled {
    background: rgba(15,15,30,.88);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    box-shadow: 0 4px 30px rgba(0,0,0,.2);
    padding: .45rem 0;
}

/* 非首页：始终实心深色 */
.top-nav-solid {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.top-nav-solid.scrolled {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 4px 30px rgba(0,0,0,.25);
    padding: .45rem 0;
}
.top-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.top-nav-brand img { height: 36px; transition: height .3s; filter: drop-shadow(0 1px 4px rgba(0,0,0,.2)); }
.top-nav.scrolled .top-nav-brand img { height: 30px; }

.top-nav-links {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: 1.5rem;
}
.top-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: 50rem;
    color: rgba(255,255,255,.75);
    font-weight: 500;
    font-size: .9rem;
    text-decoration: none;
    transition: all .25s;
    white-space: nowrap;
}
.top-nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.top-nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.15);
}
.top-nav-link i { font-size: .88rem; }

.top-nav-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

/* CTA 按钮 */
.top-nav-cta {
    display: inline-flex;
    align-items: center;
    padding: .45rem 1.2rem;
    border-radius: 50rem;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #000;
    font-weight: 600;
    font-size: .88rem;
    text-decoration: none;
    transition: all .25s;
    box-shadow: 0 2px 10px rgba(245,158,11,.3);
}
.top-nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(245,158,11,.4);
    color: #000;
}

/* 用户头像按钮 */
.top-nav-user { position: relative; }
.top-nav-avatar-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50rem;
    padding: .3rem .8rem .3rem .3rem;
    color: #fff;
    font-size: .88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all .25s;
}
.top-nav-avatar-btn:hover {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.2);
}
.top-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

/* 下拉菜单 */
.top-nav-dropdown {
    border: none !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 0 0 1px rgba(0,0,0,.05) !important;
    padding: 0 !important;
    min-width: 240px !important;
    overflow: hidden;
    animation: navDropIn .25s ease;
}
@keyframes navDropIn { from { opacity:0; transform:translateY(-10px) scale(.97); } to { opacity:1; transform:translateY(0) scale(1); } }

.top-nav-dropdown-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border-bottom: 1px solid #f1f5f9;
}
.top-nav-dropdown-body {
    padding: .5rem;
}
.top-nav-dropdown-body a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .6rem .85rem;
    border-radius: .6rem;
    color: #334155;
    font-size: .88rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.top-nav-dropdown-body a:hover {
    background: #eef2ff;
    color: var(--primary);
}
.top-nav-dropdown-body a i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    opacity: .6;
}
.top-nav-dropdown-body a:hover i { opacity: 1; color: var(--primary); }
.top-nav-dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: .35rem .5rem;
}
.top-nav-dropdown-footer {
    padding: .5rem;
    border-top: 1px solid #f1f5f9;
}
.top-nav-dropdown-footer a {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .85rem;
    border-radius: .6rem;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.top-nav-dropdown-footer a:hover { background: #fef2f2; }

/* 汉堡按钮 */
.top-nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: .5rem;
    padding: 8px;
    cursor: pointer;
    transition: all .25s;
}
.top-nav-toggle:hover { background: rgba(255,255,255,.2); }
.top-nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all .3s;
}
.top-nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.top-nav-toggle.active span:nth-child(2) { opacity: 0; }
.top-nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* 移动端菜单 */
.top-nav-mobile {
    display: none;
    padding: .5rem 1rem 1rem;
    border-top: 1px solid rgba(255,255,255,.08);
    margin-top: .5rem;
}
.top-nav-mobile.show { display: block; }
.top-nav-mobile-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .75rem;
    color: rgba(255,255,255,.7);
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    border-radius: .6rem;
    transition: all .2s;
}
.top-nav-mobile-link:hover,
.top-nav-mobile-link.active {
    color: #fff;
    background: rgba(255,255,255,.1);
}
.top-nav-mobile-link i { font-size: 1rem; width: 24px; text-align: center; }


/* ---- 卡片系统 ---- */
.card {
    border: none;
    background: #fff;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition);
}
.rounded-4 { border-radius: var(--radius-xl) !important; }
.card.shadow-sm { box-shadow: var(--card-shadow); }

/* ---- 陪玩卡片 ---- */
.companion-card {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}
.companion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity var(--transition);
}
.companion-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}
.companion-card:hover::before { opacity: 1; }
.companion-card h6 { transition: color var(--transition); }
.companion-card:hover h6 { color: var(--primary); }

/* ---- 头像 ---- */
.avatar-placeholder {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(99,102,241,.15);
}
.avatar-wrapper { position: relative; display: inline-block; }
.status-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    position: absolute;
    bottom: 2px;
    right: 2px;
    border: 2.5px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.status-dot.bg-success { animation: pulse-green 2s infinite; }
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* ---- Feature 图标 ---- */
.feature-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    border-radius: 50%;
    transition: transform var(--transition);
}
.feature-icon:hover { transform: scale(1.1) rotate(-5deg); }

/* ---- 标签页 / 筛选 ---- */
.nav-pills .nav-link {
    color: #64748b;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: .88rem;
    padding: .45rem 1rem;
    transition: all var(--transition);
}
.nav-pills .nav-link:hover { background: var(--primary-bg); color: var(--primary); }
.nav-pills .nav-link.active {
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

/* ---- 表格美化 ---- */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}
.table thead th {
    font-weight: 600;
    color: #64748b;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 2px solid #e2e8f0;
    padding: .75rem .85rem;
    white-space: nowrap;
}
.table tbody td {
    vertical-align: middle;
    padding: .7rem .85rem;
    border-bottom: 1px solid #f1f5f9;
}
.table tbody tr { transition: background var(--transition); }
.table-hover tbody tr:hover { background: var(--primary-bg); }

/* ---- 分页 ---- */
.pagination { gap: 4px; }
.pagination .page-link {
    color: var(--primary);
    border-radius: var(--radius-sm);
    border: 1.5px solid #e2e8f0;
    font-weight: 500;
    font-size: .88rem;
    padding: .4rem .8rem;
    transition: all var(--transition);
}
.pagination .page-link:hover { background: var(--primary-bg); border-color: var(--primary-light); }
.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
}

/* ---- Badge ---- */
.badge {
    font-weight: 500;
    padding: .4em .7em;
    font-size: .78rem;
    letter-spacing: .01em;
    border-radius: var(--radius-sm);
}

/* ---- 订单卡片 ---- */
.card .d-flex .avatar-placeholder + div h6 { margin-bottom: 2px; }

/* ---- 数据统计卡片 ---- */
.card .fs-3.fw-bold,
.card .fs-4.fw-bold { letter-spacing: -.02em; }

/* ---- 搜索/筛选侧栏 ---- */
.card-body .form-label.small { font-size: .82rem; font-weight: 600; color: #475569; text-transform: uppercase; letter-spacing: .03em; }

/* ---- 排序按钮组 ---- */
.btn-group .btn-outline-secondary {
    border-color: #e2e8f0;
    color: #64748b;
    font-size: .82rem;
}
.btn-group .btn-outline-secondary.active,
.btn-group .btn-outline-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ---- 增值服务项 ---- */
.vas-item {
    border: 1.5px solid #e2e8f0 !important;
    transition: all var(--transition);
}
.vas-item:hover {
    border-color: var(--primary-light) !important;
    background: var(--primary-bg);
}

/* ---- 下单右侧面板 ---- */
.sticky-top .card-body h5 { letter-spacing: -.01em; }
.sticky-top .bg-light { background: #f8fafc !important; border: 1.5px solid #e2e8f0; }

/* ---- Alert Flash ---- */
.alert {
    border: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: .9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.06);
}

/* ---- 登录/注册 ---- */
body.bg-gradient-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%) !important;
    min-height: 100vh;
}
body.bg-gradient-primary .card {
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,.1);
}
body.bg-gradient-primary .card h3 {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- 页脚 ---- */
.site-footer {
    background: #0c0c1d;
    padding: 3.5rem 0 0;
    color: rgba(255,255,255,.5);
    font-size: .88rem;
}
.footer-desc { color: rgba(255,255,255,.4); font-size: .85rem; line-height: 1.7; margin-bottom: 1rem; }
.footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1rem;
}
.footer-link {
    display: block;
    color: rgba(255,255,255,.45);
    text-decoration: none;
    padding: .3rem 0;
    font-size: .85rem;
    transition: all .2s;
}
.footer-link:hover { color: #fff; transform: translateX(3px); }
.footer-contact div {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem 0;
    color: rgba(255,255,255,.45);
}
.footer-contact i { color: var(--primary-light); font-size: .9rem; }
.footer-social {
    display: flex;
    gap: .5rem;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.4);
    font-size: 1rem;
    text-decoration: none;
    transition: all .25s;
}
.footer-social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    padding: 1.5rem 0;
    margin-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: .78rem;
    color: rgba(255,255,255,.3);
}
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a { color: rgba(255,255,255,.3); text-decoration: none; transition: color .2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,.6); }

/* ---- 全局动画 ---- */
.card, .btn, .badge, .nav-link, .form-control, .form-select { transition: all var(--transition); }

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

/* ---- 字重工具类 ---- */
.fw-500 { font-weight: 500 !important; }
.fw-600 { font-weight: 600 !important; }
.fw-800 { font-weight: 800 !important; }


/* ---- 通知列表 ---- */
.notification-item { transition: background var(--transition); border-radius: var(--radius-md); }
.notification-item:hover { background: #f8fafc; }

/* ---- 空状态 ---- */
.empty-state { padding: 3rem 1rem; text-align: center; }
.empty-state i { font-size: 3rem; opacity: .3; }

/* ---- 背景透明覆盖 ---- */
.bg-opacity-15 { --bs-bg-opacity: .15; }
.opacity-85 { opacity: .85; }
.opacity-75 { opacity: .75; }

/* ---- 统计卡片 ---- */
.stat-card {
    border: none;
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    transition: transform var(--transition);
}
.stat-card:hover { transform: translateY(-3px); }

/* ---- 订单时间线 ---- */
.order-status-badge { font-size: .78rem; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .container { padding-left: 1rem; padding-right: 1rem; }
    .nav-pills { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding-bottom: .5rem; }
    .nav-pills::-webkit-scrollbar { display: none; }
    .table { font-size: .85rem; }
    #hoursGroup { flex-wrap: wrap; }
    #hoursGroup label { flex: 0 0 48% !important; }
}
