:root {
    --bg-primary: #f5f3e8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #fefdfb;
    --text-primary: #1a1a1a;
    --text-secondary: #5a5a5a;
    --accent-primary: #c17d4a;
    --accent-hover: #a56938;
    --border-color: #e8e4d9;
    --shadow: rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navigation */
nav {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

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

.nav-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-brand:hover {
    color: var(--accent-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 20px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, background-color 0.3s;
    cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.nav-link.active {
    border-bottom: 2px solid var(--accent-primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
    box-shadow: 0 10px 25px var(--shadow);
    overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.95rem;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--accent-primary), #d89b6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Cards Grid */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    display: block;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(193, 125, 74, 0.15);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* AI Selector Specific Styles */
.selector-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
}

.selector-label {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

#ai-select {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%233b82f6" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

#ai-select:hover {
    border-color: var(--accent-primary);
}

#ai-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

optgroup {
    font-weight: 700;
    color: var(--accent-primary);
    background-color: var(--bg-secondary);
}

option {
    padding: 8px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.note {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Aggregator Section */
.aggregator-section {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
}

.aggregator-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--accent-primary);
}

.aggregator-section p {
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

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

.aggregator-section li {
    margin-bottom: 24px;
    padding: 20px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: border-color 0.3s, transform 0.2s;
}

.aggregator-section li:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.aggregator-section a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: color 0.2s;
}

.aggregator-section a:hover {
    color: var(--accent-hover);
}

/* Post Navigation */
.post-navigation {
    margin-bottom: 40px;
}

.back-link {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

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

/* Footer */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    margin-top: auto;
}

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

    .nav-menu {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: var(--bg-secondary);
        flex-direction: column;
        border-bottom: 1px solid var(--border-color);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-menu.active {
        max-height: 400px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-top: 1px solid var(--border-color);
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .dropdown.active .dropdown-menu {
        max-height: 300px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

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

    .selector-section,
    .aggregator-section {
        padding: 24px;
    }
}
