:root {
    --primary-color: #007daa;
    --secondary-color: #21abc4;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#mode {
    position: sticky;
    top: 0;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

/* LEFT */
.nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-img {
    height: 36px;
}

.brand-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--sms-primary);
    white-space: nowrap;
}

/* RIGHT */
.nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-icon {
    font-size: 18px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-icon:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.nav-version {
    font-size: 14px;
    color: var(--text-secondary);
}

#mode a svg {
    width: 24px;
    height: 24px;
    color: var(--primary-color);
    transition: color 0.3s;
}

#mode a:hover svg {
    color: var(--secondary-color);
}

.dark svg,
.light svg {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.dark:hover svg,
.light:hover svg {
    color: var(--secondary-color);
    transform: scale(1.1);
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
}

.main-wrapper {
    display: flex;
    gap: 32px;
    padding: 32px 16px;
}

.content-section {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
}

.content-section p,
.content-section h3 {
    padding: 0;
}

.content-section h3,
h4 {
    color: var(--text-primary);
}

.content-section .content-section-head h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 0;
    margin: 0;
    line-height: 1.2;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 20px;
}

.docs-sidebar {
    width: 280px;
    position: sticky;
    top: 96px;
    height: fit-content;
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
    order: -1;
    padding-bottom: 0;
}

.docs-sidebar h5 {
    color: var(--text-primary);
    font-size: 15.2px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.docs-sidebar .nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.docs-sidebar .nav li {
    margin-bottom: 8px;
}

.docs-sidebar .nav li a {
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 14px;
}

.docs-sidebar .nav li a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
    transform: translateX(3px);
}

.docs-sidebar .nav li a:focus {
    background: none;
}

.docs-sidebar .nav li.active a,
.docs-sidebar .nav li a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}


.docs-heading {
    text-align: center;
    margin-bottom: 48px;
}

.big-title h1 {
    font-size: 40px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.big-title p {
    color: var(--text-secondary);
    font-size: 16px;
}

hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 32px 0;
}

.content-section h2 {
    font-size: 28.8px;
    font-weight: 600;
    margin-top: 50px;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
}

.intro {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
    line-height: 1.8;
}

.intro2 {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.intro2 p {
    margin: 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.intro2 i {
    color: #f59e0b;
    margin-top: 4px;
}

.intro p {
    margin-bottom: 16px;
}

.intro ul,
.intro ol {
    margin: 16px 0 16px 24px;
}

.intro li {
    margin-bottom: 8px;
}

.section {
    margin-bottom: 48px;
}

.mb-2 {
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 992px) {
    .main-wrapper {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        position: static;
        order: 0;
    }

    .big-title h1 {
        font-size: 32px;
    }



    .content-section {
        padding: 24px;
    }
}

@media (max-width: 768px) {


    .main-wrapper {
        padding: 16px 8px;
    }

    .big-title h1 {
        font-size: 24px;
    }
}



.intro-text {
    font-size: 16.8px;
    color: var(--text-secondary);
    line-height: 28.8px;
    padding-bottom: 0;
}

.table-wrapper {
    overflow-x: auto;
    margin: 32px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

thead th {
    color: white;
    font-weight: 600;
    padding: 16px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--bg-light);
}

tbody td {
    padding: 16px;
    vertical-align: top;
}

tbody td:first-child {
    font-weight: 600;
    color: var(--primary-color);
}

.tab-buttons {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border-color);
    margin: 0 0 24px;
}


.tab-btn {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    position: relative;
    transition: all 0.25s ease;
}


.tab-btn:hover {
    color: var(--primary-color);
}


.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: white;
}


.tab-content {
    display: none;
    padding-top: 16px;
}

.tab-content h4,
.tab-content h3 {
    padding: 0;
}

.tab-content p {
    padding: 0;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

.code-block {
    position: relative;
    margin: 24px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.code-header {
    background: #2d3748;
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6.4px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13.6px;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    background: #10b981;
    border-color: #10b981;
}

pre {
    margin: 0;
    background: #1e293b !important;
    padding: 24px !important;
    overflow-x: auto;
}

pre[class*=language-] {
    margin: 0;
    border-top: none;
    border-radius: 0;
}

code {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14.4px;
    background: none;
}

code[class*=language-],
pre[class*=language-] {
    text-shadow: none;
    color: #fff;
    border: none;
}

.code-block .token.operator {
    background: none;
}

.note-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.note-box strong {
    color: #f59e0b;
}

.info-box {
    background: #dbeafe;
    border-left: 4px solid var(--primary-color);
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 8px 8px 0;
}

.copy-url-btn {
    padding: 6.4px 12.8px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-url-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@media (max-width: 992px) {

    .sidebar {
        width: 100%;
        position: static;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }
}


.code-block {
    position: relative;
}

.copy-btn.inside {
    position: absolute;
    top: 50%;
    right: 16px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #fff;
    font-size: 13.6px;
    transition: all 0.2s;
    transform: translateY(-50%);
}


.copy-btn.inside i {
    pointer-events: none;
}







/* Dark Mode */
body.dark-mode {
    --primary-color: #3b82f6;
    --secondary-color: #60a5fa;
    --bg-light: #1e293b;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;

    background: #0f172a;
    color: #f1f5f9;
}


body.dark-mode #mode {
    background: #1e293b;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.dark-mode .content-section {
    background: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .docs-sidebar {
    background: #1e293b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .brand-text {
    color: #f1f5f9;
}

body.dark-mode .nav-icon {
    color: #60a5fa;
}

body.dark-mode .nav-icon:hover {
    color: #93c5fd;
}

body.dark-mode .content-section .content-section-head h1 {
    color: #60a5fa;
    border-color: #60a5fa;
}

body.dark-mode strong, body.dark-mode u{
    color:#60a5fa;
}
body.dark-mode .docs-sidebar h5 {
    color: #f1f5f9;
}

body.dark-mode .docs-sidebar .nav li a {
    color: #cbd5e1;
}

body.dark-mode .docs-sidebar .nav li a:hover {
    background: #334155;
    color: #60a5fa;
}

body.dark-mode .docs-sidebar .nav li.active a,
body.dark-mode .docs-sidebar .nav li a.active {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    color: white;
}

body.dark-mode .content-section h2 {
    color: #f1f5f9;
}

body.dark-mode .intro {
    background: #334155;
}

body.dark-mode .intro2 {
    background: #451a03;
    border-color: #f59e0b;
}

body.dark-mode table {
    background: #1e293b;
}

body.dark-mode tbody tr {
    border-color: #334155;
}

body.dark-mode tbody tr:hover {
    background: #334155;
}

body.dark-mode .tab-buttons {
    border-color: #334155;
}

body.dark-mode .tab-btn {
    color: #cbd5e1;
}

body.dark-mode .tab-btn:hover {
    color: #60a5fa;
}

body.dark-mode .tab-btn.active {
    color: #60a5fa;
    border-bottom-color: #60a5fa;
    background: #1e293b;
}

body.dark-mode .code-header {
    background: #0f172a;
}

body.dark-mode pre {
    background: #0f172a !important;
}

body.dark-mode .note-box {
    background: #451a03;
}

body.dark-mode .info-box {
    background: #1e3a8a;
    border-color: #60a5fa;
}

body.dark-mode .copy-url-btn {
    background: #334155;
    border-color: #475569;
    color: #cbd5e1;
}

body.dark-mode .copy-url-btn:hover {
    background: #60a5fa;
    color: white;
    border-color: #60a5fa;
}


body.dark-mode .error-category-wrapper {
    background: #1e293b;
}

body.dark-mode .error-category-header {
    border-color: #60a5fa;
}

body.dark-mode .error-category-header:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: #93c5fd;
}

body.dark-mode .error-category-header h3 {
    color: #f1f5f9;
}

body.dark-mode .error-category-header h3 i {
    color: #60a5fa;
}

body.dark-mode .toggle-icon {
    color: #60a5fa;
}

body.dark-mode .error-card {
    background: #334155;
    border-color: #60a5fa;
}

body.dark-mode .error-title {
    color: #f1f5f9;
}

body.dark-mode .error-message {
    background: #1e293b;
    color: #cbd5e1;
}

body.dark-mode .error-reason {
    color: #94a3b8;
}

body.dark-mode .error-reason i {
    color: #60a5fa;
}

body.dark-mode .error-subcategory {
    color: #60a5fa;
    border-color: #334155;
}


body.dark-mode thead {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

body.dark-mode tbody td:first-child {
    color: #60a5fa;
}


body.dark-mode .nav-version {
    color: #94a3b8;
}


body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

#mode,
.content-section,
.docs-sidebar,
.error-category-wrapper,
.error-card,
.tab-btn,
.intro,
.intro2 {
    transition: all 0.3s ease;
}





.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    color: var(--primary-color);
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}


.sidebar-close {
    display: none;
    position: absolute;
    top: 12px;
    left: 10px;
    background: transparent;
    border: none;
    font-size: 18px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 5px;
    z-index: 1002;
}


.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
}


@media (max-width: 1200px) {

    .hamburger-menu {
        display: flex;
    }


    .sidebar-close {
        display: block;
    }

    .mobile-sidebar-overlay {
        display: block;
    }


    .docs-sidebar {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        z-index: 1000;
        overflow-y: auto;
        padding: 60px 24px 24px;
        transition: left 0.3s ease;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
        border-radius: 0;
    }

    .docs-sidebar.active {
        right: 0;
    }


    body.sidebar-open {
        overflow: hidden;
    }

    .main-wrapper {
        flex-direction: column;
    }


    .docs-sidebar .nav li a {
        padding: 10px 12px;
    }
}


/* dark mode */

body.dark-mode .hamburger-menu span {
    background: #60a5fa;
}

body.dark-mode .sidebar-close {
    color: #f1f5f9;
}

body.dark-mode .mobile-sidebar-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .docs-sidebar {
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.5);
}



@media (max-width: 768px) {
    .docs-sidebar {
        width: 280px;
    }

    .nav-left .brand-text {
        display: none;
    }

    .nav-right {
        gap: 12px;
    }

    pre[class*=language-] {
        padding-top: 38px !important;
    }


    .copy-btn.copy-btn.inside {
        top: 20px;
        right: 20px;
    }

    .copy-btn.inside span,
    .copy-btn span,
    .copy-btn.copied span {
        display: none;
    }

    .copy-btn,
    .copy-btn.inside {
        padding: 2.4px 8px;
        font-size: 12px;
    }
}



@media (max-width: 480px) {
    .docs-sidebar {
        width: 260px;
    }

    .nav-version {
        display: none;
    }
}