:root {
    /* Light Theme (Default) */
    --primary: #0066FF; 
    --primary-dark: #0052CC;
    --primary-light: #E6F0FF;
    --text-main: #333333;
    --text-muted: #666666;
    --white: #ffffff;
    --bg-light: #F8FAFC;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --border-color: #eeeeee;
    --footer-bg: #001233;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 30px rgba(0, 102, 255, 0.08);
}

[data-theme="dark"] {
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --white: #0f172a;
    --bg-light: #1e293b;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --card-bg: #1e293b;
    --border-color: #334155;
    --footer-bg: #020617;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
    transition: background-color 0.3s ease;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-light); /* Changed to light bg for dashboard contrast */
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
    letter-spacing: 1px;
}

.logo-icon {
    font-size: 24px;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
}

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

#btnTheme {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
    color: var(--text-main);
}

#btnTheme:hover {
    transform: scale(1.1);
}

/* Dashboard Layout */
.page-header {
    padding-top: 120px;
    padding-bottom: 40px;
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.page-header p {
    color: var(--text-muted);
}

.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    margin-bottom: 80px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.filter-box, .stats-box {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.filter-box h3, .stats-box h3 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-main);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 8px;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    font-size: 15px;
}

.filter-list li:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.filter-list li.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.stat-item .value {
    font-weight: 700;
    color: var(--primary);
}

/* Feed Section */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

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

.analysis-card .card-header {
    margin-bottom: 24px;
}

.analysis-card h2 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.analysis-card .sub {
    font-size: 14px;
    color: var(--text-muted);
}

.feed-header h2 {
    font-size: 24px;
    color: var(--text-main);
}

.search-bar input {
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    width: 300px;
    transition: var(--transition);
}

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

.feed-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feed-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    transition: var(--transition);
}

.feed-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.feed-meta {
    display: flex;
    gap: 12px;
    font-size: 13px;
    margin-bottom: 8px;
    align-items: center;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-muted);
}

.category {
    color: var(--primary);
    font-weight: 500;
}

.source {
    color: var(--text-muted);
    font-size: 13px;
    margin-left: 4px;
}

.source a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.source a:hover {
    text-decoration: underline;
}

.date {
    color: var(--text-muted);
    margin-left: auto;
}

.feed-title a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 600;
    transition: color 0.2s;
}

.feed-title a:hover {
    color: var(--primary);
}

/* Common Components */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn.primary {
    background: var(--primary);
    color: #fff;
}

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.full-width {
    width: 100%;
    margin-top: 16px;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

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

/* Mobile Responsive */
@media (max-width: 900px) {
    .dashboard { grid-template-columns: 1fr; }
    .sidebar { position: static; margin-bottom: 32px; }
    .search-bar input { width: 100%; }
    .nav-links { display: none; }
}
