/* 全局样式 */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --border-color: #eee;
    --hover-color: #007bff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    padding: 0.5rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .08);
    background: var(--primary-color);
}

.navbar-brand {
    padding: 0;
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    color: #fff !important;
    padding: 1rem !important;
    font-size: 15px;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
    padding: 0.5rem 0;
    background: #fff;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 14px;
    transition: all 0.3s ease;
    color: var(--text-color);
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--hover-color);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler i {
    font-size: 1.5rem;
    color: #fff;
}

@media (max-width: 1199.98px) {
    .navbar-collapse {
        background: var(--primary-color);
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        padding: 1rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 2px 0 8px rgba(0, 0, 0, .1);
        z-index: 1000;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
        background: transparent;
    }

    .nav-link {
        padding: 0.75rem 0 !important;
        color: #fff !important;
    }

    .dropdown-item {
        padding: 0.5rem 0;
        color: #fff;
    }

    /* 添加关闭按钮 */
    .navbar-collapse::before {
        content: '×';
        position: absolute;
        top: 0.5rem;
        right: 1rem;
        font-size: 2rem;
        cursor: pointer;
        color: #fff;
    }
}

/* 外汇牌价表格样式 */
.forex-card {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.forex-card .card-header {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 1.5rem;
    border: none;
}

.update-time {
    color: rgba(255, 255, 255, 0.8);
}

.forex-table {
    margin: 0;
    width: 100%;
}

.forex-table thead th {
    background: var(--light-gray);
    border-bottom: 2px solid var(--border-color);
    padding: 1rem;
    font-weight: 600;
}

.currency-cell {
    width: 200px;
}

.currency-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.currency-icon {
    width: 24px;
    height: 24px;
}

.currency-text {
    display: flex;
    flex-direction: column;
}

.currency-text strong {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.currency-name {
    font-size: 0.9rem;
    color: #666;
}

/* 说明卡片样式 */
.note-card {
    border: none;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.05);
}

.note-card .card-header {
    background: var(--secondary-color);
    color: #fff;
    padding: 1rem 1.5rem;
}

.note-card ul {
    list-style: none;
    padding-left: 0;
}

.note-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.note-card li:last-child {
    border-bottom: none;
}

/* 尾部样式 */
.site-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 0;
    line-height: 1.8;
}

.icp {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 响应式设计 */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--primary-color);
        padding: 1rem;
        margin-top: 0.5rem;
    }
}

/* 移动端表格重构 */
@media (max-width: 767.98px) {
    .forex-table {
        border: 0;
    }

    .forex-table thead {
        display: none;
    }

    .forex-table tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: #fff;
    }

    .forex-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1rem;
        border: none;
        border-bottom: 1px solid var(--border-color);
    }

    .forex-table td:last-child {
        border-bottom: none;
    }

    .forex-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color);
    }

    .currency-cell {
        width: 100% !important;
        background: var(--light-gray);
    }

    .currency-cell::before {
        display: none !important;
    }

    .currency-info {
        width: 100%;
        padding: 0.5rem 0;
    }

    .currency-text {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }

    .currency-text strong {
        font-size: 1.2rem;
    }

    .currency-name {
        font-size: 1rem;
    }

    .note-card li {
        padding: 0.8rem 0;
    }
}

/* 银行链接列表样式 */
.bank-links-card .bank-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.bank-links-card .bank-link:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bank-links-card .bank-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 8px;
}

.bank-links-card span {
    font-size: 14px;
    text-align: center;
}

/* 响应式调整 */
@media (max-width: 576px) {
    .bank-links-card .bank-logo {
        width: 32px;
        height: 32px;
    }

    .bank-links-card span {
        font-size: 12px;
    }
}

/* 银行logo样式 */
.bank-logo-sm {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 4px;
}

/* 货币详情页样式 */
.card .table {
    margin-bottom: 0;
}

.card .table td {
    vertical-align: middle;
}

/* 参考汇率卡片样式 */
.card .card-body .card {
    border: 1px solid rgba(0, 0, 0, .125);
    transition: all 0.3s ease;
}

.card .card-body .card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .table-responsive {
        border: 0;
    }

    .table td,
    .table th {
        white-space: nowrap;
    }
}

/* 移动端导航样式 */
@media (max-width: 1199px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh !important;
        background-color: #f8f9fa;
        transition: right 0.3s ease;
        display: block !important;
        padding: 1rem;
        overflow-y: auto;
        z-index: 1000;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .navbar-collapse.show {
        right: 0;
    }

    .navbar-nav {
        margin-top: 40px;
    }

    .navbar-nav .nav-link {
        color: #333 !important;
        padding: 0.8rem 0;
        border-bottom: 1px solid #eee;
    }

    .dropdown-menu {
        display: none;
        background-color: #fff;
        border: none;
        padding-left: 15px;
        margin-top: 0;
        box-shadow: none;
    }

    .dropdown-menu.show {
        display: block;
    }

    .dropdown-item {
        color: #666 !important;
        padding: 0.5rem 1rem;
    }

    .dropdown-item:hover {
        background-color: #f8f9fa;
        color: #333 !important;
    }

    .navbar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .navbar-overlay.show {
        display: block;
    }

    .dropdown-divider {
        border-top-color: #eee;
        margin: 0.5rem 0;
    }

    /* 关闭按钮样式 */
    .navbar-close {
        position: absolute;
        top: 15px;
        right: 15px;
        color: #333;
        font-size: 24px;
        cursor: pointer;
        display: block;
        width: 30px;
        height: 30px;
        line-height: 30px;
        text-align: center;
        border-radius: 50%;
        background-color: #eee;
    }

    .navbar-close:hover {
        background-color: #e9ecef;
        color: #000;
    }

    /* 下拉箭头样式 */
    .dropdown-toggle::after {
        float: right;
        margin-top: 12px;
    }
}

/* 页脚友情链接样式 */
.friend-links {
    padding: 15px 0;
    margin-bottom: 15px;
    position: relative;
}

.friend-links:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
}

.friend-links h6 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: normal;
    position: relative;
    display: inline-block;
}

.friend-links .links-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1;
}

.friend-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    padding: 4px 8px;
    position: relative;
}

.friend-links a:hover {
    color: #fff;
}

.friend-links a:after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
}

.friend-links a:last-child:after {
    display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .friend-links {
        padding: 10px 0;
    }

    .friend-links .links-wrap {
        gap: 5px;
    }

    .friend-links a {
        font-size: 12px;
        padding: 3px 6px;
    }
}