:root {
    --bg-color: #f0f2f5;
    /* Google light gray */
    --surface-color: #ffffff;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --accent-red: #d93025;
    --accent-blue: #1a73e8;
    --border-color: #dadce0;
    --sidebar-width: 256px;
    --header-height: 64px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #202124;
        --surface-color: #292a2d;
        --text-primary: #e8eaed;
        --text-secondary: #9aa0a6;
        --border-color: #3c4043;
    }
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
}

/* Header */
.top-nav {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: var(--header-height);
    background-color: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo-red {
    color: var(--accent-red);
}

.logo-gray {
    color: var(--text-secondary);
    font-weight: 400;
}

.search-bar {
    flex: 1;
    max-width: 720px;
    margin: 0 24px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background-color: var(--bg-color);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-bar input:focus {
    background-color: var(--surface-color);
    border-color: var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    outline: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.cta-btn {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
}

/* Layout */
.container {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    max-width: 1280px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.sidebar {
    padding: 24px 12px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding-left: 12px;
    letter-spacing: 0.05em;
}

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

.menu-list li a {
    display: block;
    padding: 8px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0 24px 24px 0;
    font-weight: 500;
    transition: background-color 0.2s;
    cursor: pointer;
}

.menu-list li.active a,
.menu-list li a:hover {
    background-color: rgba(26, 115, 232, 0.1);
    color: var(--accent-blue);
}

/* Content */
.content {
    padding: 24px;
    max-width: 960px;
}

.hero-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
    aspect-ratio: 16/7;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.hero-overlay h1 {
    font-size: 2rem;
    margin-bottom: 8px;
}

.news-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.card {
    background-color: var(--surface-color);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.card h2,
.card h3 {
    margin-bottom: 16px;
    font-weight: 400;
}

.api-example {
    background-color: #282c34;
    padding: 16px;
    border-radius: 8px;
    margin-top: 24px;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    color: #abb2bf;
    overflow-x: auto;
}

.code-header {
    margin-bottom: 12px;
    border-bottom: 1px solid #3e4451;
    padding-bottom: 8px;
}

.method {
    color: #61afef;
    font-weight: bold;
}

/* Dynamic Data Items */
.data-item {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-item:last-child {
    border-bottom: none;
}

.data-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.data-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.new {
    background-color: #e6f4ea;
    color: #137333;
}

.badge.update {
    background-color: #e8f0fe;
}

.stat-detail {
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Data Table Styles */
.table-container {
    overflow-x: auto;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-secondary);
}

tr:last-child td {
    border-bottom: none;
}

/* JSON Toggle */
.view-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.toggle-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 8px;
    color: var(--text-secondary);
}

.toggle-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

.json-view {
    display: none;
}

.json-view.show {
    display: block;
}

.visual-view.hide {
    display: none;
}

.countdown-timer {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

.time-unit {
    text-align: center;
}

.time-val {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-red);
}

.time-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}