:root {
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --border-color: #e2e8f0;
    --font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header Styles */
.site-header {
    background-color: var(--card-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.site-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.site-header .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    word-break: keep-all;
}

/* Layout */
.layout-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
    padding-bottom: 3rem;
}

@media (min-width: 768px) {
    .layout-container {
        flex-direction: row;
        align-items: flex-start;
    }
}

/* Sidebar Styles */
.sidebar {
    flex: 0 0 250px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    position: sticky;
    top: 2rem;
}

.sidebar-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-btn:hover {
    background: var(--bg-color);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-color);
    color: white;
}

.date-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem; /* Space for scrollbar */
}

.date-list::-webkit-scrollbar {
    width: 6px;
}

.date-list::-webkit-scrollbar-track {
    background: transparent;
}

.date-list::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 10px;
}

.date-list li button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    font-family: inherit;
}

.date-list li button:hover {
    background: var(--bg-color);
    color: var(--accent-color);
}

.date-list li button.active {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
}

/* Main Content Styles */
.content {
    flex: 1;
    min-width: 0;
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* SEO Intro Section for AdSense */
.seo-intro-section {
    margin-bottom: 2rem;
}

.seo-intro-box {
    background-color: var(--card-bg);
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.seo-intro-box h2 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.seo-intro-box p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    word-break: keep-all;
}

/* AdSense Placeholder Container */
.ad-container {
    background-color: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 250px;
    text-align: center;
    color: #94a3b8;
    grid-column: 1 / -1; /* Span all columns */
    margin: 1rem 0;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Affiliate Inquiry Styles */
.affiliate-section {
    background-color: var(--card-bg);
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

.container.narrow {
    max-width: 650px;
    margin: 0 auto;
}

.section-title.centered {
    text-align: center;
    border-bottom: none;
    margin-bottom: 0.5rem;
}

.section-desc.centered {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.submit-btn {
    background-color: var(--accent-color);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 1rem;
}

.submit-btn:hover {
    background-color: var(--accent-hover);
}

/* Footer Styles */
.site-footer {
    background-color: var(--card-bg);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: auto;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}