/* Fix cursor visibility in CodeMirror */
.CodeMirror-cursor {
    border-left: 2px solid var(--accent-color) !important;
    border-right: none !important;
    width: 0 !important;
}

.CodeMirror-selected {
    background-color: rgba(0, 255, 65, 0.2) !important;
}

.CodeMirror-line {
    color: var(--text-primary) !important;
}

/* Fix card::before blocking clicks */
.card::before {
    pointer-events: none !important;
}

/* Better code blocks - thinner border */
.article-content pre {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Better list formatting in articles */
.article-content ol,
.article-content ul {
    margin: clamp(24px, 5vw, 32px) 0 !important;
    padding-left: clamp(24px, 5vw, 40px) !important;
}

.article-content ol li,
.article-content ul li {
    margin-bottom: 16px !important;
    list-style-position: outside !important;
    line-height: 1.8 !important;
}

.article-content ol {
    list-style-type: decimal !important;
}

.article-content ul {
    list-style-type: disc !important;
}

.article-content ol li::marker {
    color: var(--accent-color) !important;
    font-weight: 700 !important;
}

.article-content ul li::marker {
    color: var(--accent-color) !important;
}

/* Nested lists */
.article-content ol ol,
.article-content ul ul,
.article-content ol ul,
.article-content ul ol {
    margin-top: 12px !important;
    margin-bottom: 12px !important;
}

/* Burger Menu Styles */
.burger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
    background-color: var(--accent-color);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
    background-color: var(--accent-color);
}

/* Auth Pages Styles */
.auth-container {
    min-height: calc(100vh - var(--nav-height) - 140px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(40px, 8vw, 80px) clamp(20px, 4vw, 40px);
}

.auth-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: clamp(40px, 8vw, 60px);
    max-width: 480px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
    display: block;
}

.auth-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'JetBrains Mono', monospace;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.05rem);
}

.auth-form {
    margin-bottom: 30px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper .form-control {
    padding-left: 48px;
}

.form-control-error {
    border-color: var(--danger) !important;
}

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 8px;
    font-family: 'JetBrains Mono', monospace;
}

.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--accent-color);
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.admin-link {
    color: var(--accent-color) !important;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        right: -100%;
        width: min(300px, 80vw);
        height: calc(100vh - var(--nav-height));
        background-color: var(--nav-bg);
        backdrop-filter: blur(20px) saturate(180%);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        border-left: 1px solid var(--border-color);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        padding: 0;
    }

    .nav-links a {
        display: block;
        padding: 16px 24px;
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links .nav-link::after {
        display: none;
    }

    .nav-links .btn-nav {
        margin: 12px 24px;
        width: calc(100% - 48px);
        text-align: center;
        border: 1px solid var(--accent-color);
    }

    .theme-toggle {
        margin: 12px 24px;
        width: calc(100% - 48px);
    }

    body.menu-open {
        overflow: hidden;
    }

    /* Overlay when menu is open */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.7);
        z-index: 999;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-links {
        gap: 16px;
    }
} 
 
/* Categories Page Styles */
.categories-page {
    min-height: calc(100vh - var(--nav-height) - 140px);
    padding: clamp(60px, 10vw, 100px) 0;
}

.page-header {
    text-align: center;
    margin-bottom: clamp(50px, 8vw, 80px);
}

.page-header h1 {
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 16px;
    font-family: 'JetBrains Mono', monospace;
}

.page-header p {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
    gap: clamp(24px, 4vw, 32px);
}

.category-card-modern {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: clamp(28px, 5vw, 36px);
    display: flex;
    align-items: center;
    gap: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.category-card-modern:hover::before {
    transform: scaleY(1);
}

.category-card-modern:hover {
    transform: translateX(8px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 255, 65, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--accent-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.category-card-modern:hover .category-icon {
    background: rgba(0, 255, 65, 0.2);
    transform: scale(1.1);
}

.category-content {
    flex: 1;
}

.category-content h3 {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
}

.category-count {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
}

.category-arrow {
    font-size: 1.25rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.category-card-modern:hover .category-arrow {
    color: var(--accent-color);
    transform: translateX(4px);
}

@media (max-width: 640px) {
    .category-card-modern {
        flex-direction: column;
        text-align: center;
    }
    
    .category-arrow {
        display: none;
    }
}
