html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

/* 全局变量 */
:root {
    --primary-color: #1868c9;
    --primary-dark: #145aa8;
    --primary-light: #3c89e3;
    --primary-gradient: linear-gradient(45deg, var(--primary-color), var(--primary-dark));
    --primary-shadow: rgba(24, 104, 201, 0.2);
    --text-color: #333;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --primary-rgb: 24, 104, 201;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
    margin-bottom: 60px;
    background-color: #f8f9fa;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e9ecef' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 1.5;
    padding: 0.5rem 0;
}

@media (max-width: 768px) {
    .footer {
        position: relative;
        margin-top: 1rem;
        font-size: 0.875rem;
        line-height: 1.4;
    }
    
    body {
        margin-bottom: 0;
    }

    .footer .container {
        padding-top: 0.35rem !important;
        padding-bottom: 0.35rem !important;
    }
}

/* 导航栏样式 */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 15px var(--primary-shadow);
}

.navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem !important;
    margin: 0 0.2rem;
    transition: all 0.3s ease;
    color: var(--text-color) !important;
    border-radius: 4px;
    overflow: hidden;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(var(--primary-rgb), 0.05);
}

.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 500;
    background-color: rgba(var(--primary-rgb), 0.1);
}

.navbar-nav .nav-pills .nav-link.active,
.navbar-nav .nav-pills .show > .nav-link {
    background: none;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--primary-rgb), 0.05),
        transparent
    );
    transition: left 0.5s ease;
}

.navbar-nav .nav-link:hover::before {
    left: 100%;
}

@media (max-width: 576px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 0.5rem;
        box-shadow: 0 4px 12px var(--primary-shadow);
    }

    .nav-link {
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
}

/* 品牌标识样式 */
.brand-logo {
    height: 44px;
    border-radius: 50%;
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.brand-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--text-color);
}

.brand-slogan {
    font-size: 0.875rem;
    color: var(--bs-gray-600);
}

/* 通用工具类 */
.bg-primary-soft {
    background-color: rgba(var(--primary-rgb), 0.1);
}

.text-primary {
    color: var(--primary-color) !important;
}
