/* =====================================================
   黃金價格行情網 - 科技風主題樣式 (Tech Theme)
   ===================================================== */

/* ---- 全局變量 ---- */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #111638;
    --bg-card: rgba(26, 31, 58, 0.75);
    --border-glow: rgba(0, 212, 255, 0.3);
    --accent-cyan: #00d4ff;
    --accent-gold: #ffd700;
    --accent-pink: #ff6b9d;
    --text-primary: #e0e6ed;
    --text-secondary: #8892b0;
    --text-muted: #5a6480;
    --up-color: #ff4757;
    --down-color: #2ed573;
    --glass-blur: 12px;
    --card-radius: 12px;
}

/* ---- 全局 ---- */
* { box-sizing: border-box; }

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%) !important;
    background-attachment: fixed;
    color: var(--text-primary) !important;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif !important;
    min-height: 100vh;
}

a { color: var(--text-primary) !important; text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--accent-cyan) !important; text-decoration: none; }

/* ---- 粒子背景 ---- */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 215, 0, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 157, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

/* ---- 城市列表区域（jinjia页面专用） ---- */
.bg-f {
    background: var(--bg-card) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}
.area-list {
    position: relative;
    padding: 30px;
    border-radius: 8px;
}
.area-list-prov {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 212, 255, 0.15) !important;
}
.area-list h3 {
    position: absolute;
    left: 0;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    padding: 0;
    width: 90px;
    color: var(--accent-cyan) !important;
    letter-spacing: 0.5px;
}
.area-list-city {
    position: relative;
    margin-left: 10px;
    margin-top: 8px;
    font-size: 14px;
    line-height: 28px;
}
.area-list-city a, .area-list-area a {
    color: var(--text-primary) !important;
    margin-right: 10px;
    transition: all 0.3s ease;
}
.area-list-city a:hover, .area-list-area a:hover {
    color: var(--accent-cyan) !important;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
    text-decoration: none;
}
.area-list-area {
    position: relative;
    margin-left: 10px;
    font-size: 14px;
    line-height: 24px;
}

/* ---- 面包屑 ---- */
.breadcrumb {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    padding: 12px 20px !important;
    margin-bottom: 20px;
}
.breadcrumb a, .breadcrumb span { color: var(--text-secondary); padding: 0 8px; }
.breadcrumb a:hover { color: var(--accent-cyan); }
.shadow {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3) !important;
}

/* ---- 标题 ---- */
.section-title {
    background: transparent !important;
    border-left: 3px solid var(--accent-cyan) !important;
    padding: 12px 16px !important;
    margin-bottom: 1rem !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: 1px !important;
    border-radius: 0 8px 8px 0 !important;
}

/* ---- 猜您喜欢列表 ---- */
.list-group-item {
    background: rgba(17, 22, 56, 0.6) !important;
    border: 1px solid rgba(0, 212, 255, 0.15) !important;
    color: var(--text-primary) !important;
    padding: 12px 16px;
    transition: all 0.3s ease;
}
.list-group-item:hover {
    background: rgba(0, 212, 255, 0.1) !important;
    border-color: var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
}
.list-group-item a {
    color: var(--text-primary) !important;
    transition: color 0.3s ease;
}
.list-group-item a:hover {
    color: var(--accent-cyan) !important;
}

/* ---- 文章内容标题 ---- */
.content-box .title,
.content-box h1.title {
    color: var(--text-primary) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
    padding: 10px 0;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- 文章信息 ---- */
.info {
    color: var(--text-secondary) !important;
}
.info span, .info p {
    color: var(--text-secondary) !important;
}

/* ---- 滾動條 ---- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-cyan); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #33e5ff; }

/* ---- 導航欄 ---- */
.navbar {
    background: rgba(10, 14, 39, 0.9) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border-bottom: 1px solid var(--border-glow) !important;
    box-shadow: 0 2px 20px rgba(0, 212, 255, 0.1) !important;
    padding: 0.8rem 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1050 !important;
}

.navbar-brand.logo img { max-height: 36px; height: auto; width: auto; display: block; filter: drop-shadow(0 0 8px var(--accent-cyan)); transition: filter 0.3s ease; }
.navbar-brand.logo:hover img { filter: drop-shadow(0 0 12px #33e5ff); }

.nav-item.hover .nav-link,
.nav-item:hover .nav-link {
    color: var(--accent-cyan) !important;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.5);
    background: transparent !important;
    border-bottom: 2px solid var(--accent-cyan);
}

.nav-link { color: var(--text-secondary) !important; transition: all 0.3s ease; padding: 0.5rem 1rem !important; border-radius: 6px; }
.nav-link:hover { color: var(--accent-cyan) !important; background: rgba(0, 212, 255, 0.08) !important; }

/* ---- 搜索框 ---- */
.input-group { border-radius: 8px; overflow: hidden; }
.form-control {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--border-glow) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-control:focus {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.25) !important;
}

.btn-outline-light {
    background: transparent !important;
    border: 1px solid var(--accent-cyan) !important;
    color: var(--accent-cyan) !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}
.btn-outline-light:hover {
    background: var(--accent-cyan) !important;
    color: var(--bg-primary) !important;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4) !important;
}

/* ---- 行情滾動條 ---- */
.ticker-bar {
    background: linear-gradient(90deg, rgba(0,212,255,0.1), rgba(255,215,0,0.08), rgba(0,212,255,0.1));
    border-bottom: 1px solid var(--border-glow);
    padding: 0.5rem 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}
.ticker-bar::before, .ticker-bar::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}
.ticker-bar::before { left: 0; background: linear-gradient(90deg, var(--bg-primary), transparent); }
.ticker-bar::after { right: 0; background: linear-gradient(-90deg, var(--bg-primary), transparent); }

/* ---- 主容器 ---- */
.container { position: relative; z-index: 1; }

/* ---- 玻璃擬態卡片 ---- */
.content-box {
    background: var(--bg-card) !important;
    backdrop-filter: blur(var(--glass-blur)) !important;
    -webkit-backdrop-filter: blur(var(--glass-blur)) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
    margin-bottom: 20px !important;
    padding: 24px !important;
    transition: all 0.3s ease !important;
}
.content-box:hover {
    border-color: rgba(0, 212, 255, 0.5) !important;
    box-shadow: 0 4px 30px rgba(0, 212, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transform: translateY(-2px);
}

/* ---- 標題 ---- */
.section-title {
    background: transparent !important;
    border-left: 3px solid var(--accent-cyan) !important;
    padding: 12px 16px !important;
    margin-bottom: 1rem !important;
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: 1px !important;
    border-radius: 0 8px 8px 0 !important;
}

h4.section-title, h6.section-title {
    background: transparent !important;
    border-left: 3px solid var(--accent-cyan) !important;
    padding: 12px 16px !important;
    margin-bottom: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    letter-spacing: 0.5px !important;
    border-radius: 0 8px 8px 0 !important;
}

/* ---- 行情列表 ---- */
.list-container {
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    overflow: hidden;
    background: rgba(17, 22, 56, 0.5) !important;
}

.list-group { list-style: none; padding: 0; margin: 0; }

.list-header {
    display: flex;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.12), rgba(255, 215, 0, 0.06)) !important;
    font-weight: 600 !important;
    padding: 0.85rem 1rem !important;
    border-bottom: 1px solid var(--border-glow) !important;
    color: var(--accent-cyan) !important;
    font-size: 0.85rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.list-item {
    display: flex;
    padding: 1rem 1rem !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.08) !important;
    transition: all 0.25s ease !important;
}
.list-item:hover {
    background: rgba(0, 212, 255, 0.06) !important;
    border-bottom-color: var(--border-glow) !important;
}
.list-item:last-child { border-bottom: none !important; }

.list-item .name a {
    color: var(--text-primary) !important;
    font-weight: 500;
}
.list-item .name a:hover { color: var(--accent-cyan) !important; }

.danwei { font-size: 11px; color: var(--text-muted) !important; margin-left: 2px; }

.list-header > div, .list-item > div { flex: 1; }
.list-header .name, .list-item .name { flex: 1.4; }

/* 漲跌顏色（中國股市：紅漲綠跌） */
.text-success { color: var(--down-color) !important; font-weight: 600; }
.text-danger { color: var(--up-color) !important; font-weight: 600; }

/* ---- 文章列表 ---- */
.list-unstyled { list-style: none; padding: 0; margin: 0; }
.list-unstyled li {
    display: flex;
    align-items: flex-start;
    padding: 16px 0 !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.06) !important;
    transition: all 0.3s ease;
}
.list-unstyled li:last-child { border-bottom: none !important; }
.list-unstyled li:hover { border-bottom-color: var(--border-glow) !important; }

.list-unstyled li .list-image {
    width: 28%;
    flex-shrink: 0;
    padding-right: 14px;
}
.list-unstyled li .item-img-inner {
    border-radius: 8px;
    display: block;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}
.list-unstyled li:hover .item-img-inner { box-shadow: 0 4px 20px rgba(0, 212, 255, 0.2); transform: scale(1.02); }
.list-unstyled li .item-img-inner:before { padding-top: 62.5%; content: ''; display: block; }
.list-unstyled li .item-img-inner img { height: 100%; left: 0; object-fit: cover; position: absolute; top: 0; width: 100%; }

.list-unstyled li .item-title {
    font-size: 1rem !important;
    font-weight: 600;
    margin: 0 0 8px !important;
    line-height: 1.5;
}
.list-unstyled li .item-title a {
    color: var(--text-primary) !important;
    max-height: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}
.list-unstyled li .item-title a:hover { color: var(--accent-cyan) !important; }

.list-unstyled li .item-excerpt { font-size: 0.85rem; line-height: 1.6; color: var(--text-secondary) !important; }
.list-unstyled li .item-excerpt p { color: var(--text-secondary) !important; margin: 0; }

.list-unstyled li .item-meta { color: var(--text-muted) !important; font-size: 0.8rem; }
.list-unstyled li .item-meta i { color: var(--accent-cyan); margin-right: 3px; }

/* ---- 頁簽 ---- */
.tags {
    display: inline-block;
    background: rgba(0, 212, 255, 0.06) !important;
    border: 1px solid var(--border-glow) !important;
    padding: 5px 12px !important;
    border-radius: 20px !important;
    color: var(--text-primary) !important;
    font-size: 0.85rem;
    margin: 3px;
    transition: all 0.3s ease;
}
.tags a { color: var(--text-primary) !important; }
.tags:hover {
    background: rgba(0, 212, 255, 0.12) !important;
    border-color: var(--accent-cyan) !important;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

/* ---- 按鈕 ---- */
.btn-outline-secondary {
    border-color: var(--border-glow) !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border-radius: 20px !important;
    padding: 4px 12px !important;
    font-size: 0.8rem !important;
    transition: all 0.3s ease !important;
}
.btn-outline-secondary:hover {
    background: var(--accent-cyan) !important;
    border-color: var(--accent-cyan) !important;
    color: var(--bg-primary) !important;
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), #0099cc) !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #33e5ff, var(--accent-cyan)) !important;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4) !important;
    transform: translateY(-1px);
}

/* ---- 分頁 ---- */
.pagination { display: flex; list-style: none; padding: 0; flex-wrap: wrap; justify-content: center; gap: 6px; }
.pagesize, .current { display: inline-block; padding: 8px 14px; border-radius: 8px; font-size: 0.9rem; }
.pagesize { color: var(--text-secondary) !important; border: 1px solid var(--border-glow) !important; background: rgba(17, 22, 56, 0.5) !important; transition: all 0.3s ease; }
.pagesize:hover { background: rgba(0, 212, 255, 0.1) !important; color: var(--accent-cyan) !important; border-color: var(--accent-cyan) !important; }
.current { background: var(--accent-cyan) !important; color: var(--bg-primary) !important; border: 1px solid var(--accent-cyan) !important; font-weight: 600; box-shadow: 0 0 12px rgba(0, 212, 255, 0.3); }

/* ---- 頁腳 ---- */
.footer {
    background: rgba(10, 14, 39, 0.95) !important;
    border-top: 1px solid var(--border-glow) !important;
    color: var(--text-secondary) !important;
    margin-top: 40px;
}
.footer a { color: var(--text-secondary) !important; transition: color 0.3s ease; }
.footer a:hover { color: var(--accent-cyan) !important; }

.foot-links a, .foot-nav a { padding: 0 8px; color: var(--text-secondary) !important; font-size: 0.9rem; transition: color 0.3s ease; }
.foot-links a:hover, .foot-nav a:hover { color: var(--accent-cyan) !important; }

/* ---- 側邊欄 ---- */
.rollbar { position: fixed; bottom: 30%; z-index: 99; display: block; right: 10px; left: auto; margin-left: 0; }
.rollbar .actions { position: relative; width: auto; list-style: none; margin: 0; padding: 0; }
.rollbar .actions .contbar {
    position: relative;
    margin-bottom: 8px;
    background: var(--bg-card) !important;
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-glow) !important;
    border-radius: 10px !important;
    width: 44px;
    height: 44px;
    transition: all 0.3s ease;
}
.rollbar .actions .contbar:hover { border-color: var(--accent-cyan) !important; box-shadow: 0 0 15px rgba(0, 212, 255, 0.2); transform: scale(1.05); }
.rollbar .actions .contbar > a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; cursor: pointer; border: 0; opacity: 1; }
.rollbar .actions .contbar > a > i { font-size: 20px; margin: 0; }
.rollbar .rollbar-item { position: fixed; bottom: 10px; right: 10px; z-index: 100; width: 44px; height: 44px; border-radius: 10px; background: var(--bg-card); backdrop-filter: blur(8px); border: 1px solid var(--border-glow); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; }
.rollbar .rollbar-item:hover { border-color: var(--accent-cyan); box-shadow: 0 0 15px rgba(0, 212, 255, 0.2); }

/* ---- 內容框 ---- */
.tool_show {
    padding: 20px;
    background: rgba(0, 212, 255, 0.04) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius);
    box-shadow: 0 2px 16px rgba(0, 212, 255, 0.08);
}

/* ---- 麵包屑 ---- */
.breadcrumb {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    padding: 12px 20px !important;
    margin-bottom: 20px;
}
.breadcrumb a, .breadcrumb span { color: var(--text-secondary); padding: 0 8px; }
.breadcrumb a:hover { color: var(--accent-cyan); }

/* ---- 表格 ---- */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: 8px;
    overflow: hidden;
}
.content table caption {
    caption-side: top;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bg-primary);
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-gold));
    border: none;
    padding: 12px;
    text-align: center;
    border-radius: 8px 8px 0 0;
}
.content table th, .content table td {
    border: 1px solid var(--border-glow) !important;
    padding: 12px;
    text-align: center;
    color: var(--text-primary) !important;
}
.content table th { background: rgba(0, 212, 255, 0.1) !important; font-weight: 600; color: var(--accent-cyan) !important; }
.content table tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.content table tr:hover { background: rgba(0, 212, 255, 0.06); }

/* ---- 模態框 ---- */
.modal-content {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-glow) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5) !important;
}
.modal-header { border-bottom: 1px solid var(--border-glow); }
.modal-body { color: var(--text-primary) !important; }
.form-control { color: var(--text-primary) !important; }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); }

/* ---- 動畫 ---- */
@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 10px rgba(0, 212, 255, 0.15); }
    50% { box-shadow: 0 0 25px rgba(0, 212, 255, 0.3); }
}
.content-box { animation: glow-pulse 4s ease-in-out infinite; }

/* ---- 響應式 ---- */
@media (max-width: 990px) {
    .navbar-nav { margin-left: 0; padding-top: 1rem; }
    .content-box { padding: 16px !important; }
    .list-unstyled li { flex-direction: column; padding: 12px 0 !important; }
    .list-unstyled li .list-image { width: 100%; margin-bottom: 10px; }
    .rollbar { right: 5px; bottom: 25%; }
    .list-unstyled li .item-excerpt { display: none; }
    .list-unstyled li .item-meta .category { display: none; }
}

@media (max-width: 568px) {
    .omg, .kpj, .zgj, .zdj, .gxsj, .zspj, .zde, .spname, .danwei { display: none !important; }
    .list-header { padding: 0.6rem 0.5rem !important; font-size: 0.75rem !important; }
    .list-item { padding: 0.6rem 0.5rem !important; }
    .list-header .name, .list-item .name { flex: 1.5; }
    .content-box { padding: 14px !important; }
    .section-title { font-size: 1rem !important; padding: 10px 14px !important; }
    .rollbar { bottom: 25%; right: 3px; }
    .rollbar .rollbar-item { display: none; }
}

/* ---- Google AdSense 廣告位樣式 ---- */
.adsense-container {
    background: rgba(17, 22, 56, 0.6);
    border: 1px dashed rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.adsense-container:hover {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.15);
}
.adsense-row {
    background: rgba(0, 212, 255, 0.05) !important;
    border: 1px dashed rgba(0, 212, 255, 0.3) !important;
}
.adsense-article {
    margin: 20px 0;
    padding: 20px;
    background: rgba(17, 22, 56, 0.5);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 8px;
    text-align: center;
}

