/* ===================================================
   shared.css — 全站公共样式
   核力科技（上海）有限公司
   
   包含：CSS变量、Reset、Footer、Page Loader、通用组件
   （顶部导航栏样式由 navbar.css 管理）
   =================================================== */

/* ---------- CSS 变量 ---------- */
:root {
    --primary: #0066FF;
    --primary-dark: #0052CC;
    --secondary: #00D4AA;
    --accent: #6366F1;
    --dark: #0F172A;
    --dark-light: #1E293B;
    --gray: #64748B;
    --light: #F8FAFC;
    --gradient-1: linear-gradient(135deg, #0066FF 0%, #00D4AA 100%);
    --gradient-2: linear-gradient(135deg, #6366F1 0%, #0066FF 100%);
    --gradient-3: linear-gradient(180deg, rgba(0,102,255,0.1) 0%, transparent 100%);
}

/* ---------- Reset & Base ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    background: var(--dark);
}

/* ---------- Page Loader ---------- */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00D4AA;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Logo (共用) ---------- */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.logo-icon svg {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

/* ---------- Page Container (SPA) ---------- */
#page-container {
    min-height: 100vh;
}

/* ---------- Footer ---------- */
.footer {
    background: #050a15;
    padding: 4rem 2rem 1.5rem;
    color: white;
}

.footer-top {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-col a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.footer-col a:hover {
    color: #00D4AA;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom a:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}
