:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-color: #f59e0b;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* { 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; }

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

/* Navigation */
nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid #e2e8f0; margin-bottom: 30px; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; gap: 20px; }
.nav-link { text-decoration: none; color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.nav-link.active { color: var(--primary-color); font-weight: 700; }

/* Hero Section */
.hero { text-align: center; padding: 60px 20px; background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); color: white; border-radius: var(--radius); margin-bottom: 40px; }
.hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 30px; }

.dream-input-container { max-width: 600px; margin: 0 auto; background: white; padding: 10px; border-radius: 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
textarea { width: 100%; height: 120px; border: none; padding: 15px; font-size: 1rem; resize: none; outline: none; border-radius: 8px; }
.btn-primary { background-color: var(--primary-color); color: white; border: none; padding: 14px 28px; border-radius: 10px; font-weight: 600; cursor: pointer; transition: background 0.2s; font-size: 1rem; }
.btn-primary:hover { background-color: var(--primary-hover); }

/* Ranking & Grids */
.ranking-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; margin-top: 20px; }
.ranking-list li a { display: block; padding: 12px; background: white; border-radius: var(--radius); text-decoration: none; color: var(--text-main); box-shadow: var(--shadow); transition: transform 0.2s; }
.ranking-list li a:hover { transform: translateY(-3px); color: var(--primary-color); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; margin-top: 20px; }
.category-card { background: white; padding: 20px; border-radius: var(--radius); text-align: center; cursor: pointer; box-shadow: var(--shadow); transition: all 0.2s; border: 1px solid transparent; }
.category-card:hover { border-color: var(--primary-color); transform: translateY(-5px); }
.category-card .cat-icon { font-size: 2rem; margin-bottom: 10px; display: block; }
.category-card.large { padding: 40px 20px; }

/* Result Page */
.result-container { background: white; padding: 40px; border-radius: 20px; box-shadow: var(--shadow); }
.result-header { text-align: center; margin-bottom: 40px; }
.query-text { font-style: italic; color: var(--text-muted); font-size: 1.2rem; margin-top: 10px; }
.analysis-grid { display: grid; gap: 25px; }
.analysis-section { padding-bottom: 20px; border-bottom: 1px solid #f1f5f9; }
.analysis-section h3 { color: var(--primary-color); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.lucky-number { display: inline-block; background: #fef3c7; color: #b45309; padding: 8px 20px; border-radius: 30px; font-weight: 800; font-size: 1.2rem; margin-top: 10px; }

.btn-back { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; margin-bottom: 20px; display: flex; align-items: center; gap: 5px; }
.btn-back:hover { color: var(--primary-color); }

/* Dictionary */
.keyword-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; margin-top: 20px; }
.keyword-card { background: white; padding: 25px; border-radius: var(--radius); cursor: pointer; box-shadow: var(--shadow); transition: transform 0.2s; }
.keyword-card:hover { transform: translateY(-5px); }
.keyword-card h3 { margin-bottom: 10px; color: var(--primary-color); }
.keyword-card p { font-size: 0.9rem; color: var(--text-muted); }

.detail-content h3 { margin: 25px 0 15px; }
.detail-content p { margin-bottom: 15px; }

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }

@media (max-width: 600px) {
    .hero h1 { font-size: 1.8rem; }
    .nav-links { gap: 10px; font-size: 0.9rem; }
    .category-grid { grid-template-columns: 1fr 1fr; }
}
