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

:root {
    --primary-color: #c8102e;
    --gold-color: #d4af37;
    --dark-red: #8b0000;
    --bg-light: #fafafa;
    --text-dark: #2c2c2c;
    --text-light: #666;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Microsoft JhengHei', 'Noto Sans TC', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background-color: #fff;
}

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

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-dark);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #c8102e 0%, #8b0000 100%);
    color: #fff;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    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" width="100" height="100"><path fill="rgba(255,255,255,0.05)" d="M50 50 L60 40 L50 30 L40 40 Z"/></svg>') repeat;
    opacity: 0.3;
}

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

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-button {
    background: var(--gold-color);
    color: #000;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Section Styles */
.section {
    padding: 4rem 2rem;
}

.section-title {
    font-size: 2rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold-color);
}

/* Content Box */
.content-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Tai Sui Types */
.tai-sui-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.type-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.type-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.type-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Checker Section */
.checker-section {
    background: var(--bg-light);
}

.checker-box {
    background: #fff;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.checker-instruction {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.checker-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.control-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.control-label input {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    width: 200px;
    transition: border-color 0.3s;
}

.control-label input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.check-button {
    background: var(--primary-color);
    color: #fff;
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.check-button:hover {
    background: var(--dark-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(200,16,46,0.3);
}

/* Result Box */
.result-box {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.result-box.offending {
    background: #ffebee;
    border: 2px solid var(--primary-color);
}

.result-box.safe {
    background: #e8f5e9;
    border: 2px solid #4caf50;
}

.result-box h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.result-box p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Zodiac Grid */
.zodiac-grid {
    margin-top: 3rem;
}

.subsection-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

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

.zodiac-item {
    background: #fff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.zodiac-item.offending {
    border-left: 4px solid var(--primary-color);
    background: #ffebee;
}

.zodiac-item.safe {
    border-left: 4px solid #4caf50;
    background: #f1f8f4;
    opacity: 0.95;
}

.zodiac-icon {
    font-size: 3rem;
}

.zodiac-item h4 {
    margin-bottom: 0.5rem;
}

.zodiac-item.offending h4 {
    color: var(--primary-color);
}

.zodiac-item.safe h4 {
    color: #2e7d32;
}

.zodiac-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.solution-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border-left: 4px solid var(--gold-color);
}

.solution-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.solution-card p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.solution-card ul {
    list-style: none;
    padding-left: 0;
}

.solution-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.solution-card li:last-child {
    border-bottom: none;
}

.solution-card strong {
    color: var(--text-dark);
}

/* SEO Section */
.seo-section {
    background: var(--bg-light);
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
}

.seo-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: var(--text-dark);
    text-align: justify;
    line-height: 2;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Footer */
.footer {
    background: #2c2c2c;
    color: #fff;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--gold-color);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: #fff;
        width: 100%;
        padding: 2rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transition: left 0.3s;
        gap: 1rem;
    }

    .nav-menu.active {
        left: 0;
    }

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

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

    .section {
        padding: 2rem 1rem;
    }

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

    .checker-box {
        padding: 2rem 1.5rem;
    }

    .tai-sui-types,
    .solutions-content,
    .zodiac-list {
        grid-template-columns: 1fr;
    }

    .checker-controls {
        width: 100%;
    }

    .control-label input {
        width: 100%;
    }

    .check-button {
        width: 100%;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 1rem;
    }

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

    .section {
        padding: 2rem 1rem;
    }

    .checker-box {
        padding: 1.5rem 1rem;
    }
}

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

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

