/* =========================================
   全局变量与基础重置
========================================= */
:root {
    --primary-color: #d81b60;      /* 品红主色，类似母公司风格 */
    --primary-hover: #ad1457;      /* 品红悬停加深色 */
    --text-main: #ffffff;          /* 主文本白色 */
    --text-muted: #aaaaaa;         /* 次要文本浅灰 */
    --bg-light: #1a1a1a;           /* 浅色背景深色 */
    --bg-white: #222222;           /* 卡片背景深灰 */
    --border-color: #444444;       /* 边框颜色 */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.4);
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* =========================================
   导航栏 (Navbar)
========================================= */
.navbar {
    background-color: #000000;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.navbar-menu a {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
}

.navbar-menu a:hover {
    color: var(--primary-color);
}

.navbar-menu a.active {
    color: var(--primary-color);
}

.navbar-login-btn {
    background-color: var(--primary-color);
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 20px;
}

.navbar-login-btn:hover {
    background-color: var(--primary-hover);
}

/* =========================================
   通用区块与网格布局
========================================= */
.section-padding {
    padding: 80px 0;
    color: var(--text-main);  /* 确保区块内文字为白色 */
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--text-main);
}

.grid-3-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* =========================================
   卡片组件 (用于产品和新闻)
========================================= */
.card {
    background: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 24px;
}

.card-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.card-text {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 20px;
}

/* =========================================
   按钮
========================================= */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

/* =========================================
   页脚 (Footer)
========================================= */
.footer {
    background-color: #000000;
    color: #aaaaaa;
    text-align: center;
    padding: 40px 0;
    margin-top: auto;
}

.footer p {
    margin-bottom: 10px;
    font-size: 14px;
}

/* =========================================
   认证弹窗样式
========================================= */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auth-container {
    background-color: var(--bg-white);
    width: 100%;
    max-width: 460px;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    position: relative;
    animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
}
.auth-close-btn:hover {
    color: #fff;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #bbbbbb;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
    background-color: #333;
    color: #fff;
}

.form-group input:focus {
    border-color: var(--primary-color);
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row .form-group {
    flex: 1;
}

.auth-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 5px;
}

.auth-switch-text {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.auth-switch-text a {
    color: var(--primary-color);
    font-weight: 500;
}

.auth-alert {
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}
.auth-alert.danger {
    background-color: #442222;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
}
.auth-alert.success {
    background-color: #224433;
    color: #66d9a0;
    border: 1px solid #66d9a0;
}

/* =========================================
   品红烟雾背景 (用于子页面头部)
========================================= */
.bg-magenta-smoke {
    background-image: url('/static/images/background_img_001.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* 可选叠加半透明遮罩，让文字更清晰 */
    /* background-blend-mode: overlay; */
    /* background-color: rgba(0,0,0,0.2); */
}

/* =========================================
   额外修正：覆盖模板中的内联样式 (针对主页)
========================================= */
/* 主页“关于锐算科技”右侧统计卡片 */
.about-stats {
    background: #2a2a2a !important;
    color: #ffffff !important;
    border-left: 4px solid var(--primary-color) !important;
    padding: 25px !important;
    border-radius: 6px !important;
    box-shadow: var(--shadow-sm) !important;
}
.about-stats div:first-child {
    color: #aaaaaa !important;  /* 小标签文字 */
}
.about-stats div:last-child {
    color: #ffffff !important;  /* 大数字文字 */
}

/* 主页“核心产品矩阵”中的产品卡片（动态或静态） */
.product-card {
    background: #2a2a2a !important;
    border: 1px solid var(--border-color) !important;
}
.product-card .product-title {
    color: #ffffff !important;
}
.product-card .product-desc {
    color: #cccccc !important;
}