/* CSS Custom Properties (Variables) */
:root {
    --primary-bg: #1e1e1e;
    --secondary-bg: #2c2c2c;
    --card-bg: #121212;
    --text-color: #ffffff;
    --text-muted: #cccccc;
    --accent-color: #ffcc00;
    --hover-accent: #e6b800;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-dark: rgba(0, 0, 0, 0.5);
}

/* General Body Styles */
body {
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: var(--primary-bg);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    font-size: 16px;
}

/* Navbar Styles */
.navbar-container {
    background: var(--secondary-bg);
    padding: 10px;
    box-shadow: 0 2px 5px var(--shadow-light);
    text-align: center;
}

.navbar-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
    display: block;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.navbar a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    transition: 0.3s;
    font-weight: 700;
}

.navbar a:hover,
.navbar a:focus {
    background: var(--accent-color);
    color: #000000;
    border-radius: 4px;
}

.navbar a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Main Container Styles */
.container {
    max-width: 1400px;
    margin: 15px auto;
    background: var(--secondary-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--shadow-dark);
    position: relative;
    overflow-x: auto;
}

/* Heading Styles */
h1 {
    font-size: 28px;
    margin-bottom: 20px;
    font-weight: 700;
    color: var(--accent-color);
    text-align: center;
}

h2 {
    font-size: 24px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--accent-color);
    padding-bottom: 5px;
}

h3 {
    font-size: 18px;
    margin-top: 15px;
    color: var(--accent-color);
}

h4 {
    font-size: 16px;
    color: var(--accent-color);
    margin: 10px 0;
}

/* Paragraph and List Styles */
p,
ul {
    margin: 15px 0;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-muted);
}

strong {
    color: var(--accent-color);
    font-weight: 700;
}

/* Unified Link Styles */
a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

a:hover,
a:focus {
    color: var(--hover-accent);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Unified Section Styles */
.section {
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
}

/* Screenshot Section */
.screenshot-section {
    margin-bottom: 40px;
}

.screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.2s;
}

.screenshot-item img:hover {
    transform: scale(1.05);
}

.screenshot-caption {
    font-size: 0.9em;
    color: var(--text-muted);
    margin-top: 8px;
}

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    animation: fadeIn 0.3s ease-in-out;
}

.lightbox-image {
    max-width: 90%;
    max-height: 80%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
}

.lightbox-caption {
    color: var(--text-color);
    text-align: center;
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.1em;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-color);
    font-size: 2em;
    cursor: pointer;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Content Section (Other Page) */
.content-section {
    margin-bottom: 40px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.content-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.content-card:hover {
    transform: scale(1.02);
}

.content-card h3 {
    margin: 0 0 10px;
    font-size: 1.2em;
}

.content-card p {
    margin: 0 0 15px;
    color: var(--text-muted);
}

/* Links Section (Links Page) */
.links-section {
    margin-bottom: 40px;
}

.links-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    margin: 20px 0;
}

.links-table th,
.links-table td {
    padding: 12px;
    border-bottom: 1px solid var(--secondary-bg);
    color: var(--text-color);
}

.links-table th {
    background: var(--secondary-bg);
    color: var(--accent-color);
    font-weight: 700;
}

.links-table a.archive-link {
    color: var(--accent-color);
    text-decoration: none;
}

.links-table a.archive-link:hover {
    text-decoration: underline;
}

/* DataTables Overrides */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--text-color) !important;
    background: var(--secondary-bg) !important;
    border: none !important;
    padding: 5px 10px;
    margin: 0 2px;
    border-radius: 4px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--accent-color) !important;
    color: #000000 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--accent-color) !important;
    color: #000000 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    color: #999999 !important;
    background: var(--secondary-bg) !important;
}

.dataTables_wrapper .dataTables_filter input {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--accent-color) !important;
    border-radius: 4px;
    padding: 5px;
}

.dataTables_wrapper .dataTables_length select {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--accent-color) !important;
    border-radius: 4px;
    padding: 5px;
}

.dataTables_wrapper .dataTables_info {
    color: var(--text-muted) !important;
}

table.dataTable tbody tr {
    background-color: var(--card-bg) !important;
}

table.dataTable tbody tr:hover {
    background-color: var(--secondary-bg) !important;
}

table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc {
    background-color: #3a3a3a !important;
}

/* Unified Button Styles */
.action-button,
.download-button,
.explore-button,
.community-button,
.content-link {
    display: inline-block;
    background: var(--accent-color);
    color: #000000;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    transition: background 0.3s;
}

.action-button:hover,
.download-button:hover,
.explore-button:hover,
.community-button:hover,
.content-link:hover,
.action-button:focus,
.download-button:focus,
.explore-button:focus,
.community-button:focus,
.content-link:focus {
    background: var(--hover-accent);
}

.action-button:focus,
.download-button:focus,
.explore-button:focus,
.community-button:focus,
.content-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.download-button {
    padding: 6px 12px;
    font-size: 13px;
}

.button-container {
    text-align: center;
    margin-top: 20px;
}

/* Intro Text */
.intro-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Footer Styles */
.footer {
    background: var(--secondary-bg);
    padding: 15px;
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border-top: 1px solid var(--accent-color);
}

.social-icons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-icons img {
    width: 24px;
    height: 24px;
}

.social-icons a:hover img,
.social-icons a:focus img {
    transform: scale(1.1);
}

.social-icons a:focus {
    outline: 2px solid var(--accent-color);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: var(--accent-color);
    color: #000000;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: background 0.3s;
    font-size: 15px;
    font-weight: 700;
}

.back-to-top:hover,
.back-to-top:focus {
    background: var(--hover-accent);
}

.back-to-top:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Downloads Page */
.download-section {
    composes: section;
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: var(--card-bg);
    box-shadow: 0 1px 3px var(--shadow-light);
}

.download-table th,
.download-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid var(--secondary-bg);
    color: var(--text-muted);
    font-size: 14px;
}

.download-table th {
    background: var(--secondary-bg);
    color: var(--accent-color);
    font-weight: 700;
}

/* Archive DB Page */
.archive-section {
    composes: section;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.stat-item {
    background: var(--secondary-bg);
    padding: 10px;
    border-radius: 4px;
    text-align: center;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    display: block;
}

.stat-value {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 700;
}

.file-overview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.file-list-section,
.file-table-section {
    background: var(--secondary-bg);
    padding: 15px;
    border-radius: 4px;
}

.file-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list li {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.file-list li:before {
    content: "📄";
    position: absolute;
    left: 0;
    top: 2px;
}

.file-name {
    color: var(--accent-color);
    font-weight: 700;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.file-table th,
.file-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid var(--secondary-bg);
    color: var(--text-muted);
    font-size: 14px;
}

.file-table th {
    background: var(--secondary-bg);
    color: var(--accent-color);
    font-weight: 700;
}

.folder-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.folder-list li {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.folder-list li:before {
    content: "📁";
    position: absolute;
    left: 0;
    top: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.form-grid .submit-file,
.form-grid .report-issue {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
}

.archive-form {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 700;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea,
.form-group input[type="file"] {
    background: var(--secondary-bg);
    color: var(--text-color);
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.form-group input[type="submit"] {
    background: var(--accent-color);
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.form-group input[type="submit"]:hover,
.form-group input[type="submit"]:focus {
    background: var(--hover-accent);
}

.form-note {
    font-size: 13px;
    color: #999999;
    margin-top: 10px;
}

/* Tools Page */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.tool-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
}

.tool-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.tool-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Blog Page */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.blog-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
}

.blog-card h2 {
    font-size: 18px;
    margin-bottom: 10px;
}

.blog-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 700;
    transition: color 0.3s;
}

.read-more:hover,
.read-more:focus {
    color: var(--hover-accent);
}

/* Index Page */
.intro-section,
.community-section {
    composes: section;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.section-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-light);
    transition: transform 0.3s ease;
}

.section-card:hover {
    transform: translateY(-5px);
}

.section-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.section-card p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.community-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 16px;
    }

    p,
    ul,
    .intro-text,
    .screenshot-caption,
    .content-card p,
    .links-table td {
        font-size: 13px;
    }

    .screenshot-gallery,
    .content-grid,
    .tools-grid,
    .blog-posts,
    .sections-grid,
    .file-overview-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .links-table,
    .download-table,
    .file-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .navbar {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        padding: 10px;
    }

    .navbar {
        flex-direction: column;
        gap: 10px;
    }

    .navbar a {
        padding: 6px 10px;
        font-size: 14px;
    }

    .navbar-title {
        font-size: 20px;
    }

    .lightbox-image {
        max-width: 95%;
        max-height: 70%;
    }

    .lightbox-caption {
        font-size: 0.9em;
        bottom: 10px;
    }

    .community-links {
        gap: 10px;
    }
}