@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary: #ff6b9d;
    --secondary: #feca57;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --accent: #48dbfb;
}

body {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    letter-spacing: 0.3px;
}

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

/* Header */
header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    animation: fadeInDown 0.6s ease;
    font-weight: 700;
    letter-spacing: 1px;
}

header .tagline {
    font-size: 1.2em;
    opacity: 0.95;
    animation: fadeInUp 0.6s ease;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 60px 0;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

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

.article-card-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    padding: 20px;
    color: white;
}

.article-card-header h2 {
    font-size: 1.3em;
    margin-bottom: 8px;
    line-height: 1.5;
    font-weight: 600;
}

.article-date {
    font-size: 0.85em;
    opacity: 0.9;
}

.article-card-body {
    padding: 20px;
    color: var(--dark);
}

.article-preview {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
    font-size: 0.9em;
    font-weight: bold;
}

.read-more:hover {
    background: var(--primary);
}

/* Article Detail */
.article-detail {
    background: white;
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-detail h1 {
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
    font-size: 2.5em;
}

.article-detail-meta {
    color: #888;
    font-size: 0.95em;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light);
}

.article-detail-content {
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
}

.article-detail-content h2 {
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.article-detail-content h3 {
    color: var(--accent);
    margin-top: 20px;
    margin-bottom: 10px;
}

.article-detail-content p {
    margin-bottom: 15px;
}

.article-detail-content ul,
.article-detail-content ol {
    margin-left: 30px;
    margin-bottom: 15px;
}

.article-detail-content li {
    margin-bottom: 8px;
}

.article-detail-content code {
    background: var(--light);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.article-detail-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 20px;
    margin: 20px 0;
    color: #666;
    font-style: italic;
}

.back-button {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    margin-bottom: 30px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: var(--primary);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .article-detail {
        padding: 20px;
    }
}
