/* Modern CSS Reset & Variables */
:root {
    --bg-color: oklch(98% 0.01 90);
    --primary-color: oklch(65% 0.18 35); /* Warm Terracotta */
    --primary-hover: oklch(60% 0.18 35);
    --secondary-color: oklch(92% 0.02 90);
    --text-main: oklch(25% 0.02 90);
    --text-muted: oklch(50% 0.02 90);
    --card-bg: oklch(100% 0 0);
    --shadow-soft: 0 10px 30px -10px oklch(0% 0 0 / 10%);
    --shadow-deep: 0 20px 40px -15px oklch(0% 0 0 / 15%);
    --radius-lg: 24px;
    --radius-md: 12px;
    --container-max: 900px;
}

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

    body {
        font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
        background-color: var(--bg-color);
        color: var(--text-main);
        line-height: 1.6;
        overflow-x: hidden;
    }

    .container {
        max-width: var(--container-max);
        margin: 0 auto;
        padding: 0 20px;
    }
}

/* Layout Parts */
header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: oklch(98% 0.01 90 / 80%);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

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

.nav-links a.active, .nav-links a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding: 80px 0 40px;
    text-align: center;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

/* AI Input Box */
.main-input-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.ai-input-box {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-deep);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease;
}

.ai-input-box:focus-within {
    transform: translateY(-4px);
}

textarea {
    width: 100%;
    min-height: 120px;
    border: none;
    resize: none;
    font-size: 1.2rem;
    outline: none;
    color: var(--text-main);
    background: transparent;
}

textarea::placeholder {
    color: oklch(80% 0.02 90);
}

/* Buttons */
.primary-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    align-self: flex-end;
}

.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 15px oklch(65% 0.18 35 / 40%);
}

.secondary-btn {
    background: var(--secondary-color);
    color: var(--text-main);
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Options & Chips */
.options-section {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    padding-bottom: 100px;
}

h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    padding: 10px 20px;
    background: var(--card-bg);
    border: 1.5px solid var(--secondary-color);
    border-radius: 100px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
}

.chip:hover {
    border-color: var(--primary-color);
    background: oklch(98% 0.02 35);
}

.chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Attribute Panel */
.attribute-panel {
    background: var(--secondary-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    animation: fadeIn 0.4s ease;
}

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

.hidden {
    display: none;
}

/* Global Settings */
.global-settings {
    display: flex;
    gap: 12px;
    justify-content: center;
}

select {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--secondary-color);
    outline: none;
}

/* Result Section */
.result-section {
    margin-top: 60px;
    text-align: center;
}

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

.name-card {
    background: var(--card-bg);
    padding: 32px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    transition: all 0.3s;
}

.name-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-deep);
}

.name-card .name {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

/* Background Blur Decoration */
.bg-blur {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 40%;
    height: 40%;
    background: radial-gradient(circle, oklch(90% 0.1 60 / 30%) 0%, transparent 70%);
    filter: blur(60px);
    z-index: -1;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 600px) {
    h1 { font-size: 2rem; }
    .hero-section { padding: 40px 0; }
    .ai-input-box { padding: 16px; }
}
