/* Free Duplicate Finder Tutorial Styles - Dark Theme */

:root {
    --primary-color: #4dabf7;
    --primary-dark: #339af0;
    --text-color: #e9ecef;
    --text-muted: #adb5bd;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #343a40;
    --nav-bg: #1a1a1a;
    --hover-bg: #2c2c2c;
    --sidebar-width: 280px;
    --content-max-width: 900px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Site Navigation */
.site-nav {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.site-menu {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-menu a {
    color: var(--text-color);
    font-size: 0.95rem;
}

.site-menu a:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.download-button {
    display: inline-flex;
    align-items: center;
    transition: opacity 0.2s;
}

.download-button:hover {
    opacity: 0.85;
}

.download-button img {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

.language-selector {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
}

/* Main Layout */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px;
    display: flex;
    gap: 24px;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: 80px;
    align-self: flex-start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 20px;
}

.card h1 {
    margin-top: 0;
    font-size: 1.8rem;
    color: var(--primary-color);
}

.card h2 {
    font-size: 1.3rem;
    margin-top: 28px;
    margin-bottom: 12px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.card p, .card li {
    font-size: 1rem;
    color: var(--text-muted);
}

.card ol, .card ul {
    padding-left: 24px;
}

.card li {
    margin-bottom: 8px;
}

.card strong {
    color: var(--text-color);
}

/* Tutorial Navigation */
.tutorial-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.page-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-numbers a, .page-numbers span {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--card-bg);
    color: var(--text-color);
    min-width: 32px;
    text-align: center;
}

.page-numbers a:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    text-decoration: none;
}

.page-numbers .current {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.btn-prev, .btn-next {
    padding: 8px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    color: var(--primary-color);
    background-color: var(--card-bg);
    font-size: 0.95rem;
}

.btn-prev:hover, .btn-next:hover {
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
}

.btn-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Screenshots */
.screenshot {
    margin: 20px 0;
    padding: 16px;
    background-color: #2a2a2a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
}

.screenshot img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.screenshot figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Sidebar */
.sidebar-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
    margin-bottom: 16px;
    color: var(--text-color);
}

/* Tutorial Outline */
.tutorial-outline {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tutorial-outline li {
    margin-bottom: 4px;
    border-radius: 4px;
}

.tutorial-outline a {
    display: block;
    padding: 8px 10px;
    color: var(--text-muted);
    border-radius: 4px;
    font-size: 0.95rem;
}

.tutorial-outline a:hover {
    background-color: var(--hover-bg);
    color: var(--primary-color);
    text-decoration: none;
}

.tutorial-outline .current {
    background-color: rgba(77, 171, 247, 0.15);
    border-left: 3px solid var(--primary-color);
}

.tutorial-outline .current a {
    color: var(--primary-color);
    font-weight: 500;
}

/* Related Apps */
.related-apps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-apps li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.related-apps li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-apps a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-apps a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.related-apps img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background-color: var(--hover-bg);
    flex-shrink: 0;
}

.related-apps span {
    line-height: 1.3;
}

/* Advertisements */
.left-ad {
    position: fixed;
    left: 20px;
    top: 90px;
    width: 160px;
    z-index: 90;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.inline-ad {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 0 20px;
    text-align: center;
}

.inline-ad ins,
.left-ad ins {
    display: block;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 24px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 1400px) {
    .left-ad {
        display: none;
    }
}

@media (min-width: 1401px) {
    .main-container {
        margin-left: 200px;
    }
}

@media (max-width: 900px) {
    .main-container {
        flex-direction: column;
        margin-left: auto;
    }

    .sidebar {
        width: 100%;
        order: 2;
        position: static;
        top: auto;
        align-self: auto;
        max-height: none;
        overflow-y: visible;
    }

    .content-area {
        order: 1;
    }

    .site-menu {
        display: none;
    }

    .download-button img {
        height: 30px;
    }
}

@media (max-width: 600px) {
    .site-nav-inner {
        height: auto;
        flex-direction: column;
        padding: 10px 0;
        gap: 10px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .tutorial-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .page-numbers {
        justify-content: center;
    }

    .card h1 {
        font-size: 1.5rem;
    }
}
