:root {
    --bg-color: #f4f7f6;
    --container-bg: #ffffff;
    --text-color: #2c3e50;
    --primary-color: #27ae60;
    --secondary-color: #2ecc71;
    --accent-color: #3498db;
    --footer-bg: #ecf0f1;
    --nav-bg: #ffffff;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --container-bg: #2c3e50;
    --text-color: #ecf0f1;
    --primary-color: #2ecc71;
    --secondary-color: #27ae60;
    --footer-bg: #121212;
    --nav-bg: #2c3e50;
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}

/* Header & Navbar */
header {
    background-color: var(--nav-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

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

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.2s;
}

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

#theme-toggle-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#theme-toggle-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Layout */
.container {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

section {
    background-color: var(--container-bg);
    padding: 4rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    margin-bottom: 3rem;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; color: var(--primary-color); }
h2 { font-size: 1.8rem; margin-bottom: 2rem; text-align: center; color: var(--text-color); }
h3 { font-size: 1.3rem; margin-bottom: 1rem; color: var(--primary-color); }

/* Hero Section */
.hero-section {
    text-align: center;
}

.featured-tips {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-color);
    border-left: 5px solid var(--primary-color);
    text-align: left;
}

#refresh-tip-btn {
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: bold;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

/* Disease Grid */
.disease-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.disease-grid article {
    background-color: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    transition: transform 0.3s;
}

.disease-grid article:hover {
    transform: translateY(-5px);
}

/* Ad Slot */
.ad-slot {
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: rgba(0,0,0,0.02);
    border: 1px dashed #ccc;
    border-radius: 12px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    padding: 4rem 2rem;
    text-align: center;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.footer-links li { margin: 0 1.5rem; }
.footer-links a { color: var(--text-color); text-decoration: none; font-size: 0.95rem; opacity: 0.8; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: var(--container-bg);
    margin: 10% auto;
    padding: 3rem;
    border-radius: 20px;
    max-width: 650px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .disease-grid { grid-template-columns: 1fr; }
    .navbar { padding: 1rem; }
    .nav-links { display: none; }
}