
/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 引入Roboto字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* 根元素定义全局变量 */
:root {
    --primary-color: #001f3f; /* 深蓝色 */
    --accent-color-1: #39FF14; /* 霓虹绿 */
    --accent-color-2: #B10DC9; /* 电光紫 */
    --background-gradient: radial-gradient(circle, rgba(0,31,63,1) 0%, rgba(0,31,63,0.8) 60%, rgba(0,31,63,0.6) 100%);
    --card-background: rgba(255, 255, 255, 0.1);
    --card-border: rgba(255, 255, 255, 0.2);
    --text-color: #FFFFFF;
    --secondary-text: #CCCCCC;
    --button-bg: var(--accent-color-1);
    --button-hover-bg: var(--accent-color-2);
    --transition-speed: 0.3s;
    --font-family: 'Roboto', sans-serif;
}

/* 全局样式 */
body {
    font-family: var(--font-family);
    background: var(--background-gradient);
    color: var(--text-color);
    line-height: 1.6;
    padding: 20px;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: var(--accent-color-1);
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 20px;
}

h2 {
    font-size: 2rem;
    margin-top: 40px;
}

h3 {
    font-size: 1.75rem;
    margin-top: 30px;
}

h4 {
    font-size: 1.5rem;
    margin-top: 25px;
}

/* 段落 */
p {
    margin-bottom: 15px;
    color: var(--text-color);
    font-size: 1rem;
}

/* 链接样式 */
a {
    color: var(--accent-color-1);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color-2);
}

/* 按钮样式 */
button {
    background-color: var(--button-bg);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    font-size: 1rem;
}

button:hover {
    background-color: var(--button-hover-bg);
}

/* 卡片网格布局 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* 单个卡片样式 */
.card {
    background: var(--card-background);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}

/* 卡片图片 */
.card img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 卡片标题 */
.card h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

/* 卡片描述 */
.card p {
    font-size: 0.95rem;
    margin-bottom: 15px;
    color: var(--secondary-text);
}

/* 卡片按钮组 */
.card .button-group {
    display: flex;
    gap: 10px;
}

.card .button-group a,
.card .button-group button {
    flex: 1;
    text-align: center;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* 文章展示区域 */
.article-section {
    background: rgba(0,31,63,0.8);
    padding: 30px;
    border-radius: 10px;
    margin-top: 50px;
    color: #fff;
}

.article-section h2 {
    color: var(--accent-color-2);
    margin-bottom: 20px;
}

.article-section pre {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article-section code {
    color: #39FF14;
    font-family: 'Courier New', Courier, monospace;
}

/* 表格样式 */
.article-section table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.article-section th,
.article-section td {
    border: 1px solid var(--card-border);
    padding: 10px;
    text-align: left;
}

.article-section th {
    background-color: var(--accent-color-1);
    color: #000;
}

.article-section tr:nth-child(even) {
    background-color: rgba(255,255,255,0.05);
}

/* 提示信息样式 */
.notice {
    text-align: center;
    margin-top: 40px;
    font-size: 1.2rem;
    color: var(--accent-color-1);
}

/* 响应式设计 */
@media (max-width: 1440px) {
    h1 {
        font-size: 2.2rem;
    }
}

@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }

    .card-grid {
        gap: 25px;
    }
}

@media (max-width: 1024px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .article-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    .card {
        padding: 15px;
    }

    button {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .card {
        padding: 10px;
    }

    button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* 3D 卡片悬停翻转效果 */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
}

.flip-card-front {
    background: var(--card-background);
    border: 1px solid var(--card-border);
}

.flip-card-back {
    background: var(--card-background);
    border: 1px solid var(--card-border);
    transform: rotateY(180deg);
    padding: 20px;
}

.flip-card-back p {
    color: var(--text-color);
    font-size: 0.9rem;
}

/* 数据可视化条形图样式 */
.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    margin-top: 20px;
}

.bar {
    width: 40px;
    background-color: var(--accent-color-1);
    transition: height var(--transition-speed) ease-in-out;
}

.bar:hover {
    background-color: var(--accent-color-2);
}

/* 加载动画样式 */
.loader {
    border: 6px solid rgba(255, 255, 255, 0.2);
    border-top: 6px solid var(--accent-color-1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* 表单不可见样式 (确保无输入框) */
input, textarea, select {
    display: none;
}

