[data-theme="dark"] {
    --bg-color: #1a1a1a;
    --text-color: #e9ecef;
    --card-bg: #2d2d2d;
    --border-color: #495057;
    --hover-shadow: rgba(0,0,0,0.2);
    --primary-color: #4dabf7;
    --primary-hover: #74c0fc;
    --header-bg: #1a1a1a;
    --code-bg: #1e1e1e;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding-top: 90px;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    text-align: left;
    transition: background-color 0.3s, color 0.3s;
}

.top-banner {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #e9ecef;
    padding: 15px 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #495057;
}

header {
    background-color: transparent;
    color: white;
    padding: 0;
    box-shadow: none;
    width: 100%;
}

header h1 {
    margin: 0;
    font-size: 2em;
    color: white;
    flex-grow: 1;
    text-align: center;
    font-family: 'Mogra', system-ui;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a.patreon-link {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 999px;
    display: inline-block;
    vertical-align: middle;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

nav ul li a.patreon-link:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

nav ul li a:hover {
    color: #e2e6ea;
}

.article-container {
    background-color: var(--card-bg);
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 0 10px var(--hover-shadow);
    max-width: 900px;
    width: 90%;
    margin: 30px auto;
    flex-grow: 1;
}

.breadcrumb {
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #999;
}

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

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

.article-header {
    text-align: left;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.article-header h1 {
    color: var(--primary-color);
    font-size: 2.5em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.article-header .subtitle {
    font-size: 1.3em;
    color: #999;
    margin-bottom: 20px;
}

.article-meta {
    color: #999;
    font-size: 0.95em;
}

.article-meta span {
    margin: 0 5px;
}

.article-content {
    line-height: 1.8;
    font-size: 1.1em;
    text-align: left;
}

.article-content .intro {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 30px;
}

.article-content h2 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    text-align: left;
}

.article-content h3 {
    color: var(--primary-color);
    font-size: 1.4em;
    margin-top: 30px;
    margin-bottom: 15px;
    text-align: left;
}

.article-content h4 {
    color: var(--primary-color);
    font-size: 1.2em;
    margin-top: 20px;
    margin-bottom: 10px;
    text-align: left;
}

.article-content p {
    margin-bottom: 20px;
    text-align: left;
}

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

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

.article-content strong {
    color: var(--primary-color);
}

.highlight-box {
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.15) 0%, rgba(116, 192, 252, 0.08) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.highlight-box h3, .highlight-box h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: bold;
}

.comparison-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:nth-child(even) {
    background: rgba(77, 171, 247, 0.05);
}

.cta-box {
    background: linear-gradient(135deg, rgba(77, 171, 247, 0.2) 0%, rgba(116, 192, 252, 0.1) 100%);
    border: 2px solid var(--primary-color);
    padding: 40px;
    margin: 40px 0;
    border-radius: 12px;
    text-align: left;
}

.cta-box h3 {
    color: var(--primary-color);
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(77, 171, 247, 0.3);
}

footer {
    background: linear-gradient(90deg, #1a1a1a 0%, #2d2d2d 100%);
    color: var(--text-color);
    padding: 40px 20px 20px;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section p {
    line-height: 1.6;
    margin: 10px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #999;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    body {
        padding-top: 140px;
    }

    .top-banner {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
    }

    nav ul li {
        margin: 8px 10px;
    }

    .article-container {
        padding: 40px 20px;
    }
    .article-header h1 {
        font-size: 2em;
    }
    .article-content {
        font-size: 1em;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    z-index: 999;
}

#back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(77, 171, 247, 0.4);
}

#back-to-top.show {
    display: flex;
}

@media (max-width: 768px) {
    #back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3em;
    }
}
