* {
    font-family: 'Vazirmatn', sans-serif;
}

code,
pre,
.code-font {
    font-family: 'Fira Code', monospace !important;
    direction: ltr;
    text-align: left;
}

:root {
    --primary: #84cc16;
    --primary-dark: #65a30d;
    --secondary: #eab308;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
}

body {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 50%, #eab308 100%);
    background-attachment: fixed;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(101, 163, 13, 0.15);
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 8px 32px 0 rgba(132, 204, 22, 0.2);
    border: 1px solid rgba(132, 204, 22, 0.1);
}

.code-block {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.code-header {
    background: linear-gradient(90deg, #1a1a1a 0%, #0f0f0f 100%);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot-red {
    background: #ff5f56;
}

.dot-yellow {
    background: #ffbd2e;
}

.dot-green {
    background: #27c93f;
}

.copy-btn {
    background: rgba(132, 204, 22, 0.2);
    border: 1px solid rgba(132, 204, 22, 0.3);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: #a3e635;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.copy-btn:hover {
    background: rgba(132, 204, 22, 0.4);
    transform: translateY(-2px);
}

.sidebar {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.nav-link {
    display: block;
    padding: 0.6rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-right: 3px solid transparent;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.dark .nav-link {
    color: #94a3b8;
}

.nav-link:hover {
    color: var(--primary-dark);
    background: rgba(132, 204, 22, 0.08);
    border-right-color: var(--primary);
    transform: translateX(-4px);
}

.dark .nav-link:hover {
    color: #a3e635;
    background: rgba(132, 204, 22, 0.15);
}

.nav-link.active {
    color: var(--primary-dark);
    background: rgba(132, 204, 22, 0.12);
    border-right-color: var(--primary);
    font-weight: 600;
}

.dark .nav-link.active {
    color: #a3e635;
    background: rgba(132, 204, 22, 0.2);
}

.nav-link-child {
    padding-right: 2rem;
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.dark .badge-success {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.dark .badge-danger {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.dark .badge-warning {
    background: rgba(245, 158, 11, 0.25);
    color: #fbbf24;
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.dark .badge-info {
    background: rgba(59, 130, 246, 0.25);
    color: #60a5fa;
}

.api-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.dark .api-card {
    background: #0f172a;
    box-shadow: 0 4px 20px rgba(132, 204, 22, 0.1);
    border: 1px solid rgba(132, 204, 22, 0.1);
}

.api-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dark .api-card:hover {
    box-shadow: 0 8px 30px rgba(132, 204, 22, 0.15);
}

.endpoint-url {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 50%, #eab308 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    word-break: break-all;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .endpoint-url {
        font-size: 0.75rem;
        padding: 0.8rem 1rem;
        gap: 0.5rem;
    }
}

.method-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.method-post {
    background: rgba(16, 185, 129, 0.3);
    color: #ffffff;
}

.method-get {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

/* Responsive Tables */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    color: white;
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: white;
}

.dark td {
    background: #0f172a;
    border-bottom-color: rgba(132, 204, 22, 0.1);
    color: #e2e8f0;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(132, 204, 22, 0.05);
}

.dark tr:hover td {
    background: rgba(132, 204, 22, 0.15);
}

@media (max-width: 640px) {
    table {
        min-width: 500px;
    }

    th,
    td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}

.dark .tab-button {
    color: #94a3b8;
}

.tab-button:hover {
    color: var(--primary-dark);
}

.dark .tab-button:hover {
    color: #a3e635;
}

.tab-button.active {
    color: var(--primary-dark);
}

.dark .tab-button.active {
    color: #a3e635;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 3px 3px 0 0;
}

.hero-section {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 50%, #eab308 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '🍋';
    position: absolute;
    top: -20px;
    right: 10%;
    font-size: 150px;
    opacity: 0.15;
    transform: rotate(-15deg);
}

.hero-section::after {
    content: '🍋';
    position: absolute;
    bottom: -30px;
    left: 5%;
    font-size: 120px;
    opacity: 0.15;
    transform: rotate(25deg);
}

@media (max-width: 640px) {
    .hero-section {
        padding: 2rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.75rem !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }
}

.terminal-effect {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 1.5rem;
    color: #a3e635;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

@media (max-width: 640px) {
    .terminal-effect {
        font-size: 0.75rem;
        padding: 1rem;
    }
}

.terminal-prompt {
    color: #84cc16;
    user-select: none;
}

.blink {
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(132, 204, 22, 0.4);
    z-index: 1000;
}

.scroll-to-top.show {
    opacity: 1;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(132, 204, 22, 0.6);
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    display: flex;
    align-items: start;
    gap: 1rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-right: 4px solid #3b82f6;
    color: #1e40af;
}

.dark .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border-right-color: #60a5fa;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-right: 4px solid #f59e0b;
    color: #92400e;
}

.dark .alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border-right-color: #fbbf24;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-right: 4px solid #ef4444;
    color: #991b1b;
}

.dark .alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border-right-color: #f87171;
}

.image-lightbox {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.image-lightbox:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(132, 204, 22, 0.3);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 640px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.dark .feature-card {
    background: #0f172a;
    border-color: rgba(132, 204, 22, 0.1);
}

.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(132, 204, 22, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }
}

/* لینک های بلند */
.break-words {
    word-break: break-word;
    overflow-wrap: anywhere;
}

/* کد بلاک در موبایل */
@media (max-width: 640px) {
    .code-block pre {
        font-size: 0.7rem;
    }
}