/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Variables */
:root {
    --primary-green: #62C467;
    --primary-blue: #0099FF;
    --dark-bg: #1a1a1a;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1200px;
    margin: 5px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo {
    width: 200px;
    height: auto;
    border: 0;
}

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

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.login-btn {
    padding: 8px 20px;
    border: 2px solid var(--primary-blue);
    border-radius: 25px;
    color: var(--primary-blue) !important;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--primary-blue);
    color: white !important;
}

.register-btn {
    padding: 8px 20px;
    background: var(--gradient);
    color: white !important;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Learn Layout */
.learn-wrap {
    padding-top: 80px;
    min-height: calc(100vh - 70px);
    background: var(--white);
}

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

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #ccc;
}

/* Article */
.learn-article {
    width: 100%;
}

.article-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--dark-bg);
    margin-bottom: 10px;
}

.article-tagline {
    font-size: 1.05rem;
    color: var(--medium-gray);
    line-height: 1.55;
    margin-bottom: 10px;
}

.article-meta {
    font-size: 0.8125rem;
    color: #aaa;
}

.article-content{
    width: 760px;
    margin-left: auto;
    margin-right: auto;
}

/* Section title */
.article-body h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-bg);
    margin: 1.75em 0 0.5em;
}

/* Article Body Typography */
.article-body {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;
}

.article-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-bg);
    margin: 1.4em 0 0.4em;
}

.article-body p {
    margin-bottom: 1em;
}

.article-body ul,
.article-body ol {
    margin: 0 0 1em 1.5em;
}

.article-body li {
    margin-bottom: 0.3em;
}

.article-body a {
    color: var(--primary-blue);
    text-decoration: underline;
    text-decoration-color: rgba(0, 153, 255, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.article-body a:hover {
    text-decoration-color: var(--primary-blue);
}

.article-body strong {
    font-weight: 600;
    color: #222;
}

.article-body code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background: #f0f4f8;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.15em 0.4em;
    color: #c53030;
}

.article-body pre {
    background: #1e2430;
    border-radius: 8px;
    padding: 20px 24px;
    overflow-x: auto;
    margin-bottom: 1.5em;
}

.article-body pre code {
    background: none;
    border: none;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.7;
}

.article-body blockquote {
    border-left: 4px solid var(--primary-green);
    margin: 1.5em 0;
    padding: 0.75em 1.25em;
    background: #f8fbf8;
    border-radius: 0 6px 6px 0;
    color: #555;
}

.article-body hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 2em 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1em 0;
}

/* Learn Footer */
.learn-footer {
    background: var(--dark-bg);
    padding: 24px 20px;
    text-align: center;
}

.learn-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.learn-footer p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.learn-footer-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.learn-footer-links a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.learn-footer-links a:hover {
    color: var(--white);
}

/* Article Listing (index page) */
.learn-listing h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dark-bg);
    margin-bottom: 6px;
}

.learn-listing-intro {
    color: var(--medium-gray);
    margin-bottom: 24px;
}

.article-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.article-list-item {
    border-radius: 8px;
    transition: background 0.15s;
}

.article-list-item:hover {
    background: var(--light-gray);
}

.article-list-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 14px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
}

.article-list-item:last-child .article-list-link {
    border-bottom: none;
}

.article-list-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--primary-blue);
}

.article-list-desc {
    font-size: 0.9rem;
    color: var(--medium-gray);
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-content{
        width: 100%;
    }

    .learn-footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .learn-container {
        padding: 20px 16px 48px;
    }

    .article-header h1 {
        font-size: 1.35rem;
    }

    .article-content{
        width: 100%;
    }

    .learn-footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
}
