:root {
    /* Colors */
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.4);
    --secondary: #10b981;
    --secondary-glow: rgba(16, 185, 129, 0.3);
    --accent: #f59e0b;
    --bg-light: #f9fafb;
    --text-main: #111827;
    --text-muted: #4b5563;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);

    /* Spacing & Borders */
    --container-width: 1200px;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Base Texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3%3Ffilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

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

.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); padding: 80px 0; }

/* Typography */
h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 1.5rem; }
h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.5rem; }

.text-gradient {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Nav */
header {
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

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

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

/* Buttons */
.btn {
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover { background-color: #f3f4f6; }

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    padding: 100px 0;
    gap: 4rem;
}

.hero-content { flex: 1; }
.hero-visual { flex: 1; display: flex; justify-content: center; }

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: #eef2ff;
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-btns { display: flex; gap: 1rem; }

/* Mockup UI */
.dashboard-mockup {
    width: 100%;
    max-width: 500px;
    position: relative;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.mockup-card .card-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.alert-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.insight-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 100px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.bar {
    flex: 1;
    background: #e5e7eb;
    border-radius: 4px 4px 0 0;
    transition: height 1s;
}

.bar.highlight {
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* Problem Grid */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.problem-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.problem-card:hover { transform: translateY(-10px); }

/* Tabs styling */
.tabs-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    background: var(--white);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Revenue Section styling */
.revenue-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
}

.revenue-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.revenue-table th {
    text-align: left;
    padding: 0.8rem;
    border-bottom: 2px solid #e2e8f0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.revenue-table td {
    padding: 0.8rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.revenue-amount {
    font-weight: 700;
    color: var(--primary);
}

/* Insight Component Styles */
.representative-reviews {
    margin-top: 2rem;
}

.review-bubble {
    background: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid var(--primary);
    font-size: 0.9rem;
}

.review-bubble .rating {
    color: var(--accent);
    font-weight: bold;
    margin-right: 0.5rem;
}

.chart-container {
    margin-top: 1rem;
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 150px;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-md);
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    height: 100%; /* 추가: 부모 컨테이너의 높이를 100% 채움 */
    justify-content: flex-end; /* 추가: 바가 바닥에서 시작하도록 설정 */
}

.chart-bar {
    width: 100%;
    max-width: 30px; /* 추가: 바의 최대 너비 제한 */
    background: #e5e7eb;
    border-radius: 4px 4px 0 0;
    height: 0; /* 초기 상태는 0 */
    transition: height 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); /* 애니메이션 효과 강화 */
}

.chart-bar.active {
    background: var(--primary);
}

.chart-label {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.peak-hours-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Analyzer Section (Adjusted) */
.analyzer-section { padding: 100px 0; }
.analyzer-container {
    background: var(--white);
    padding: 3rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.search-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.status-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(79, 70, 229, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hidden { display: none !important; }

/* Insight Report Styling */
.insight-report {
    border-top: 1px solid #eee;
    padding-top: 2rem;
    animation: fadeIn 0.5s ease-out;
}

.report-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.insight-card {
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: #f8fafc;
}

.insight-card.pros { border-left: 4px solid var(--secondary); }
.insight-card.cons { border-left: 4px solid var(--accent); }
.insight-card.menu { border-left: 4px solid var(--primary); grid-column: span 2; }

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}

.tag-primary { background: #eef2ff; color: var(--primary); }
.tag-secondary { background: #ecfdf5; color: var(--secondary); }
.tag-accent { background: #fffbeb; color: var(--accent); }

/* Demo Section (Keep or adjust if needed) */

/* Footer */
footer {
    background: #111827;
    color: #9ca3af;
    padding: 60px 0;
}

footer .logo { color: var(--white); margin-bottom: 1rem; }

/* Urgent Alert Popup */
.urgent-alert-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    animation: slideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.alert-content {
    background: #111827;
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 350px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.alert-icon { font-size: 1.5rem; }

.alert-content p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
    color: #d1d5db;
}

.btn-primary-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

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

/* Consulting Section Styles */
.consulting-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.consulting-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.consulting-card.issue { border-left: 4px solid var(--accent); }
.consulting-card.cause { border-left: 4px solid var(--primary); }
.consulting-card.impact { border-left: 4px solid var(--secondary); grid-column: span 2; background: #ecfdf5; }

.card-title {
    font-weight: 700;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.impact-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #065f46;
}

/* Action Plan Styles */
.action-plan-container {
    grid-column: span 2;
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.action-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.action-step:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.step-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 80px;
    text-align: center;
}

.action-step.immediate .step-badge { background: #fee2e2; color: #991b1b; }
.action-step.midterm .step-badge { background: #e0e7ff; color: #3730a3; }
.action-step.upsell .step-badge { background: #d1fae5; color: #065f46; }

/* Benchmark Chart */
.benchmark-chart {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.benchmark-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.benchmark-bar .label {
    width: 80px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.benchmark-bar .bar-fill {
    height: 12px;
    border-radius: 6px;
    background: #e5e7eb;
    position: relative;
    min-width: 10px;
}

.benchmark-bar .bar-fill.my { background: var(--primary); }
.benchmark-bar .bar-fill.competitor { background: var(--text-muted); opacity: 0.3; }

.benchmark-bar .score {
    width: 30px;
    font-weight: bold;
    font-size: 0.9rem;
    text-align: right;
}

@media (max-width: 768px) {
    .consulting-section { grid-template-columns: 1fr; }
    .consulting-card.impact { grid-column: span 1; }
    .action-plan-container { grid-column: span 1; }
}
