/* ============================================
   公共样式 - Header / Quick Links / Footer
   ============================================ */

/* ---------- Header ---------- */
.header {
    background: #0d3b85;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    position: relative;
    overflow: visible;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Ctext x='10' y='30' font-family='serif' font-size='12' fill='rgba(255,255,255,0.05)'%3Ex%2B2y%3D5%3C/text%3E%3Ctext x='50' y='50' font-family='serif' font-size='10' fill='rgba(255,255,255,0.05)'%3Ef(x)%3Dsin(x)%3C/text%3E%3Ctext x='20' y='70' font-family='serif' font-size='10' fill='rgba(255,255,255,0.05)'%3Eax%5E2%2Bbx%2Bc%3D0%3C/text%3E%3Ctext x='60' y='25' font-family='serif' font-size='8' fill='rgba(255,255,255,0.03)'%3E%5Cint%20f(x)dx%3C/text%3E%3Ctext x='70' y='80' font-family='serif' font-size='9' fill='rgba(255,255,255,0.04)'%3E%5Csum%20n%3D1%5E%5Cinfty%201/n%5E2%3C/text%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: -1;
}

.header-top {
    padding: 40px 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    font-size: 48px;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-text h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Noto Serif SC', serif;
    letter-spacing: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
}

.logo-text p {
    font-size: 14px;
    opacity: 0.9;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.search-box {
    display: flex;
    background: #fff;
    border-radius: 0;
    padding: 0;
    border: none;
    transition: all 0.3s;
    overflow: hidden;
}

.search-box:focus-within {
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.search-input {
    background: #fff;
    border: none;
    outline: none;
    color: #333;
    padding: 8px 12px;
    width: 200px;
    font-size: 13px;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: #d4a82b;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 15px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #c4981b;
}

.header-links {
    display: flex;
    gap: 20px;
}

.header-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.header-link:hover {
    color: #8ab4f8;
}

/* ---------- Quick Links ---------- */
.quick-links-section {
    background: #1e3a8a;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-links-selects {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-link-select {
    width: 100%;
    padding: 10px 18px;
    background: #2a4a9a;
    border: 1px solid #3a5aa9;
    border-radius: 4px;
    font-size: 13px;
    color: #e0e0e0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.3s;
}

.quick-link-select:hover {
    background: #3a5aa9;
    border-color: #4a6ab9;
}

.quick-link-select:focus {
    outline: none;
    border-color: #5a8ac9;
    box-shadow: 0 0 0 2px rgba(90, 138, 201, 0.2);
}

.quick-link-select option {
    background: #1e3a8a;
    color: #e0e0e0;
    padding: 10px;
}

/* ---------- Footer ---------- */
.footer {
    background: #0d3b85;
    color: #fff;
}

.footer-nav {
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links .divider {
    color: #444;
}

.footer-logo {
    padding: 20px 0;
    text-align: center;
}

.logo-badge {
    font-size: 60px;
    opacity: 0.9;
}

.footer-copyright {
    padding: 15px 0;
    background: #0a2a63;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    text-align: center;
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0d2137;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #2a5298;
    transform: translateY(-3px);
}

/* ============================================
   响应式媒体查询
   ============================================ */

@media (max-width: 1200px) {
    .header-top {
        padding: 25px 0;
    }

    .logo-text h1 {
        font-size: 28px;
        letter-spacing: 2px;
    }

    .logo-icon {
        font-size: 42px;
    }
}

@media (max-width: 992px) {
    .header-top {
        padding: 18px 0;
    }

    .header-top .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-left,
    .header-right {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo {
        justify-content: center;
        gap: 15px;
    }

    .logo-icon {
        font-size: 36px;
    }

    .logo-text h1 {
        font-size: 24px;
        letter-spacing: 1px;
        margin-bottom: 4px;
    }

    .logo-text p {
        font-size: 11px;
        letter-spacing: 2px;
    }

    .search-box {
        width: 100%;
        max-width: 320px;
    }

    .search-input {
        width: calc(100% - 44px);
    }

    .quick-links-selects {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .header-top {
        padding: 12px 0;
    }

    .header-top .container {
        padding: 0 15px;
        flex-direction: row;
        justify-content: space-between;
    }

    .header-left {
        justify-content: flex-start;
    }

    .logo {
        gap: 10px;
    }

    .logo-icon {
        font-size: 26px;
    }

    .logo-text h1 {
        font-size: 18px;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .logo-text p {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .header-right {
        justify-content: flex-end;
    }

    .search-box {
        width: auto;
        max-width: 200px;
    }

    .search-input {
        width: calc(100% - 40px);
        padding: 6px 8px;
        font-size: 12px;
    }

    .search-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .quick-links-section {
        padding: 20px 0;
    }

    .footer-links {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .footer-links .divider {
        display: none;
    }

    .footer-links a {
        padding: 5px 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    .header-top {
        padding: 8px 0;
    }

    .header-top .container {
        padding: 0 10px !important;
    }

    .logo {
        gap: 8px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .logo-text h1 {
        font-size: 14px;
        letter-spacing: 0.5px;
        margin-bottom: 2px;
    }

    .logo-text p {
        display: none;
    }

    .search-box {
        width: 100%;
        max-width: 140px;
        flex-shrink: 1;
    }

    .search-input {
        padding: 4px 6px;
        font-size: 11px;
        width: calc(100% - 30px);
        flex: 1;
        min-width: 0;
    }

    .search-btn {
        padding: 4px 8px;
        font-size: 10px;
        flex-shrink: 0;
        min-width: 26px;
    }

    .quick-links-selects {
        grid-template-columns: 1fr;
    }
}
