/* Font declarations */
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400;
  font-stretch: normal;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/roboto/v47/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWubEbWmT.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 500;
  font-stretch: normal;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/roboto/v47/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWub2bWmT.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 700;
  font-stretch: normal;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/roboto/v47/KFOMCnqEu92Fr1ME7kSn66aGLdTylUAMQXC89YmC2DPNWuYjammT.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vqPQw.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_7PqPQw.ttf) format('truetype');
}
@font-face {
  font-family: 'Roboto Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_Of2PQw.ttf) format('truetype');
}
/* Add Inter font for better documentation readability */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hjp-Ek-_0ewQ.woff) format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuI6fAZ9hjp-Ek-_0ewQ.woff) format('woff');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuGKYAZ9hjp-Ek-_0ewQ.woff) format('woff');
}

/* Base styles that apply regardless of theme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 20px;
    z-index: 100;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
    flex-grow: 1;
}

/* Header controls group for better organization */
.header-controls {
    display: flex;
    align-items: center;
    gap: 15px; /* Increased gap between buttons */
    margin-left: auto;
}

/* Button style for both Discord and Theme buttons */
.button-style {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 20px; /* More rounded corners */
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', 'Roboto', sans-serif;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.button-style:hover {
    background-color: var(--border-color);
    text-decoration: none;
}

/* Theme Switcher */
.theme-switcher {
    position: relative;
}

.theme-toggle-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 20px; /* More rounded corners */
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: 'Inter', 'Roboto', sans-serif;
}

.theme-toggle-btn:hover {
    background-color: var(--border-color);
}

.theme-options {
    position: absolute;
    top: 100%;
    right: 0;
    width: 180px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 0;
    display: none;
    z-index: 150;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.theme-options.show {
    display: block;
}

.theme-options button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', 'Roboto', sans-serif;
}

.theme-options button:hover {
    background-color: var(--accent);
    color: #fff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 15px 0;
    transition: transform 0.3s ease, background-color 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.sidebar-header {
    padding: 0 20px 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin: 2px 0;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 4px;
    margin-left: 10px;
    margin-right: 10px;
}

.nav-item:hover {
    background-color: var(--nav-hover-bg);
}

.nav-item.active {
    background-color: var(--active-nav-bg);
}

.nav-item a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    width: 100%;
    padding: 8px 15px;
    border-radius: 4px;
    position: relative;
}

.nav-item.active > a {
    color: var(--accent);
    font-weight: 500;
}

/* Add arrow indicators for expandable items */
.nav-item-with-children > a:after {
    content: "▶";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    transition: transform 0.2s;
    color: var(--text-secondary);
}

.nav-item-with-children.expanded > a:after {
    transform: translateY(-50%) rotate(90deg);
}

.nav-submenu {
    list-style: none;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px dashed var(--border-color);
    margin-top: 2px;
    margin-bottom: 5px;
    display: none; /* Hidden by default */
}

.nav-item.expanded .nav-submenu {
    display: block;
}

.nav-submenu .nav-item {
    font-size: 0.9rem;
    margin-left: 0;
}

.nav-submenu .nav-item a {
    padding: 6px 10px;
}

.nav-section-title {
    display: block;
    padding: 12px 20px 5px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 10px;
}

/* Main content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 30px 40px 30px 60px;
    max-width: 1200px;
    transition: background-color 0.3s;
}

/* Typography with new Inter font */
h1, h2, h3, h4, h5, h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 600;
    line-height: 1.25;
    position: relative;
    font-family: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

h1 {
    font-size: 2.2rem;
    padding: 0.5em 0.8em;
    border-radius: 8px;
    background-color: var(--header-bg);
    color: var(--header-text);
    margin-bottom: 1em;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 1.6rem;
    padding-bottom: 0.3em;
    border-bottom: 2px solid var(--border-color);
    margin-top: 1.8em;
}

h2::before {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent);
}

h3 {
    font-size: 1.35rem;
    padding: 0.3em 0;
    color: var(--accent);
}

h4 {
    font-size: 1.15rem;
    border-left: 3px solid var(--accent);
    padding-left: 10px;
}

p {
    margin: 1em 0;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Code blocks */
pre {
    background-color: var(--code-bg);
    border-radius: 8px;
    padding: 16px;
    overflow: auto;
    font-family: 'Roboto Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    margin: 1em 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 0.9em;
    line-height: 1.5;
}

code {
    font-family: 'Roboto Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    background-color: var(--inline-code-bg);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    font-size: 0.9em;
}

/* Lists */
ul, ol {
    margin: 1em 0;
    padding-left: 2em;
}

li {
    margin-bottom: 0.5em;
}

/* Section container with rounded corners */
.section-container {
    background-color: var(--section-bg);
    border-radius: 8px;
    padding: 32px;
    margin: 1.5em 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
    overflow-x: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

th, td {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

th {
    background-color: var(--bg-secondary);
    font-weight: 500;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

tr:nth-child(odd) {
    background-color: var(--table-alt-row);
}

/* Notes and warnings */
.note, .warning, .tip {
    padding: 15px 20px;
    margin: 1.2em 0;
    border-left: 4px solid;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.note {
    background-color: var(--note-bg);
    border-left-color: var(--note-border);
}

.warning {
    background-color: var(--warning-bg);
    border-left-color: var(--warning-border);
}

.tip {
    background-color: var(--tip-bg);
    border-left-color: var(--tip-border);
}

.note-title, .warning-title, .tip-title {
    font-weight: 500;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
}

.note-title:before {
    content: "ℹ️";
    margin-right: 8px;
}

.warning-title:before {
    content: "⚠️";
    margin-right: 8px;
}

.tip-title:before {
    content: "💡";
    margin-right: 8px;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 2em 0;
}

.feature-card {
    background-color: var(--section-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.feature-title {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 500;
}

/* Responsive design */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 99;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
        margin-right: 15px;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .header-controls {
        display: flex;
        flex-direction: row;
        gap: 5px;
    }
}

/* Better body fade-in approach */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    animation: fadeIn 0.5s ease-in;
}

.main-content {
    transition: opacity 0.2s ease;
}

.main-content.loading {
    opacity: 0.5;
}

/* Add to your style.css */
.content-transition {
    transition: opacity 0.3s ease;
}

.content-loading {
    opacity: 0.6;
}

.loading-indicator {
    text-align: center;
    padding: 2rem;
    font-style: italic;
    color: #888;
}

.error-message {
    text-align: center;
    padding: 2rem;
    margin: 2rem auto;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
}

.error-message h2 {
    color: #d32f2f;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #0277bd;
    color: white;
    text-decoration: none;
    border-radius: 0.25rem;
    margin-top: 1rem;
    font-family: 'Inter', 'Roboto', sans-serif;
}

.btn:hover {
    background-color: #01579b;
}

/* Improve readability and line height for main text */
.main-content p, 
.main-content li {
    font-size: 1em;
    line-height: 1.7;
}

/* Improves the readability of code blocks */
pre code {
    line-height: 1.6;
}

/* Lead paragraph styling */
.lead {
    font-size: 1.1em;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5em;
}

/* Premium badge styling */
.premium-badge {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-left: 8px;
    vertical-align: middle;
}

/* Error code table styling for troubleshooting page */
.error-code-table {
    margin: 1.5em 0;
}

.error-code {
    display: flex;
    margin-bottom: 1.5em;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.error-code .code {
    flex: 0 0 180px;
    background-color: var(--code-bg);
    padding: 15px;
    font-family: 'Roboto Mono', Consolas, Monaco, monospace;
    font-weight: bold;
    border-right: 1px solid var(--border-color);
}

.error-code .description {
    flex: 1;
    padding: 15px;
}

.error-code .solution {
    margin-top: 0.8em;
    padding-top: 0.8em;
    border-top: 1px dashed var(--border-color);
}

/* Step-by-step troubleshooting styles */
.troubleshooting-steps {
    margin: 1.5em 0;
}

.step {
    margin-bottom: 1.5em;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.step-title {
    background-color: var(--bg-secondary);
    padding: 12px 15px;
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.step-content {
    padding: 15px;
}

/* Target element highlighting for better anchor visibility */
:target {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/* For the temporary highlight effect */
.highlight-target {
    scroll-margin-top: calc(var(--header-height) + 20px);
}

/* Add this to your :root CSS variables */
:root {
    --accent-rgb: 3, 102, 214; /* Example - use the RGB values of your accent color */
}

/* Footer styling - properly centered */
.site-footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    color: var(--text-secondary);
    margin-top: 50px;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 0 20px;
}

.footer-content p {
    margin: 5px 0;
    font-size: 0.9rem;
    text-align: center;
}

/* Mobile responsive footer */
@media (max-width: 768px) {
    .site-footer {
        margin-left: 0;
    }
}