/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
}

/* Navigation */
.navbar {
    background-color: #2c3e50;
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.nav-logo h1 {
    color: #ecf0f1;
    font-size: 1.5rem;
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: #ecf0f1;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3498db;
}

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-image {
    margin-top: 3rem;
}

.bagua-symbol {
    font-size: 4rem;
    opacity: 0.8;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: #667eea;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

/* About Section */
.about {
    background-color: #f8f9fa;
}

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

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.about-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Knowledge Section */
.knowledge {
    background-color: #fff;
    padding: 80px 0;
}

.knowledge-content {
    max-width: 1000px;
    margin: 0 auto;
}

.knowledge-article {
    margin-bottom: 3rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.knowledge-article h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.knowledge-article ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.knowledge-article li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.knowledge-article strong {
    color: #2c3e50;
}

/* Divination Methods Section */
.divination-methods {
    background-color: #f8f9fa;
    padding: 80px 0;
}

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

.method-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.method-card:hover {
    transform: translateY(-5px);
}

.method-card h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.method-steps {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.method-steps h4 {
    color: #34495e;
    margin-bottom: 1rem;
}

.method-steps ol {
    padding-left: 1.5rem;
}

.method-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Philosophy Section */
.philosophy {
    background-color: #fff;
    padding: 80px 0;
}

.philosophy-content {
    max-width: 1000px;
    margin: 0 auto;
}

.philosophy-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.philosophy-section h3 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-align: center;
}

.philosophy-details {
    margin-top: 1.5rem;
}

.philosophy-details h4 {
    color: #34495e;
    margin-bottom: 1rem;
}

.yin-yang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

.yin-properties, .yang-properties {
    padding: 1rem;
    border-radius: 5px;
}

.yin-properties {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
}

.yang-properties {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.yin-properties h5, .yang-properties h5 {
    margin-bottom: 1rem;
    text-align: center;
}

.yin-properties ul, .yang-properties ul {
    list-style: none;
    padding: 0;
}

.yin-properties li, .yang-properties li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.yin-properties li:before {
    content: "⚋";
    position: absolute;
    left: 0;
}

.yang-properties li:before {
    content: "⚊";
    position: absolute;
    left: 0;
}

.wuxing-cycle {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
}

.wuxing-cycle h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.wuxing-cycle p {
    font-weight: 500;
    color: #34495e;
    text-align: center;
    margin: 0.5rem 0;
}

blockquote {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    margin: 2rem 0;
    padding: 1rem 2rem;
    font-style: italic;
}

blockquote p {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

blockquote cite {
    font-size: 0.9rem;
    color: #7f8c8d;
    font-style: normal;
}

/* Modern Applications Section */
.modern-applications {
    background-color: #f8f9fa;
    padding: 80px 0;
}

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

.application-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.application-card:hover {
    transform: translateY(-5px);
}

.application-card h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.example {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #e8f5e8;
    border-radius: 5px;
    border-left: 3px solid #27ae60;
}

.example h4 {
    color: #27ae60;
    margin-bottom: 0.5rem;
}

.example p {
    color: #2c3e50;
    line-height: 1.6;
    margin: 0;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 50px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    color: #3498db;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

.footer-section a:hover {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    opacity: 0.8;
}

/* Ad Container */
.ad-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.ad-placeholder {
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    font-size: 0.9rem;
    color: #666;
    width: 300px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        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;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .methods-grid,
    .applications-grid {
        grid-template-columns: 1fr;
    }

    .yin-yang-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .knowledge-article,
    .philosophy-section {
        padding: 1.5rem;
    }

    .method-card,
    .application-card {
        padding: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .ad-container {
        position: static;
        margin: 20px auto;
        text-align: center;
    }

    .ad-placeholder {
        width: 100%;
        max-width: 320px;
        height: 200px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

.about-card,
.method-card,
.application-card,
.knowledge-article,
.philosophy-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .ad-container {
        display: none;
    }

    .hero {
        background: none;
        color: #333;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}