/* 重置和基礎樣式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 導航欄 */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    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;
    height: 70px;
}

.nav-logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: #3498db;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #2c3e50;
    margin: 3px 0;
    transition: 0.3s;
}

/* 英雄區域 */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 博客區域 */
.blog-section {
    padding: 80px 0;
}

.blog-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-date {
    color: #7f8c8d;
}

.blog-category {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.blog-content h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.blog-content h3 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-content h3 a:hover {
    color: #3498db;
}

.blog-content p {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 0.8rem;
}

/* 頁腳 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #3498db;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #34495e;
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 15px 60px;
    }

    .blog-section {
        padding: 60px 0;
    }

    .blog-section h2 {
        font-size: 2rem;
    }
}

/* 動畫效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }
.blog-card:nth-child(5) { animation-delay: 0.5s; }
.blog-card:nth-child(6) { animation-delay: 0.6s; }

/* 關於頁面樣式 */
.about-section {
    padding: 120px 0 80px;
    margin-top: 70px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: start;
}

.about-image {
    text-align: center;
}

.about-image img {
    width: 100%;
    max-width: 400px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.about-text .intro {
    font-size: 1.2rem;
    color: #3498db;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #555;
}

.skills-section {
    margin: 3rem 0;
}

.skills-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
    display: block;
}

.skill-item span {
    font-weight: 500;
    color: #2c3e50;
}

.experience-section {
    margin: 3rem 0;
}

.experience-section h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #3498db;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background: #3498db;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #3498db;
}

.timeline-date {
    font-weight: 700;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.timeline-content p {
    color: #7f8c8d;
    line-height: 1.6;
}

/* 聯繫頁面樣式 */
.contact-section {
    padding: 120px 0 80px;
    margin-top: 70px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.contact-info > p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-methods {
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-method i {
    font-size: 1.5rem;
    color: #3498db;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.contact-method h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #2c3e50;
}

.contact-method p {
    color: #7f8c8d;
    margin: 0;
}

.social-contact h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.social-links-large {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
    transform: translateX(5px);
    background: #3498db;
    color: white;
}

.social-link i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: #2980b9;
}

.submit-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* 文章詳情頁面樣式 */
.post-content {
    padding: 120px 0 80px;
    margin-top: 70px;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.post-date,
.post-category,
.post-author {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.post-category {
    background: #3498db;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.3;
}

.post-excerpt {
    font-size: 1.2rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.post-image {
    margin-bottom: 3rem;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: #2c3e50;
}

.post-body h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
    color: #2c3e50;
}

.post-body h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1rem;
    color: #2c3e50;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-tags {
    margin: 3rem 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.share-section {
    margin: 3rem 0;
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.share-section h3 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

.share-btn.copy-link {
    background: #6c757d;
}

.related-posts {
    margin: 3rem 0;
}

.related-posts h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: #2c3e50;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.related-post {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-content {
    padding: 1.5rem;
}

.related-content h4 {
    margin-bottom: 0.5rem;
}

.related-content h4 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-content h4 a:hover {
    color: #3498db;
}

.related-content p {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* 響應式設計補充 */
@media (max-width: 768px) {
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image img {
        max-width: 300px;
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item {
        padding-left: 1rem;
    }

    .post-header h1 {
        font-size: 2rem;
    }

    .share-buttons {
        flex-direction: column;
        align-items: center;
    }

    .share-btn {
        width: 200px;
        justify-content: center;
    }
}

/* API相關樣式 */
.loading {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.2rem;
}

.error-message {
    text-align: center;
    padding: 2rem;
    color: #e74c3c;
}

.error-message p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.retry-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.retry-btn:hover {
    background: #2980b9;
}

/* 評論區域樣式 */
.comments-section {
    margin: 3rem 0;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 15px;
}

.comments-section h3 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.comment-submit-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.comment-submit-btn:hover {
    background: #2980b9;
}

.comment-list {
    margin-top: 2rem;
}

.comment-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
}

.comment-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.comment-content {
    line-height: 1.6;
    color: #555;
}

.comment-actions {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
}

.comment-action-btn {
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.comment-action-btn:hover {
    color: #3498db;
}

/* 登入表單樣式 */
.login-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.login-btn {
    width: 100%;
    padding: 1rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-btn:hover {
    background: #2980b9;
}

.login-links {
    text-align: center;
    margin-top: 1rem;
}

.login-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 0.5rem;
}

.login-links a:hover {
    text-decoration: underline;
} 