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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

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

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5530;
}

.nav-logo i {
    font-size: 2rem;
    color: #f89500;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #f89500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f89500;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄区域样式 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.2;
}

/* 粒子效果 */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-particle 6s infinite linear;
}

.particle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.particle:nth-child(2) {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.particle:nth-child(3) {
    top: 40%;
    left: 20%;
    animation-delay: 4s;
    animation-duration: 12s;
}

.particle:nth-child(4) {
    top: 80%;
    left: 60%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.particle:nth-child(5) {
    top: 30%;
    left: 90%;
    animation-delay: 3s;
    animation-duration: 11s;
}

.particle:nth-child(6) {
    top: 70%;
    left: 30%;
    animation-delay: 5s;
    animation-duration: 7s;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    color: white;
    z-index: 2;
    position: relative;
    animation: slideInLeft 1s ease-out;
    padding: 0 40px;
}

.hero-content::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #f89500, #ff6b6b);
    border-radius: 2px;
    animation: slideInLeft 1.2s ease-out;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-subtitle {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #f0f0f0;
    font-weight: 300;
    letter-spacing: 1px;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: #e0e0e0;
    line-height: 1.7;
    font-weight: 400;
    max-width: 500px;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(45deg, #f89500, #ff6b6b);
    color: white;
    padding: 18px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(248, 149, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(45deg, #e5860a, #ff5252);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(248, 149, 0, 0.6);
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

.hero-animation {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    position: relative;
    padding: 0 40px;
}

.code-snippet {
    background: rgba(0, 0, 0, 0.9);
    border-radius: 15px;
    padding: 40px;
    font-family: 'Fira Code', 'Courier New', monospace;
    color: #00ff00;
    font-size: 1.1rem;
    line-height: 1.8;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: slideInRight 1s ease-out;
    position: relative;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-snippet::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #f89500, #ff6b6b, #00ff00);
    border-radius: 15px 15px 0 0;
}

.code-line {
    opacity: 0;
    animation: typewriter 0.5s ease-out forwards;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2s; }
.code-line:nth-child(5) { animation-delay: 2.5s; }

/* 特色功能区域样式 */
.features {
    padding: 100px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    color: #333;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #f89500;
    border-radius: 2px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f89500, #ff6b6b);
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f89500, #ff6b6b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* 文章区域样式 */
.articles-section {
    padding: 100px 0;
    background: white;
}

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

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.article-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.article-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
}

.article-content {
    padding: 25px;
}

.article-category {
    display: inline-block;
    background: #f89500;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 15px;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.article-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #999;
}

.article-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.article-readtime {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* 文章页面样式 */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 60px;
}

.article-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
}

.article-content h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    flex-wrap: wrap;
}

.article-meta span {
    color: #666;
    font-size: 0.9rem;
}

.article-intro {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #f89500;
}

.article-intro p {
    margin: 0;
    font-size: 1.1rem;
    color: #555;
}

.article-content h2 {
    font-size: 1.8rem;
    color: #333;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f89500;
}

.article-content h3 {
    font-size: 1.4rem;
    color: #444;
    margin: 30px 0 15px;
}

.article-content h4 {
    font-size: 1.2rem;
    color: #555;
    margin: 25px 0 10px;
}

.article-content p {
    margin-bottom: 15px;
    color: #555;
    font-size: 1rem;
}

.article-content ul, .article-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 8px;
    color: #555;
}

.article-content strong {
    color: #333;
    font-weight: 600;
}

.article-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
}

.article-content pre {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: #333;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Java代码高亮 */
.java-code {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

.java-code .keyword {
    color: #0066cc;
    font-weight: bold;
}

.java-code .string {
    color: #cc6600;
}

.java-code .comment {
    color: #666;
    font-style: italic;
}

.java-code .class {
    color: #0066cc;
    font-weight: bold;
}

.java-code .method {
    color: #cc6600;
}

/* 代码块容器样式 */
.code-block {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    position: relative;
}

.code-block::before {
    content: 'Java';
    position: absolute;
    top: 10px;
    right: 15px;
    background: #f89500;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
}

/* 关于我们区域样式 */
.about-section {
    padding: 100px 0;
    background: #f8f9fa;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: #333;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 20px;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #f89500;
    margin-bottom: 5px;
}

.stat-item p {
    color: #666;
    font-weight: 500;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tech-item {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    color: #333;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.tech-item:hover {
    background: #f89500;
    color: white;
    transform: translateY(-2px);
}

/* 联系我们区域样式 */
.contact-section {
    padding: 100px 0;
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 60px;
}

.contact-item {
    text-align: center;
    margin-bottom: 40px;
}

.contact-item i {
    font-size: 3rem;
    color: #f89500;
    margin-bottom: 15px;
}

.contact-item h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #333;
}

.contact-item p {
    color: #666;
    font-size: 1.1rem;
}

.contact-form {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 15px;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(248, 149, 0, 0.3);
}

.contact-form button {
    background: #f89500;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background: #e5860a;
    transform: translateY(-2px);
}

/* 页脚样式 */
.footer {
    background: #333;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}

.footer-logo i {
    font-size: 2rem;
    color: #f89500;
}

.footer-links {
    display: flex;
    gap: 30px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f89500;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: #ccc;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.footer-social a:hover {
    color: #f89500;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555;
    color: #ccc;
    a {
        color: #ccc;
        text-decoration: none;
    }
}

/* 动画效果 */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-10px) rotate(1deg);
    }
    66% {
        transform: translateY(5px) rotate(-1deg);
    }
}

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

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(248, 149, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(248, 149, 0, 0.8);
    }
}

@keyframes float-particle {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 100px 20px 50px;
        min-height: 90vh;
    }
    
    .hero-content {
        padding: 0 20px;
        margin-bottom: 40px;
    }
    
    .hero-content::before {
        display: none;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin: 0 auto 40px;
        max-width: 100%;
    }
    
    .code-snippet {
        font-size: 0.9rem;
        padding: 25px;
        margin-top: 30px;
        width: 100%;
        max-width: 400px;
    }
    
    .hero-animation {
        padding: 0 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats {
        justify-content: center;
        gap: 30px;
    }
    
    .tech-stack {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .article-container {
        padding: 100px 15px 40px;
    }

    .article-content {
        padding: 25px;
    }

    .article-content h1 {
        font-size: 2rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .contact-form {
        padding: 30px 20px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #f89500;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e5860a;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
} 