
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设定字体 */
body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    color: #333;
    background: linear-gradient(135deg, #6A5ACD, #00BFFF);
    background-attachment: fixed;
    background-size: cover;
    line-height: 1.6;
    overflow-x: hidden;
    /* 背景使用蓝紫色渐变，营造科技与梦幻氛围 */
}

/* 容器布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    /* 使用网格布局，确保内容的整齐和响应式 */
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #FFFFFF;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

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

h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 10px;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

/* 段落样式 */
p {
    font-size: 1rem;
    color: #f0f0f0;
    margin-bottom: 15px;
}

/* 链接样式 */
a {
    color: #00BFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #6A5ACD;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 191, 255, 0.9);
    padding: 20px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 191, 255, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

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

/* 菜单样式 */
.menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.menu-item {
    position: relative;
}

.menu-item a {
    font-size: 1rem;
    color: #fff;
}

.menu-item:hover .submenu {
    display: block;
    animation: fadeIn 0.3s ease forwards;
}

.submenu {
    position: absolute;
    top: 40px;
    left: 0;
    background: rgba(255, 255, 255, 0.9);
    padding: 10px 0;
    border-radius: 8px;
    display: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.submenu a {
    color: #333;
    padding: 10px 20px;
    display: block;
    white-space: nowrap;
}

.submenu a:hover {
    background: #00BFFF;
    color: #fff;
}

/* 关键帧动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flow {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
}

code {
    color: #00FF00;
    font-size: 0.9rem;
}

/* 卡片样式 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 50px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
}

.card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    flex: 1 1 calc(33% - 60px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .card {
        flex: 1 1 calc(50% - 60px);
    }
}

@media (max-width: 480px) {
    .card {
        flex: 1 1 100%;
    }
}

/* 图像样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.image-gallery img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.4);
}

/* 搜索栏样式 */
.search-bar {
    position: relative;
    margin: 20px 0;
}

.search-input {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    transition: width 0.4s ease, box-shadow 0.3s ease;
    width: 200px;
    outline: none;
}

.search-input:focus {
    width: 300px;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.5);
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6A5ACD;
    font-size: 16px;
}

/* 订阅表单样式 */
.subscription-form {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: rgba(0, 191, 255, 0.2);
    border-radius: 15px;
}

.subscription-form input[type="email"] {
    padding: 10px 20px;
    border: 2px solid #6A5ACD;
    border-radius: 25px 0 0 25px;
    outline: none;
    transition: border-color 0.3s ease;
    width: 250px;
}

.subscription-form input[type="email"]:focus {
    border-color: #00BFFF;
}

.subscription-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 0 25px 25px 0;
    background: linear-gradient(45deg, #FF8C00, #32CD32);
    color: #fff;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscription-form button:hover {
    background: linear-gradient(45deg, #32CD32, #FF8C00);
}

/* 响应式导航栏 */
@media (max-width: 768px) {
    .menu {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-input {
        width: 100%;
    }
}

