:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #34495e;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

nav ul li a:hover {
    background: rgba(255,255,255,0.1);
}

nav ul li a.active {
    background: var(--secondary-color);
}

.intro {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card-content {
    padding: 1.5rem;
}

.article-card h2 {
    color: var(--secondary-color);
    margin-bottom: 0.8rem;
    font-size: 1.4rem;
}

.article-card p {
    margin-bottom: 1.2rem;
    color: #555;
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    position: relative;
}

.read-more::after {
    content: '→';
    margin-left: 5px;
    transition: margin-left 0.3s ease;
}

.read-more:hover::after {
    margin-left: 10px;
}

.article-content {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
    line-height: 1.8;
}

.article-content h2 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content code {
    background-color: #f5f7f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--accent-color);
}

pre code {
    display: block;
    padding: 1rem;
    overflow-x: auto;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 4px;
    margin: 1rem 0;
}

table.data-types {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

table.data-types th, 
table.data-types td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table.data-types th {
    background-color: #f5f7f9;
    font-weight: 600;
}

table.data-types tr:hover {
    background-color: #f9f9f9;
}

.code-section {
    margin: 1.5rem 0;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    transition: all 0.3s;
}

.back-link:hover {
    background: var(--secondary-color);
    color: white;
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: auto;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: #a3d0ff;
    text-decoration: none;
}

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