:root {
    /* New Color Palette */
    --primary-color: #4361ee;
    --primary-light: #eef2ff;
    --secondary-color: #3f37c9;
    --accent-color: #4895ef;
    --success-color: #4cc9f0;
    --error-color: #f72585;
    --warning-color: #f8961e;
    --dark-color: #1a1a2e;
    --light-color: #f8f9fa;
    
    /* Text Colors */
    --text-primary: #2b2d42;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;
    
    /* UI Elements */
    --border-color: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --box-shadow-hover: 0 10px 15px rgba(0, 0, 0, 0.1);
    --sidebar-width: 300px;
    --header-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
}

/* Modern Font Stack */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: #f5f7fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Improved Documentation Container */
.docs-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Modern Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    color: var(--text-primary);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform var(--transition-normal);
    z-index: 1000;
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03);
}

.sidebar-header {
    padding: 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header h2 svg {
    width: 24px;
    height: 24px;
}

.sidebar-menu {
    padding: 1.5rem 0;
}

.sidebar-menu h3 {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-top: 0.5rem;
}

.sidebar-menu ul {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    gap: 10px;
}

.sidebar-menu li a svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.sidebar-menu li a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-menu li a:hover svg {
    opacity: 1;
}

.sidebar-menu li a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-menu li a.active:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color);
}

.sidebar-menu li a.active svg {
    opacity: 1;
}

/* Main Content Area */
.main-content,
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    max-width: 100%;
    overflow: hidden;
    background-color: #f5f7fa;
}

.content-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.content-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 800px;
}

.content-body {
    max-width: 900px;
}

/* Modern Section Styling */
.section {
    margin-bottom: 3rem;
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    word-wrap: break-word;
    overflow-wrap: break-word;
    border: 1px solid var(--border-color);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

.section h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section h2:before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--primary-color);
    border-radius: 3px;
}

.section h3 {
    font-size: 1.4rem;
    margin: 2rem 0 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    position: relative;
    padding-left: 16px;
}

.section h3:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 50%;
}

.section p {
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.7;
}

.section p + h3 {
    margin-top: 2.5rem;
}

/* Enhanced Code Blocks */
.code-block {
    position: relative;
    background: #1e293b;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    margin: 1.5rem 0;
    font-family: 'JetBrains Mono', monospace;
    overflow-x: auto;
    border: 1px solid #334155;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.code-block.base-url-block {
    min-height: 60px;
    display: flex;
    align-items: center;
    background-color: #1e293b;
    color: #f8fafc;
}

.code-block pre {
    padding: 0;
    overflow-x: auto;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre;
    margin: 0;
}

.code-block .base-url {
    color: #f8fafc;
    padding: 0 16px;
    font-size: 1rem;
}

.code-block .copy-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
}

.code-block .copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.code-block .copy-btn svg {
    width: 14px;
    height: 14px;
}

/* Modern Alert Boxes */
.note,
.warning,
.notice {
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
}

.note {
    background: #f0f7ff;
    border-color: var(--primary-color);
    color: #1a56a8;
}

.note:before {
    content: 'ℹ️';
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    font-size: 1.2rem;
}

.warning {
    background: #fff8e6;
    border-color: var(--warning-color);
    color: #8a4a00;
}

.warning:before {
    content: '⚠️';
    position: absolute;
    left: 1rem;
    top: 1.25rem;
    font-size: 1.2rem;
}

.notice {
    background: #f5f5f5;
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.notice p {
    margin-bottom: 0;
    color: inherit;
}

.notice code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: inherit;
}

/* Steps Component */
.steps {
    counter-reset: step-counter;
    margin: 2rem 0;
    padding-left: 2rem;
}

.step {
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 2rem;
    counter-increment: step-counter;
}

.step:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.step h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.step p {
    color: var(--text-primary);
}

/* Image Container */
.img-container {
    margin: 2rem 0;
    text-align: center;
}

.img-container img {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.caption {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
    font-style: italic;
}

/* Modern Tabs */
.code-tabs {
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    overflow-x: auto;
    background: #f1f3f5;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-weight: 500;
    position: relative;
    border-radius: 6px 6px 0 0;
    margin-right: 4px;
}

.tab-btn.active {
    color: var(--primary-color);
    background: white;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn:not(.active):hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.7);
}

.tab-content {
    display: none;
    background: white;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    border: 1px solid var(--border-color);
    border-top: none;
}

.tab-content.active {
    display: block;
}

/* API Endpoint Styles */
.endpoint {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    flex-wrap: wrap;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.method {
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 1rem;
    color: white;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 80px;
    text-align: center;
}

.method.get {
    background-color: #10b981;
}

.method.post {
    background-color: var(--primary-color);
}

.method.put {
    background-color: #f59e0b;
}

.method.delete {
    background-color: #ef4444;
}

.path {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    word-break: break-all;
    color: var(--text-primary);
    font-weight: 500;
}

/* Modern Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    background: white;
    box-shadow: var(--box-shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    min-width: 600px;
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
    vertical-align: top;
}

th {
    background-color: var(--light-color);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f8fafc;
}

/* Contact Cards */
.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.contact-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.75rem;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: flex-start;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border-top: 4px solid var(--primary-color);
    border: 1px solid var(--border-color);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.contact-card.whatsapp {
    border-top-color: #25D366;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    flex-shrink: 0;
    color: white;
    font-size: 1.25rem;
}

.contact-card.whatsapp .contact-icon {
    background: #25D366;
}

.contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.contact-info p {
    margin: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.contact-info a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.contact-card.whatsapp .contact-info a {
    color: #25D366;
}

.contact-card.whatsapp .contact-info a:hover {
    color: #1da851;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
    transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

/* Syntax Highlighting */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #7f8c9a;
}

.token.punctuation {
    color: #cbd5e1;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #7dd3fc;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #86efac;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #cbd5e1;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #93c5fd;
}

.token.function,
.token.class-name {
    color: #fde68a;
}

.token.regex,
.token.important,
.token.variable {
    color: #fca5a5;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .section {
        padding: 1.75rem;
    }
    
    .contact-methods {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 992px) {
    .content-header h1 {
        font-size: 2rem;
    }
    
    .section h2 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .main-content,
    .content {
        margin-left: 0;
        padding: 1.5rem;
        padding-top: 5.5rem;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .section {
        padding: 1.5rem;
    }
    
    .contact-methods {
        grid-template-columns: 1fr;
    }
    
    table {
        min-width: 100%;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .content-header h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .main-content,
    .content {
        padding: 1.25rem;
        padding-top: 5rem;
    }
    
    .section {
        padding: 1.25rem;
    }
    
    .contact-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-icon {
        margin-bottom: 1rem;
    }
    
    .endpoint {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .method {
        margin-right: 0;
    }
    
    .content-header h1 {
        font-size: 1.6rem;
    }
    
    .section h2 {
        font-size: 1.4rem;
    }
    
    .code-block pre {
        font-size: 0.85rem;
    }
}