/* 海角社区官网 - 全站样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #f4a261;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-light: #f8f9fa;
    --bg-dark: #0a0e27;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

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

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0;
    box-shadow: var(--shadow-hover);
}

.header-top {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.logo {
    font-size: 28px;
    font-weight: 700;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo:hover {
    color: var(--accent-color);
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
}

.search-form input {
    flex: 1;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(10px);
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-form button {
    padding: 10px 25px;
    background: var(--primary-color);
    border: none;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

/* 导航栏 */
nav {
    padding: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.nav-links li a {
    display: block;
    padding: 15px 25px;
    color: white;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--accent-color);
    transition: transform 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    transform: translateX(-50%) scaleX(1);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* 横幅 */
.hero-banner {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('/edg202501.jpg') center/cover;
    opacity: 0.15;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-banner h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero-banner p {
    font-size: 20px;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

/* 主要内容区 */
main {
    padding: 60px 0;
    background: var(--bg-light);
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title::before {
    content: '';
    width: 5px;
    height: 35px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

/* 视频网格 */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.video-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.1);
}

.video-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 13px;
}

/* 特色区域 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* 页脚 */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-hover);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hero-banner h2 {
        font-size: 32px;
    }

    .hero-banner p {
        font-size: 16px;
    }

    .search-form {
        margin: 20px 0;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--secondary-color);
        padding: 20px;
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu ul {
        list-style: none;
    }

    .mobile-menu ul li {
        margin-bottom: 15px;
    }

    .mobile-menu ul li a {
        color: white;
        padding: 10px;
        display: block;
        border-radius: 5px;
    }

    .mobile-menu ul li a:hover {
        background: rgba(255,255,255,0.1);
    }

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