/* assets/css/app.css — IdeaForge 밝고 산뜻한 디자인 */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f8fafc;
    --bg-white: #ffffff;
    --surface: #ffffff;
    --surface2: #f1f5f9;
    --surface3: #e8f0fe;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #1e293b;
    --text2: #64748b;
    --text3: #94a3b8;
    --accent: #4f46e5;
    --accent-light: #818cf8;
    --accent-bg: #eef2ff;
    --accent-hover: #4338ca;
    --success: #10b981;
    --success-bg: #ecfdf5;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.03);
    --shadow-lg: 0 10px 25px rgba(0,0,0,.06), 0 4px 10px rgba(0,0,0,.04);
    --radius: 12px;
    --radius-lg: 16px;
    --font: 'Noto Sans KR', -apple-system, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Noto Sans KR', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ── 공통 ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.btn-primary {
    background: var(--accent); color: #fff; border: none;
    padding: 11px 24px; border-radius: 10px; font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all .2s; font-family: var(--font);
    box-shadow: 0 1px 3px rgba(79,70,229,.3);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 4px 12px rgba(79,70,229,.25); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-outline {
    background: var(--bg-white); color: var(--text); border: 1.5px solid var(--border);
    padding: 10px 22px; border-radius: 10px; font-size: 14px; font-weight: 500;
    cursor: pointer; transition: all .2s; font-family: var(--font);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-bg); }

input[type="text"], input[type="email"], input[type="password"], textarea {
    width: 100%; background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: 10px; padding: 11px 14px; color: var(--text);
    font-size: 14px; font-family: var(--font); outline: none; transition: all .2s;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
input::placeholder, textarea::placeholder { color: var(--text3); }

/* ── 네비 ── */
.nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 0; border-bottom: 1px solid var(--border-light);
    background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
    position: sticky; top: 0; z-index: 50;
}
.nav-logo {
    font-family: var(--font-display); font-size: 21px; font-weight: 800;
    color: var(--accent); text-decoration: none; letter-spacing: -.3px;
}
.nav-logo span { color: var(--text); }
.nav-links { display: flex; gap: 10px; align-items: center; }
.nav-links a {
    color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
    padding: 6px 12px; border-radius: 8px; transition: all .15s;
}
.nav-links a:hover { color: var(--accent); background: var(--accent-bg); }

/* ── 히어로 ── */
.hero { text-align: center; padding: 80px 0 50px; position: relative; }
.hero::before {
    content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(79,70,229,.06) 0%, rgba(129,140,248,.03) 40%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--accent-bg); color: var(--accent);
    font-size: 13px; font-weight: 600; padding: 6px 16px;
    border-radius: 20px; margin-bottom: 24px;
}
.hero h1 {
    font-family: var(--font-display); font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 800; line-height: 1.25; margin-bottom: 18px;
    letter-spacing: -.5px; color: var(--text);
}
.hero h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero p { color: var(--text2); font-size: 17px; max-width: 480px; margin: 0 auto 32px; line-height: 1.8; }
.hero-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 16px; border-radius: 12px;
    box-shadow: 0 4px 14px rgba(79,70,229,.3);
}
.hero-sub { margin-top: 14px; font-size: 13px; color: var(--text3); }

.hero-image {
    margin-top: 48px;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
}
.hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── 피처 카드 ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; padding: 50px 0 80px; }
.feature-card {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: all .2s; box-shadow: var(--shadow-sm);
}
.feature-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.feature-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface2);
}
.feature-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.feature-card:hover .feature-img img { transform: scale(1.03); }
.feature-body { padding: 20px 22px 24px; }
.feature-body h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-body p { color: var(--text2); font-size: 14px; line-height: 1.7; }

/* ── 채팅 ── */
.chat-wrap { display: flex; flex-direction: column; height: calc(100vh - 70px); max-width: 760px; margin: 0 auto; }
.chat-header {
    padding: 18px 0; border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 12px;
}
.chat-header-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--accent-bg); display: flex;
    align-items: center; justify-content: center; font-size: 20px;
}
.chat-header-text h2 { font-size: 16px; font-weight: 700; }
.chat-header-text p { font-size: 12px; color: var(--text3); }

.chat-messages {
    flex: 1; overflow-y: auto; padding: 20px 0;
    display: flex; flex-direction: column; gap: 12px;
}
.chat-messages::-webkit-scrollbar { width: 5px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.chat-bubble {
    max-width: 80%; padding: 12px 16px; border-radius: 14px;
    font-size: 14px; line-height: 1.75; animation: fadeSlideIn .3s ease;
}
.chat-bubble.user {
    align-self: flex-end; background: var(--accent); color: #fff;
    border-bottom-right-radius: 4px; box-shadow: 0 2px 8px rgba(79,70,229,.2);
}
.chat-bubble.assistant {
    align-self: flex-start; background: var(--surface);
    border: 1px solid var(--border-light); border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}
.chat-bubble.system {
    align-self: center; background: var(--danger-bg); color: var(--danger);
    font-size: 13px; border-radius: 10px; padding: 8px 16px;
}
.chat-bubble.loading { display: flex; gap: 5px; padding: 14px 20px; }
.chat-bubble.loading .dot {
    width: 7px; height: 7px; background: var(--accent-light);
    border-radius: 50%; animation: dotBounce .6s infinite alternate;
}
.chat-bubble.loading .dot:nth-child(2) { animation-delay: .15s; }
.chat-bubble.loading .dot:nth-child(3) { animation-delay: .3s; }

.chat-input-bar {
    display: flex; gap: 10px; padding: 14px 0;
    border-top: 1px solid var(--border-light); align-items: flex-end;
}
.chat-input-bar textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; }

.complete-box {
    text-align: center; background: var(--success-bg);
    border: 1px solid rgba(16,185,129,.2); border-radius: var(--radius);
    padding: 24px; margin-top: 8px;
}
.complete-box p { color: var(--success); font-weight: 600; margin-bottom: 12px; }

/* ── BMC 캔버스 ── */
.bmc-grid {
    display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    grid-template-rows: 1fr 1fr 1fr; gap: 2px;
    background: var(--border); border-radius: var(--radius-lg);
    overflow: hidden; min-height: 520px; box-shadow: var(--shadow-md);
}
.bmc-cell {
    background: var(--surface); padding: 14px;
    cursor: pointer; transition: all .25s; position: relative;
    border-top: 3px solid transparent;
}
.bmc-cell:hover { transform: scale(1.01); z-index: 2; box-shadow: var(--shadow-md); }
.bmc-cell::after {
    content: '✎'; position: absolute; top: 12px; right: 12px;
    font-size: 12px; color: var(--text3); opacity: 0; transition: opacity .15s;
}
.bmc-cell:hover::after { opacity: 1; }
.bmc-cell h4 {
    font-size: 10px; text-transform: uppercase;
    margin-bottom: 10px; letter-spacing: .8px; font-weight: 700;
    display: flex; align-items: center; gap: 5px;
}
.bmc-cell h4::before { font-size: 14px; }
.bmc-cell ul { list-style: none; }
.bmc-cell li {
    font-size: 13px; color: var(--text); padding: 5px 8px; margin-bottom: 4px;
    border-radius: 6px; line-height: 1.5; transition: background .15s;
}
.bmc-cell:hover li { background: rgba(255,255,255,.6); }
.bmc-cell li:last-child { border-bottom: none; }

/* BMC 셀별 컬러 */
.bmc-partners   { grid-row: 1/3; grid-column: 1; border-top-color: #8b5cf6; background: linear-gradient(180deg, #f5f3ff 0%, #fff 40%); }
.bmc-partners h4 { color: #7c3aed; }
.bmc-partners h4::before { content: '🤝'; }
.bmc-partners li { border-left: 3px solid #ddd6fe; padding-left: 10px; }

.bmc-activities { grid-row: 1; grid-column: 2; border-top-color: #3b82f6; background: linear-gradient(180deg, #eff6ff 0%, #fff 40%); }
.bmc-activities h4 { color: #2563eb; }
.bmc-activities h4::before { content: '⚡'; }
.bmc-activities li { border-left: 3px solid #bfdbfe; padding-left: 10px; }

.bmc-resources  { grid-row: 2; grid-column: 2; border-top-color: #06b6d4; background: linear-gradient(180deg, #ecfeff 0%, #fff 40%); }
.bmc-resources h4 { color: #0891b2; }
.bmc-resources h4::before { content: '💎'; }
.bmc-resources li { border-left: 3px solid #a5f3fc; padding-left: 10px; }

.bmc-value      { grid-row: 1/3; grid-column: 3; border-top-color: #f59e0b; background: linear-gradient(180deg, #fffbeb 0%, #fff 30%); }
.bmc-value h4 { color: #d97706; font-size: 11px; }
.bmc-value h4::before { content: '🎯'; }
.bmc-value li { border-left: 3px solid #fde68a; padding-left: 10px; background: rgba(255,251,235,.5); }

.bmc-relations  { grid-row: 1; grid-column: 4; border-top-color: #ec4899; background: linear-gradient(180deg, #fdf2f8 0%, #fff 40%); }
.bmc-relations h4 { color: #db2777; }
.bmc-relations h4::before { content: '💖'; }
.bmc-relations li { border-left: 3px solid #fbcfe8; padding-left: 10px; }

.bmc-channels   { grid-row: 2; grid-column: 4; border-top-color: #f97316; background: linear-gradient(180deg, #fff7ed 0%, #fff 40%); }
.bmc-channels h4 { color: #ea580c; }
.bmc-channels h4::before { content: '📡'; }
.bmc-channels li { border-left: 3px solid #fed7aa; padding-left: 10px; }

.bmc-segments   { grid-row: 1/3; grid-column: 5; border-top-color: #10b981; background: linear-gradient(180deg, #ecfdf5 0%, #fff 40%); }
.bmc-segments h4 { color: #059669; }
.bmc-segments h4::before { content: '👥'; }
.bmc-segments li { border-left: 3px solid #a7f3d0; padding-left: 10px; }

.bmc-cost       { grid-row: 3; grid-column: 1/4; border-top-color: #ef4444; background: linear-gradient(180deg, #fef2f2 0%, #fff 50%); }
.bmc-cost h4 { color: #dc2626; }
.bmc-cost h4::before { content: '💸'; }
.bmc-cost li { border-left: 3px solid #fecaca; padding-left: 10px; display: inline-block; margin-right: 12px; }

.bmc-revenue    { grid-row: 3; grid-column: 4/6; border-top-color: #22c55e; background: linear-gradient(180deg, #f0fdf4 0%, #fff 50%); }
.bmc-revenue h4 { color: #16a34a; }
.bmc-revenue h4::before { content: '💰'; }
.bmc-revenue li { border-left: 3px solid #bbf7d0; padding-left: 10px; display: inline-block; margin-right: 12px; }

/* ── 대시보드 ── */
.dash-header { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.dash-header h1 { font-size: 22px; font-weight: 700; }

.project-list { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.project-card {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border-light);
    text-decoration: none; color: var(--text);
    transition: all .2s; box-shadow: var(--shadow-sm);
}
.project-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.project-card .title { font-weight: 600; font-size: 15px; }
.project-card .meta { font-size: 12px; color: var(--text3); margin-top: 3px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty-state-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--accent-bg); display: flex;
    align-items: center; justify-content: center;
    font-size: 28px; margin: 0 auto 16px;
}

/* ── 모달 ── */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.35); backdrop-filter: blur(4px);
    z-index: 100; justify-content: center; align-items: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface); border: 1px solid var(--border-light);
    border-radius: var(--radius-lg); padding: 32px;
    width: 90%; max-width: 400px;
    animation: fadeSlideIn .25s ease; box-shadow: var(--shadow-lg);
}
.modal h2 { font-size: 19px; font-weight: 700; margin-bottom: 20px; }
.modal .field { margin-bottom: 14px; }
.modal label { display: block; font-size: 13px; color: var(--text2); margin-bottom: 5px; font-weight: 500; }
.modal .actions { display: flex; gap: 10px; margin-top: 22px; }

/* ── 애니메이션 ── */
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dotBounce { from { transform: translateY(0); opacity: .4; } to { transform: translateY(-6px); opacity: 1; } }

/* ── 반응형 ── */
@media (max-width: 768px) {
    .bmc-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .bmc-cell { grid-row: auto !important; grid-column: auto !important; }
    .hero { padding: 50px 0 30px; }
    .hero h1 { font-size: 28px; }
    .hero-image { margin-top: 32px; }
    .features { grid-template-columns: 1fr; }
    .feature-img { aspect-ratio: 16/9; }
    .chat-bubble { max-width: 88%; }
}
