/* ================================================
   E-Invoice API - Dark Mode Theme
   ================================================ */

/* ================================================
   Root Variables
   ================================================ */
:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1f2937;
    --bg-hover: #30363d;

    --text-primary: #e6edf3;
    --text-secondary: #9198a1;
    --text-muted: #6e7681;

    --border-color: #30363d;
    --border-hover: #484f58;

    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);

    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(180deg, #0d1117 0%, #161b22 100%);
}

/* ================================================
   Global Styles
   ================================================ */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

/* ================================================
   Typography
   ================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 600;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-light {
    color: var(--text-primary) !important;
}

code {
    background-color: var(--bg-tertiary);
    color: var(--info-color);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

pre {
    background-color: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

/* ================================================
   Navigation
   ================================================ */
.navbar {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    color: var(--text-primary) !important;
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-secondary) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

/* ================================================
   Hero Section
   ================================================ */
.hero-section {
    background: var(--gradient-hero) !important;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section .display-4 {
    color: var(--text-primary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .lead {
    color: var(--text-secondary);
}

.hero-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ================================================
   Badges
   ================================================ */
.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 0.375rem;
}


/* Modern Subtle Badges for Dark Mode */
.badge.bg-success {
    background-color: rgba(34, 197, 94, 0.15) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge.bg-info {
    background-color: rgba(6, 182, 212, 0.15) !important;
    color: #22d3ee !important;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.badge.bg-secondary {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color);
}

.badge.bg-primary {
    background-color: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ================================================
   Buttons
   ================================================ */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-outline-light {
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    background-color: transparent;
}

.btn-outline-light:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
}

/* ================================================
   Cards
   ================================================ */
.card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card.bg-secondary {
    background-color: var(--bg-secondary) !important;
}

.card.bg-dark {
    background-color: var(--bg-primary) !important;
}

.card-header {
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.card-text {
    color: var(--text-secondary);
}

/* ================================================
   Stats Section
   ================================================ */
#statsContainer .text-center {
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

#statsContainer .text-center:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

#statsContainer .h2 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

#statsContainer .text-primary {
    color: var(--primary-color) !important;
}

#statsContainer .text-success {
    color: var(--success-color) !important;
}

#statsContainer .text-info {
    color: var(--info-color) !important;
}

#statsContainer .text-warning {
    color: var(--warning-color) !important;
}

/* ================================================
   Alerts
   ================================================ */
.alert {
    border-radius: 0.75rem;
    border: 1px solid;
    padding: 1.25rem 1.5rem;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--text-primary);
}

.alert-warning .alert-heading {
    color: var(--warning-color);
}

.alert-heading {
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* ================================================
   Samples Container
   ================================================ */
#samplesContainer .card {
    height: 100%;
}

#samplesContainer .card-body {
    display: flex;
    flex-direction: column;
}

/* ================================================
   Test Result Section
   ================================================ */
#testResult .card {
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#resultContent {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary) !important;
}

/* ================================================
   Footer
   ================================================ */
footer {
    background-color: var(--bg-primary) !important;
    border-top: 1px solid var(--border-color) !important;
    color: var(--text-secondary);
}

footer code {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    color: var(--info-color);
}

/* ================================================
   Icons
   ================================================ */
.bi {
    vertical-align: middle;
}

.display-1 {
    font-size: 6rem;
}

.display-4 {
    font-size: 2.5rem;
}

.display-6 {
    font-size: 3rem;
}

/* ================================================
   Border Utilities
   ================================================ */
.border-secondary {
    border-color: var(--border-color) !important;
}

.border-warning {
    border-color: rgba(245, 158, 11, 0.3) !important;
}

/* ================================================
   Spacing Utilities
   ================================================ */
.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

/* ================================================
   Responsive Design
   ================================================ */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .hero-icon {
        margin-top: 2rem;
    }

    #statsContainer .h2 {
        font-size: 1.5rem;
    }

    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1rem;
    }

    .badge {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ================================================
   Scrollbar Styling
   ================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bg-hover);
}

/* ================================================
   Selection
   ================================================ */
::selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

::-moz-selection {
    background-color: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
}

/* ================================================
   Focus States
   ================================================ */
button:focus,
a:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ================================================
   Loading Animation (Optional)
   ================================================ */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s ease-in-out infinite;
}

/* ================================================
   Utility Classes
   ================================================ */
.bg-dark {
    background-color: var(--bg-primary) !important;
}

.bg-secondary {
    background-color: var(--bg-secondary) !important;
}

.bg-gradient {
    background: var(--gradient-hero) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* DeepSeek New CSS */

/* API Response Styling */
#testResult pre {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    background: #1a1d23;
    border: 1px solid #495057;
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Loading spinner */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Sample card hover effects */
.sample-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sample-card:hover {
    border-left-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
    transform: translateY(-2px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar for pre elements */
pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

pre::-webkit-scrollbar-track {
    background: #1a1d23;
}

pre::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 4px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* ================================================
   Premium Navbar Tabs
   ================================================ */
.navbar .nav-pills .nav-link {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    /* More horizontal padding */
    margin-right: 0.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.navbar .nav-pills .nav-link:hover {
    color: var(--text-primary) !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar .nav-pills .nav-link.active {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--primary-color) !important;
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

/* Active Indicator */
.navbar .nav-pills .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 -2px 5px var(--primary-color);
}

.navbar .nav-pills .nav-link i {
    font-size: 1.1em;
    margin-right: 0.5rem;
}

/* Specific adjustment for Navbar layout */
.navbar-collapse {
    flex-grow: 0;
}

.navbar-nav.nav-pills {
    margin-left: 1.5rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-color);
    height: 2rem;
    align-items: center;
}

/* ================================================
   Documentation Sidebar & Fixes
   ================================================ */

/* Fix Heading Overlap for Anchor Links */
/* Fix Heading Overlap for Anchor Links */
section[id^="doc-"] {
    scroll-margin-top: 160px;
    position: relative;
}

/* Sidebar Navigation Links */
#docs-nav .nav-link {
    color: var(--text-muted) !important;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
}

#docs-nav .nav-link:hover {
    color: var(--primary-color) !important;
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateX(5px);
}

/* Active State (The Blue Box) */
#docs-nav .nav-link.active {
    color: #fff !important;
    background-color: var(--primary-color) !important;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.5);
    transform: translateX(5px);
}