/* Light theme variables */
@media (prefers-color-scheme: light) {
    :root {
        --theme-color: #42b983;
        --base-background-color: #ffffff;
        --base-color: #34495e;
        --heading-color: #2c3e50;
        --sidebar-background: #f8f8f8;
        --sidebar-nav-link-color: #34495e;
        --code-theme-background: #f8f8f8;
        --code-inline-background: #f8f8f8;
    }
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --theme-color: #42b983;
        --base-background-color: #1a1a1a;
        --base-color: #ffffff;
        --heading-color: #ffffff;
        --sidebar-background: #242424;
        --sidebar-nav-link-color: #ffffff;
        --code-theme-background: #282c34;
        --code-inline-background: #282c34;
        --blockquote-background: #2f2f2f;
        --blockquote-border-color: var(--theme-color);
        --dark: #f8f9fa;
        --light: #1a1a1a;
        --gray: #242424;
    }
}

/* Hide the name completely and improve logo centering */
.sidebar-name .app-name {
    text-indent: -9999px; /* Push text off-screen */
    font-size: 0 !important; /* Zero font size */
    letter-spacing: -1em; /* Collapse letter spacing */
    opacity: 0; /* Make text transparent */
}

.sidebar-name .app-name-link {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0 !important; /* Hide text by making it zero size */
}

/* This targets specifically the text inside the link */
.app-name-link span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    font-size: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.app-name-link::before {
    content: "";
    display: block;
    height: 40px;
    width: 160px;
    background-image: url('../images/sentor-light.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .app-name-link::before {
        background-image: url('../images/sentor-dark.svg');
    }
}

/* Hide any potential text or images */
.app-name-link > * {
    display: none !important;
}

@media (prefers-color-scheme: dark) {
    .app-name-link::before {
        background-image: url('../images/sentor-dark.svg');
    }
}

/* Common styles */
:root {
    --sidebar-width: 300px;
    --content-max-width: 950px;
    --heading-h1-font-weight: 600;
    --heading-h2-font-weight: 500;
    --code-font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace;
    /* Brand Colors */
    --theme-color: #3eaf7c;
    --accent-color: #42b983;
    --text-color-base: var(--base-color);

    /* Typography */
    --base-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

    /* Transitions */
    --duration-fast: 0.15s;
    --duration-medium: 0.3s;
    --duration-slow: 0.5s;
    --primary: #3eaf7c;
    --secondary: #42b983;
    --dark: #2c3e50;
    --light: #ffffff;
    --gray: #f8f9fa;
    --transition: all 0.3s ease;

    /* Light theme */
    --light-bg: #ffffff;
    --light-text: #2c3e50;
    --light-heading: #34495e;
    --light-link: #0366d6;
    --light-code-bg: #f6f8fa;
    --light-border: #eaecef;
    --light-blockquote: #819198;

    /* Dark theme */
    --dark-bg: #1a1a1a;
    --dark-text: #e4e4e4;
    --dark-heading: #ffffff;
    --dark-link: #58a6ff;
    --dark-code-bg: #2d2d2d;
    --dark-border: #424242;
    --dark-blockquote: #9e9e9e;
}

/* Layout and components */
* {
    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: var(--light-text);
    background-color: var(--light-bg);
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    background: var(--gray);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing {
    background: var(--gray);
    padding: 3rem;
    border-radius: 20px;
    margin: 4rem 0;
}

.pricing h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    background: var(--light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.price {
    font-size: 2.5rem;
    color: var(--primary);
    margin: 1rem 0;
}

.pricing-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.pricing-card li {
    margin: 0.5rem 0;
    color: var(--dark);
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    transition: var(--transition);
    font-weight: 500;
}

.cta-button:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(62, 175, 124, 0.3);
}

.footer {
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.footer p {
    margin: 0.5rem 0;
}

.footer .cta-button {
    margin: 0 0.5rem;
}

.app-name-link img {
    width: 150px;
    transition: transform 0.3s ease;
}

.app-name-link img:hover {
    transform: scale(1.05);
}

.sidebar-nav>ul>li>a {
    font-weight: bold;
    font-size: 1.1em;
    padding: 6px 0;
}

.markdown-section code {
    border-radius: 4px;
}

.markdown-section pre {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.copy-code-button {
    border-radius: 4px !important;
}

/* Theme transitions */
body {
    transition: background-color var(--duration-slow);
}

/* Footer */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid var(--sidebar-border-color);
    margin-top: 4rem;
    opacity: 0.8;
}

.footer p {
    margin: 0.5rem 0;
}

.footer a {
    color: var(--theme-color);
    text-decoration: none;
    transition: opacity var(--duration-fast);
}

.footer a:hover {
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Layout improvements */
.markdown-section {
    animation: fadeIn var(--duration-medium);
}

.sidebar-nav li {
    transition: all var(--duration-fast);
}

.sidebar-nav li:hover {
    transform: translateX(4px);
}

/* Dark theme */
@media (prefers-color-scheme: dark) {
    body {
        color: var(--dark-text);
        background-color: var(--dark-bg);
    }

    .markdown-section {
        color: var(--dark-text);
    }

    .markdown-section h1,
    .markdown-section h2,
    .markdown-section h3,
    .markdown-section h4,
    .markdown-section h5,
    .markdown-section h6 {
        color: var(--dark-heading);
    }

    .markdown-section code {
        background-color: var(--dark-code-bg);
        color: var(--dark-text);
    }

    .markdown-section pre {
        background-color: var(--dark-code-bg);
    }

    .markdown-section blockquote {
        border-left-color: var(--dark-border);
        color: var(--dark-blockquote);
    }

    .markdown-section strong {
        color: var(--dark-heading);
    }

    .markdown-section a {
        color: var(--dark-link);
    }

    .markdown-section hr {
        border-bottom-color: var(--dark-border);
    }

    .markdown-section table {
        border-color: var(--dark-border);
    }

    .markdown-section tr:nth-child(2n) {
        background-color: var(--dark-code-bg);
    }

    .markdown-section td,
    .markdown-section th {
        border-color: var(--dark-border);
    }
}

/* Content styling */
.markdown-section {
    padding: 2rem;
    max-width: 80ch;
    margin: 0 auto;
}

.markdown-section code,
.markdown-section pre {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    border-radius: 3px;
    padding: 0.2em 0.4em;
}

.markdown-section pre>code {
    padding: 1em;
    display: block;
    overflow-x: auto;
}

/* Smooth theme transitions */
body,
.markdown-section,
.markdown-section *,
.sidebar,
.sidebar * {
    transition: background-color 0.3s ease, color 0.3s ease;
}

:root {
    /* Colors */
    --primary: #5A5891;
    --primary-hover: #4a487a;
    --highlight: #EDA305;
    --accent-1: #78ADFB;
    --accent-2: #B7D2FB;

    /* Theme Colors - Light */
    --bg-color: #ffffff;
    --text-color: #2D2D2D;
    --card-bg: #f8f9fa;
    --code-bg: #f6f8fa;
    --blockquote-color: #6c757d;
    --sidebar-border: rgba(0, 0, 0, 0.07);
    
    /* Layout */
    --sidebar-width: 300px;
    --content-max-width: 950px;
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #0d1117;
        --text-color: #e6e6e6;
        --card-bg: #161b22;
        --code-bg: #1e242e;
        --blockquote-color: #9e9e9e;
        --sidebar-border: rgba(255, 255, 255, 0.07);
    }
}

/* Sidebar logo handling - as backup to the JS solution */
.app-name-link {
    display: flex;
    justify-content: center;
}

.app-name-link img {
    max-height: 40px;
    width: auto;
}

/* In case JS fails, hide any text in app name */
.app-name-link span {
    font-size: 0;
    visibility: hidden;
    display: none;
}

/* Section styling */
.markdown-section {
    color: var(--text-color);
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
    color: var(--primary);
    font-weight: 600;
}

.markdown-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.markdown-section h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--sidebar-border);
    padding-bottom: 0.5rem;
}

.markdown-section a {
    color: var(--accent-1);
    text-decoration: none;
}

.markdown-section a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Code styling */
.markdown-section pre {
    background-color: var(--code-bg);
    border-radius: 6px;
}

.markdown-section code {
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}

.markdown-section pre > code {
    padding: 1em;
}

/* Tables */
.markdown-section table {
    border-collapse: collapse;
    width: 100%;
    display: table;
    margin: 1em 0;
}

.markdown-section tr:nth-child(2n) {
    background-color: var(--card-bg);
}

.markdown-section th,
.markdown-section td {
    padding: 0.6em 1em;
    border: 1px solid var(--sidebar-border);
}

/* Blockquotes */
.markdown-section blockquote {
    border-left: 4px solid var(--accent-1);
    color: var(--blockquote-color);
    padding-left: 1.5rem;
    margin: 1rem 0;
}

/* Footer styling */
.footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sidebar-border);
    color: var(--blockquote-color);
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent-1);
}

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

/* Alerts and notices */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.alert.tip {
    background-color: rgba(120, 173, 251, 0.1);
    border-left: 4px solid var(--accent-1);
}

.alert.warning {
    background-color: rgba(237, 163, 5, 0.1);
    border-left: 4px solid var(--highlight);
}

/* Copy code button */
.docsify-copy-code-button {
    background-color: var(--primary) !important;
}

/* Pagination */
.pagination-item-label {
    color: var(--accent-1);
}

.pagination-item-title {
    color: var(--primary);
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .markdown-section {
        padding: 1rem;
    }
}

/* Colors */
:root {
    /* Brand colors */
    --primary: #5A5891;
    --primary-hover: #4a487a;
    --highlight: #EDA305;
    --accent-1: #78ADFB;
    --accent-2: #B7D2FB;

    /* Theme Colors - Light */
    --theme-color: var(--primary);
    --bg-color: #ffffff;
    --text-color: #2D2D2D;
    --card-bg: #f8f9fa;
    --code-bg: #f6f8fa;
    --blockquote-color: #6c757d;
    --sidebar-border: rgba(0, 0, 0, 0.07);
    
    /* Layout */
    --sidebar-width: 300px;
    --content-max-width: 950px;
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #C4C0FF; /* Updated to #C4C0FF for dark mode */
        --primary-hover: #a7a3e0;
        --bg-color: #0d1117;
        --text-color: #e6e6e6;
        --card-bg: #161b22;
        --code-bg: #1e242e;
        --blockquote-color: #9e9e9e;
        --sidebar-border: rgba(255, 255, 255, 0.07);
        --theme-color: var(--primary);
    }
}

/* Fix logo issue - more direct and specific approach */
.app-name-link {
    display: flex;
    justify-content: center;
}

/* Completely remove text in app name */
.sidebar-name .app-name {
    font-size: 0 !important;
    visibility: hidden !important;
    overflow: hidden;
}

/* Clear logo and use background image instead */
.app-name-link {
    width: 160px;
    height: 40px;
    background-image: url('../images/sentor-light.svg');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0 auto;
}

@media (prefers-color-scheme: dark) {
    .app-name-link {
        background-image: url('../images/sentor-dark.svg');
    }
}

/* Override all sidebar colors to remove green */
.sidebar {
    color: var(--text-color);
    background-color: var(--bg-color);
}

.sidebar-toggle {
    background-color: transparent;
    width: 36px;
    border: 0;
    outline: none;
    padding: 10px;
    position: absolute;
    bottom: 0;
    right: 0;
    text-align: center;
    z-index: 30;
    cursor: pointer;
}

.sidebar-toggle span {
    background-color: var(--primary);
}

/* Navigation */
.sidebar ul li a {
    color: var(--text-color);
    font-size: 14px;
    font-weight: normal;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar ul li.active > a {
    color: var(--primary);
    font-weight: bold;
}

.sidebar ul li a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Section styling */
.markdown-section {
    color: var(--text-color);
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
    color: var(--primary);
    font-weight: 600;
}

.markdown-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.markdown-section h2 {
    font-size: 2rem;
    border-bottom: 1px solid var(--sidebar-border);
    padding-bottom: 0.5rem;
}

.markdown-section a {
    color: var(--accent-1);
    text-decoration: none;
}

.markdown-section a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Code styling */
.markdown-section pre {
    background-color: var(--code-bg);
    border-radius: 6px;
}

.markdown-section code {
    background-color: var(--code-bg);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
}

.markdown-section pre > code {
    padding: 1em;
}

/* Tables */
.markdown-section table {
    border-collapse: collapse;
    width: 100%;
    display: table;
    margin: 1em 0;
}

.markdown-section tr:nth-child(2n) {
    background-color: var(--card-bg);
}

.markdown-section th,
.markdown-section td {
    padding: 0.6em 1em;
    border: 1px solid var(--sidebar-border);
}

/* Blockquotes */
.markdown-section blockquote {
    border-left: 4px solid var(--accent-1);
    color: var(--blockquote-color);
    padding-left: 1.5rem;
    margin: 1rem 0;
}

/* Footer styling */
.footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--sidebar-border);
    color: var(--blockquote-color);
    font-size: 0.9rem;
}

.footer a {
    color: var(--accent-1);
}

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

/* Alerts and notices */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.alert.tip {
    background-color: rgba(120, 173, 251, 0.1);
    border-left: 4px solid var(--accent-1);
}

.alert.warning {
    background-color: rgba(237, 163, 5, 0.1);
    border-left: 4px solid var(--highlight);
}

/* Copy code button */
.docsify-copy-code-button {
    background-color: var(--primary) !important;
}

/* Pagination */
.pagination-item-label {
    color: var(--accent-1);
}

.pagination-item-title {
    color: var(--primary);
}

/* Search box */
.search input {
    border-color: var(--sidebar-border);
    background-color: var(--bg-color);
    color: var(--text-color);
}

.search input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(90, 88, 145, 0.3);
}

/* Search results */
.search .results-panel {
    background-color: var(--bg-color);
}

.search .matching-post {
    border-bottom: 1px solid var(--sidebar-border);
}

/* Media queries for responsiveness */
@media screen and (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .markdown-section {
        padding: 1rem;
    }
}

/* Override any theme color variables */
:root {
    --theme-color: var(--primary) !important;
    --docsify-example-panels-document-width: 100%;
}

/* Fix for docsify-themeable colors */
a {
    color: var(--primary);
}

.anchor span {
    color: var(--primary);
}

.sidebar-nav li.active > a {
    color: var(--primary);
}

.cover-main .anchor span {
    color: var(--primary);
}

section.cover .cover-main > p:last-child a {
    border-color: var(--primary);
    color: var(--primary);
}

section.cover .cover-main > p:last-child a:last-child {
    background-color: var(--primary);
}

/* Hide the name text completely */
.app-name-link span {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    font-size: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Ensure logo shows at proper size */
.app-name img {
    max-height: 40px;
    width: auto;
    display: block !important;
}

/* Set min height to prevent layout shifts */
.sidebar-name {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Brand colors */
:root {
    --theme-color: #5A5891;
    --accent-color: #78ADFB;
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
    :root {
        --theme-color: #C4C0FF;
        --accent-color: #B7D2FB;
    }
}

/* Brand Colors */
:root {
  --primary: #5A5891;
  --primary-hover: #4a487a;
  --highlight: #EDA305;
  --accent-1: #78ADFB;
  --accent-2: #B7D2FB;
  
  /* Theme overrides */
  --theme-color: var(--primary);
}

/* Dark theme colors */
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #C4C0FF;
    --primary-hover: #a7a3e0;
    --theme-color: var(--primary);
  }
}

/* Logo styling - completely clear and reset the app name */
.sidebar-name {
  position: relative;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

/* Hide any text in the name */
.app-name {
  font-size: 0 !important;
}

/* Target the logo element directly */
.app-name-link {
  font-size: 0 !important;
  display: block !important;
  width: 160px !important;
  height: 40px !important;
  background-image: url('../images/sentor-light.svg') !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}

@media (prefers-color-scheme: dark) {
  .app-name-link {
    background-image: url('../images/sentor-dark.svg') !important;
  }
}

/* Aggressively hide any children inside app-name-link */
.app-name-link * {
  display: none !important;
}

/* Sidebar colors */
.sidebar {
  background-color: var(--bg-color);
}

/* Fix active link colors */
.sidebar-nav li.active > a {
  color: var(--primary) !important;
}

/* Fix heading colors in content */
.markdown-section h1, 
.markdown-section h2, 
.markdown-section h3, 
.markdown-section h4 {
  color: var(--primary) !important;
}

/* Fix link colors */
.markdown-section a {
  color: var(--accent-1) !important;
}

.markdown-section a:hover {
  color: var(--primary) !important;
}