/* ==========================================================================
   Design System & Color Variables
   Style: Clean, Bright Light Mode with Orange Point Color (#FF6B00)
   ========================================================================== */

:root {
    /* Color Palette */
    --primary-orange: #FF6B00;
    --orange-hover: #E05D00;
    --orange-light: #FFF0E6;
    --orange-glow: rgba(255, 107, 0, 0.15);
    
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-subtle: #F1F5F9;
    
    --text-heading: #0F172A;
    --text-body: #334155;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    
    --card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
    --hover-shadow: 0 12px 30px -4px rgba(255, 107, 0, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.92);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    background: var(--orange-light);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 8px var(--orange-glow);
}

.brand-title {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-heading);
    letter-spacing: -0.5px;
}

.brand-title .highlight {
    color: var(--primary-orange);
}

.brand-sub {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.header-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ECFDF5;
    color: #059669;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #A7F3D0;
}

.header-tag .dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Content */
.main-content {
    padding-top: 40px;
    padding-bottom: 80px;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 36px;
}

.badge {
    display: inline-block;
    background: var(--orange-light);
    color: var(--primary-orange);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 16px;
}

.hero-section h1 {
    font-size: 38px;
    font-weight: 800;
    color: var(--text-heading);
    line-height: 1.25;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.orange-text {
    color: var(--primary-orange);
}

.hero-desc {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Card */
.filter-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--card-shadow);
    margin-bottom: 40px;
    transition: var(--transition);
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--bg-subtle);
}

.filter-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
}

.filter-hint {
    font-size: 13px;
    color: var(--text-muted);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-heading);
}

.select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    height: 52px;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-heading);
    background-color: #FFFFFF;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    appearance: none;
    cursor: pointer;
    transition: var(--transition);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2064748B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px var(--orange-glow);
}

.form-select:disabled {
    background-color: var(--bg-subtle);
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: var(--border-color);
}

/* Result Section */
.result-section {
    margin-bottom: 48px;
    animation: fadeIn 0.4s ease-out;
}

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

.result-header {
    margin-bottom: 24px;
}

.location-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-orange);
    background: var(--orange-light);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.result-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-heading);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.metric-card.primary-kpi {
    background: linear-gradient(135deg, #FFF9F5 0%, #FFFFFF 100%);
    border: 2px solid var(--primary-orange);
}

.metric-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.metric-value-main {
    margin-bottom: 12px;
}

.eok-val {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 38px;
    font-weight: 800;
    color: var(--primary-orange);
    line-height: 1.1;
    display: block;
}

.man-val {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.metric-value {
    font-family: 'Outfit', 'Noto Sans KR', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.range-value {
    font-size: 20px;
    color: #1E293B;
}

.metric-sub {
    font-size: 13px;
    color: var(--text-muted);
}

.metric-sub strong {
    color: var(--text-heading);
}

/* Analysis Section (Charts & Details) */
.analysis-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
}

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--card-shadow);
}

.analysis-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.chart-container {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Type List Details */
.type-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-subtle);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.type-item.active {
    background: var(--orange-light);
    border: 1px solid var(--primary-orange);
}

.type-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-heading);
}

.type-price {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-orange);
}

.type-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Placeholder State */
.placeholder-section {
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    text-align: center;
    margin-bottom: 48px;
}

.placeholder-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.placeholder-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
}

.placeholder-section p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* Summary Section (District Overview) */
.summary-section {
    margin-top: 40px;
}

.summary-header {
    margin-bottom: 24px;
}

.summary-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-heading);
}

.summary-header p {
    font-size: 14px;
    color: var(--text-muted);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.overview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.overview-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
}

.overview-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-orange);
    background: var(--orange-light);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.overview-cgg {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-heading);
}

.overview-price {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-orange);
    margin-top: 4px;
}

/* Footer */
.footer {
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 60px;
}

.footer-container {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-note {
    font-size: 12px;
    color: #94A3B8;
    margin-top: 4px;
}

.hidden {
    display: none !important;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 28px;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    .overview-grid {
        grid-template-columns: 1fr;
    }
    .filter-card {
        padding: 20px;
    }
}
