/* 全局样式重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul, ol {
    list-style: none;
}

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

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

/* 导航栏 */
.navbar {
    background: linear-gradient(135deg, #ff6b9d, #ff3d7f);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s;
    padding: 5px 10px;
    border-radius: 5px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(255,107,157,0.85), rgba(255,61,127,0.85)),
                url('https://images.unsplash.com/photo-1512496015851-a90fb38ba796?w=1200&h=600&fit=crop');
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow-x: hidden;
}

.hero-content h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.hero-desc {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 2rem;
    opacity: 0.85;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background: #fff;
    color: #ff6b9d;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s;
}

.cta-button.secondary {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: clamp(20px, 5vw, 60px);
    flex-wrap: wrap;
}

.stat-number {
    display: block;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: bold;
}

.stat-label {
    font-size: clamp(0.8rem, 2vw, 0.95rem);
    opacity: 0.85;
}

/* Section 通用 */
.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    color: #ff6b9d;
    position: relative;
}

.section-desc {
    text-align: center;
    color: #666;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header .section-desc {
    text-align: left;
    margin-bottom: 0;
}

.view-all {
    color: #ff6b9d;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.view-all:hover {
    gap: 12px;
    color: #ff3d7f;
}

/* Features */
.features {
    padding: clamp(40px, 8vw, 80px) 0;
    background: #fff5f8;
    overflow-x: hidden;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, #fff5f8, #ffe0eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 2rem;
    color: #ff6b9d;
}

.feature-card h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-card p {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 1.8;
}

/* Popular Tutorials */
.popular-tutorials {
    padding: clamp(40px, 8vw, 80px) 0;
    overflow-x: hidden;
}

.tutorial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tutorial-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.tutorial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.tutorial-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.tutorial-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.tutorial-card:hover .tutorial-image img {
    transform: scale(1.1);
}

.difficulty {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 18px;
    border-radius: 20px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: bold;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.difficulty.beginner { background: #4CAF50; }
.difficulty.basic { background: #2196F3; }
.difficulty.intermediate { background: #FF9800; }
.difficulty.advanced { background: #E91E63; }

.tutorial-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(255,61,127,0.9);
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
}

.tutorial-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #fff5f8;
    color: #ff6b9d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tutorial-content {
    padding: clamp(1rem, 3vw, 1.5rem);
}

.tutorial-content h3 {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    margin-bottom: 0.5rem;
    color: #333;
    line-height: 1.4;
}

.tutorial-content p {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 1rem);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.tutorial-meta {
    display: flex;
    gap: clamp(8px, 2vw, 15px);
    margin-bottom: 0.5rem;
    color: #999;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    flex-wrap: wrap;
}

.tutorial-meta i { color: #ff6b9d; margin-right: 4px; }

.tutorial-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 0.5rem;
    color: #FFD700;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

.tutorial-rating span {
    margin-left: 8px;
    color: #666;
}

.btn-link {
    color: #ff6b9d;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(0.85rem, 2vw, 1rem);
    transition: all 0.3s;
}

.btn-link:hover {
    color: #ff3d7f;
    margin-left: 5px;
}

/* Video Showcase */
.video-showcase {
    padding: clamp(40px, 8vw, 80px) 0;
    background: #f9f9f9;
    overflow-x: hidden;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.video-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #333, #555);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 10px;
    transition: background 0.3s;
}

.video-placeholder i { font-size: clamp(2rem, 5vw, 3rem); opacity: 0.7; }
.video-placeholder span {
    background: rgba(0,0,0,0.7);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.video-info { padding: clamp(1rem, 3vw, 1.5rem); }
.video-info h4 { font-size: clamp(1rem, 2.5vw, 1.1rem); color: #333; margin-bottom: 0.5rem; }
.video-info p { color: #666; font-size: clamp(0.85rem, 2vw, 0.95rem); margin-bottom: 0.5rem; }
.video-info span { color: #999; font-size: clamp(0.8rem, 1.8vw, 0.85rem); }

/* Featured Articles */
.featured-articles {
    padding: clamp(40px, 8vw, 80px) 0;
    overflow-x: hidden;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.article-card {
    display: block;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover img { transform: scale(1.05); }

.article-info { padding: clamp(1rem, 3vw, 1.5rem); }

.article-category {
    display: inline-block;
    background: #fff5f8;
    color: #ff6b9d;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.article-info h4 {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-info p {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    gap: clamp(8px, 2vw, 15px);
    color: #999;
    font-size: clamp(0.75rem, 1.5vw, 0.85rem);
    flex-wrap: wrap;
}

.article-meta i { color: #ff6b9d; margin-right: 3px; }

/* Tips Preview */
.tips-preview {
    padding: clamp(40px, 8vw, 80px) 0;
    background: #fff5f8;
    overflow-x: hidden;
}

.tips-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tip-item {
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 15px;
    display: flex;
    gap: clamp(1rem, 3vw, 1.5rem);
    align-items: flex-start;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.tip-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.tip-icon-wrap {
    width: clamp(40px, 10vw, 60px);
    height: clamp(40px, 10vw, 60px);
    min-width: clamp(40px, 10vw, 60px);
    background: linear-gradient(135deg, #fff5f8, #ffe0eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tip-icon-wrap i { font-size: clamp(1rem, 3vw, 1.5rem); color: #ff6b9d; }

.tip-item h4 {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #333;
    margin-bottom: 0.5rem;
}

.tip-item p {
    color: #666;
    font-size: clamp(0.85rem, 2vw, 1rem);
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.tip-link {
    color: #ff6b9d;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    transition: all 0.3s;
}

.tip-link:hover { color: #ff3d7f; margin-left: 5px; }

/* Testimonids */
.testimonials {
    padding: clamp(40px, 8vw, 80px) 0;
    background: #fff5f8;
    overflow-x: hidden;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.testimonial-card {
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: clamp(40px, 10vw, 50px);
    height: clamp(40px, 10vw, 50px);
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-header h4 {
    color: #333;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
}

.stars { color: #FFD700; font-size: clamp(0.8rem, 1.8vw, 0.9rem); }

.testimonial-card p {
    color: #555;
    line-height: 1.8;
    font-style: italic;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* FAQ */
.faq-section {
    padding: clamp(40px, 8vw, 80px) 0;
    overflow-x: hidden;
}

.faq-list {
    max-width: 900px;
    margin: 2rem auto 0;
}

.faq-item {
    background: #fff;
    padding: clamp(1.5rem, 4vw, 2rem);
    border-radius: 15px;
    margin-bottom: 1rem;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.faq-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.faq-item h4 {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-item h4 i { color: #ff6b9d; }

.faq-item p {
    color: #555;
    line-height: 1.8;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

/* Newsletter */
.newsletter {
    padding: clamp(40px, 8vw, 80px) 0;
    background: linear-gradient(135deg, #ff6b9d, #ff3d7f);
    color: #fff;
    text-align: center;
    overflow-x: hidden;
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1rem, 3vw, 3rem);
    flex-wrap: wrap;
}

.newsletter-text { flex: 1; min-width: 200px; }
.newsletter-text h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 0.5rem; }
.newsletter-text p { font-size: clamp(0.9rem, 2.5vw, 1.1rem); opacity: 0.9; }
.subscribe-form {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 500px;
    min-width: 200px;
    flex-wrap: wrap;
}

.subscribe-form input {
    flex: 1;
    min-width: 150px;
    padding: clamp(10px, 2vw, 15px);
    border: none;
    border-radius: 50px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    outline: none;
}

.subscribe-form button {
    padding: clamp(10px, 2vw, 15px) clamp(20px, 4vw, 40px);
    background: #fff;
    color: #ff6b9d;
    border: none;
    border-radius: 50px;
    font-size: clamp(0.85rem, 2vw, 1rem);
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.subscribe-form button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.subscribe-note {
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background: #2d2d2d;
    color: #fff;
    padding: clamp(30px, 6vw, 60px) 0 20px;
    overflow-x: hidden;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(1.5rem, 4vw, 3rem);
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-bottom: 1rem;
}

.footer-section h3 i { color: #ff6b9d; margin-right: 8px; }

.footer-section h4 {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 1rem;
    color: #ffa5c5;
}

.footer-section p {
    color: #999;
    line-height: 1.8;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.1rem;
}

.social-links a:hover {
    background: #ff6b9d;
    transform: translateY(-3px);
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.footer-section ul li a {
    color: #999;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section ul li a:hover {
    color: #ffa5c5;
    padding-left: 5px;
}

.footer-section ul li i {
    color: #ffa5c5;
    margin-right: 8px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #999;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
}

/* 广告位 */
.ad-slot {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: #bbb;
    font-size: 0.9rem;
    margin: 40px auto;
    max-width: 728px;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.ad-slot:hover {
    border-color: #ccc;
    color: #999;
}

.ad-slot-banner {
    width: 100%;
    max-width: 728px;
    min-height: 90px;
}

.ad-slot-sidebar {
    max-width: 100%;
    min-height: 250px;
}

.ad-slot-inline {
    max-width: 100%;
    min-height: 90px;
    margin: 30px 0;
}

.ad-slot-label {
    font-size: 0.75rem;
    color: #ccc;
    margin-bottom: 5px;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #ff6b9d;
        width: 100%;
        padding: 2rem;
        transition: 0.3s;
    }
    .nav-menu.active { left: 0; }
    .hamburger { display: flex; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-stats { flex-direction: row; }
    .newsletter-content { flex-direction: column; text-align: center; }
    .subscribe-form { max-width: 100%; }
    .ad-slot { padding: 20px; min-height: 60px; }
}

@media (max-width: 480px) {
    .hero { min-height: 400px; }
    .tutorial-image { aspect-ratio: 16/10; }
}