* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Malgun Gothic', '맑은 고딕', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

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

/* Navigation Bar */
.navbar {
    background: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.nav-logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.3s ease;
}

.nav-logo a:hover {
    color: var(--secondary-color);
}

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

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--secondary-color);
}

.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--secondary-color);
}

/* Header Content */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.header-content {
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

main {
    padding: 40px 0;
}

.section-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 40px 0 15px 0;
    text-align: center;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.yin-yang-section,
.five-elements-section {
    margin-bottom: 40px;
}

.intro {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.zodiac-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.zodiac-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.zodiac-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
}

.zodiac-card h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.zodiac-name {
    font-size: 1rem;
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.zodiac-traits {
    font-size: 0.9rem;
    color: #666;
    margin-top: 10px;
}

/* Detail Page Styles */
.detail-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-bottom: 30px;
}

.detail-header .zodiac-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.detail-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.back-link {
    display: inline-block;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-link:hover {
    background: var(--primary-color);
}

.detail-content {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.detail-section {
    margin-bottom: 30px;
}

.detail-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.detail-section h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin: 20px 0 10px 0;
}

.detail-section p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 15px;
}

.year-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.year-item {
    background: var(--bg-color);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.compatibility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.compatibility-item {
    background: var(--bg-color);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.compatibility-item.good {
    border-left: 4px solid #27ae60;
}

.compatibility-item.bad {
    border-left: 4px solid var(--accent-color);
}

/* Famous People */
.famous-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.famous-person {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.famous-person:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.famous-person h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: bold;
}

.person-year {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Historical Events */
.historical-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.event-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.event-item h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: bold;
}

.event-item p {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Year Finder */
.year-finder {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.year-finder h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.year-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.year-input-group input {
    padding: 12px 20px;
    font-size: 1.1rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    width: 300px;
    max-width: 100%;
}

.year-input-group button {
    padding: 12px 30px;
    font-size: 1.1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.year-input-group button:hover {
    background: var(--primary-color);
}

.result {
    margin-top: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 8px;
    min-height: 50px;
}

.result h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.result a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.result a:hover {
    background: var(--primary-color);
}

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
}

footer p {
    opacity: 0.9;
}

/* About Us Page Styles */
.contact-email {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.contact-email:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

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

.feature-item {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-item h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 15px;
    }

    .nav-link {
        font-size: 1rem;
    }

    .nav-logo a {
        font-size: 1.2rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

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

    .zodiac-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

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

    .zodiac-card h2 {
        font-size: 1.4rem;
    }

    .detail-header h1 {
        font-size: 1.8rem;
    }

    .detail-header .zodiac-icon {
        font-size: 4rem;
    }

    .detail-content {
        padding: 20px;
    }

    .detail-section h2 {
        font-size: 1.4rem;
    }

    .year-input-group {
        flex-direction: column;
        align-items: center;
    }

    .year-input-group input {
        width: 100%;
    }

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

    .famous-people {
        grid-template-columns: 1fr;
    }

    .historical-events {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .zodiac-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 15px;
    }

    main {
        padding: 20px 0;
    }
}

