:root {
    --primary-color: #0f172a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --bg-light: #f1f5f9;
    --topbar-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', 'Sarabun', sans-serif;
    background-color: #e2e8f0; /* Darker background to highlight the centered content */
    color: var(--text-main);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar Styling */
.top-bar {
    background-color: var(--topbar-bg);
    height: 70px;
    display: flex;
    justify-content: center; /* Center the container inside */
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    padding: 0;
}

.top-bar-content {
    width: 100%;
    max-width: 1366px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary-color);
    letter-spacing: -0.025em;
}

.logo i {
    color: var(--secondary-color);
}

.top-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.nav-item.active a {
    background-color: #eff6ff;
    color: var(--secondary-color);
}

.nav-item:hover a:not(.active a) {
    background-color: #f8fafc;
    color: var(--text-main);
}

.top-bar-right .header-title h1 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center; /* Center the content area */
    padding: 0.75rem 0; /* Reduced padding */
}

.content-area {
    width: 100%;
    max-width: 1366px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

.viz-window {
    background: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid var(--border-color);
    overflow: hidden;
    width: 100%;
}

.viz-container {
    padding: 0;
    overflow: hidden;
    min-height: 850px;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .top-bar-left { gap: 1rem; }
    .logo span { display: none; }
    .nav-item span { display: none; }
}
