/* ==================== DOCS PAGE ==================== */
:root {
    --docs-accent: #c084fc;
    --docs-accent-strong: #a855f7;
    --docs-accent-2: #6366f1;
    --docs-glow-rgb: 132, 0, 255;
    --docs-surface: #0e0e0e;
    --docs-border: rgba(192, 132, 252, 0.35);
    --docs-text: #fff;
}

.developer-docs-section {
    background: var(--docs-surface);
    padding: 50px 20px 90px;
}

.docs-back-btn-container {
    max-width: 1200px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.docs-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: #0b0714;
    border: 1px solid rgba(192, 132, 252, 0.5);
    border-radius: 18px;
    color: var(--docs-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.docs-back-btn::before,
.docs-back-btn::after {
    content: '';
    position: absolute;
    width: 280%;
    height: 48%;
    border-radius: 50%;
    opacity: 0.75;
    pointer-events: none;
    filter: blur(0.4px);
    z-index: 0;
}

.docs-back-btn::before {
    top: -12px;
    left: -240%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.9), transparent 12%);
    animation: star-move-top 6s linear infinite alternate;
}

.docs-back-btn::after {
    bottom: -12px;
    right: -240%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.9), transparent 12%);
    animation: star-move-bottom 6s linear infinite alternate;
}

.docs-back-btn span,
.docs-back-btn i {
    position: relative;
    z-index: 1;
}

.docs-back-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(192, 132, 252, 0.75);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}

.developer-docs-header {
    max-width: 1200px;
    margin: 0 auto 35px;
    text-align: center;
}

.developer-docs-header h2 {
    font-size: 2.4rem;
    color: var(--docs-text);
    margin-bottom: 10px;
}

.developer-docs-header p {
    color: #a0a0a0;
    font-size: 1rem;
}

.docs-search-bar-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.docs-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(99, 102, 241, 0.12));
    border: 2px solid rgba(192, 132, 252, 0.35);
    border-radius: 14px;
    padding: 12px 18px;
    transition: all 0.3s ease;
    height: 52px;
}

.docs-search-bar:focus-within {
    border-color: rgba(192, 132, 252, 0.65);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(99, 102, 241, 0.16));
    box-shadow: 0 0 22px rgba(192, 132, 252, 0.28);
}

.docs-search-bar .search-icon {
    color: var(--docs-accent);
    margin-right: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: static;
    top: auto;
    left: auto;
    transform: none;
}

.docs-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    font-weight: 500;
    height: 100%;
    padding: 0;
}

.docs-search-input::placeholder {
    color: #7a7a7a;
}

.docs-filters-container {
    max-width: 1200px;
    margin: 30px auto;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 20px;
}

.docs-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.docs-filter-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--docs-accent);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.docs-filter-select {
    padding: 16px 24px;
    background: rgba(10, 10, 30, 0.85);
    border: 2px solid rgba(99, 102, 241, 0.6);
    border-radius: 28px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 220px;
    appearance: none;
    background-image: 
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='%236366f1' stroke='%236366f1' stroke-width='0.5' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 14px 9px;
    padding-right: 50px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    color-scheme: dark;
    text-align: center;
}

.docs-filter-select::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), transparent);
    pointer-events: none;
}

.docs-filter-select:hover {
    border-color: rgba(99, 102, 241, 0.9);
    background: rgba(15, 15, 40, 0.9);
    box-shadow: 
        0 6px 28px rgba(99, 102, 241, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.docs-filter-select:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 1);
    background: rgba(20, 20, 45, 0.95);
    box-shadow: 
        0 0 0 3px rgba(99, 102, 241, 0.25),
        0 8px 36px rgba(99, 102, 241, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.docs-filter-select:focus::-webkit-scrollbar {
    width: 8px;
}

.docs-filter-select:focus::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.docs-filter-select:focus::-webkit-scrollbar-thumb {
    background: rgba(192, 132, 252, 0.55);
    border-radius: 4px;
}

.docs-filter-select:focus::-webkit-scrollbar-thumb:hover {
    background: rgba(192, 132, 252, 0.75);
}

.docs-filter-select option {
    background: #ffffff;
    color: #1a1a1a;
    padding: 12px 16px 12px 36px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
}

.docs-filter-select option:hover {
    background: linear-gradient(135deg, #f0f0f0, #e8e8e8);
    color: #000000;
}

.docs-filter-select option:checked {
    background: linear-gradient(135deg, #c084fc, #a855f7);
    color: #ffffff;
    font-weight: 700;
}

.docs-filter-select option:active,
.docs-filter-select option:focus {
    background: linear-gradient(135deg, #d4a5ff, #c084fc);
    color: #ffffff;
}

.developer-docs-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding: 0 20px;
}

.doc-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 32px 26px 26px;
    color: #e5e7eb;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    perspective: 1100px;
    --glow-x: 50%;
    --glow-y: 50%;
    --glow-intensity: 0;
    --glow-radius: 240px;
}

.doc-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: radial-gradient(
        var(--glow-radius) circle at var(--glow-x) var(--glow-y),
        rgba(var(--docs-glow-rgb), calc(var(--glow-intensity) * 0.9)) 0%,
        rgba(var(--docs-glow-rgb), calc(var(--glow-intensity) * 0.45)) 35%,
        transparent 65%
    );
    opacity: 1;
    pointer-events: none;
    mix-blend-mode: screen;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.doc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(168, 85, 247, 0.08), transparent 35%),
                radial-gradient(circle at 80% 0%, rgba(99, 102, 241, 0.08), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.doc-card:hover {
    transform: translateY(-8px);
    border-color: rgba(192, 132, 252, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

.doc-card > * {
    position: relative;
    z-index: 2;
}

.doc-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(var(--docs-glow-rgb), 1);
    box-shadow: 0 0 12px rgba(var(--docs-glow-rgb), 0.75);
    opacity: 0;
    animation: doc-particle-float 2.2s ease-in-out forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes doc-particle-float {
    0% { transform: translate3d(0, 0, 0) scale(0.4); opacity: 0; }
    20% { opacity: 1; }
    60% { transform: translate3d(var(--dx), var(--dy), 0) scale(1); opacity: 0.8; }
    100% { transform: translate3d(calc(var(--dx) * 1.4), calc(var(--dy) * 1.4), 0) scale(0.3); opacity: 0; }
}

.global-doc-spotlight {
    position: fixed;
    width: 900px;
    height: 900px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle,
        rgba(var(--docs-glow-rgb), 0.18) 0%,
        rgba(var(--docs-glow-rgb), 0.1) 20%,
        rgba(var(--docs-glow-rgb), 0.05) 40%,
        rgba(var(--docs-glow-rgb), 0.02) 60%,
        transparent 75%
    );
    z-index: 10;
    opacity: 0;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    filter: blur(0.2px);
}

.doc-os-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: all 0.3s ease;
}

.doc-os-badge:hover {
    transform: scale(1.1) rotate(5deg);
}

.windows-badge,
.linux-badge,
.docker-badge,
.aws-badge {
    background: linear-gradient(135deg, #6d28d9, #7c3aed);
}

.doc-badges {
    position: absolute;
    top: 16px;
    left: 18px;
    right: 75px;
    display: flex;
    gap: 8px;
    pointer-events: none;
    z-index: 1;
    flex-wrap: wrap;
}

.doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #0a0a0a;
    background: var(--docs-accent);
    box-shadow: 0 6px 18px rgba(192, 132, 252, 0.35);
}

.doc-badge.doc-level {
    background: linear-gradient(135deg, #c084fc, #a855f7);
    color: #111;
}

.doc-badge.doc-category {
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    color: #f8fafc;
}

.doc-content {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.doc-content h3 {
    margin: 0;
    font-size: 1.28rem;
    color: #fff;
    line-height: 1.3;
    font-weight: 700;
}

.doc-content p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.98rem;
    flex: 1;
}

.doc-footer {
    margin-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 215, 0, 0.1);
}

.doc-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.doc-date i {
    color: var(--docs-accent);
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.12));
    border: 2px solid rgba(192, 132, 252, 0.45);
    color: var(--docs-accent);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(192, 132, 252, 0.18);
    font-size: 0.95rem;
}

.doc-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(99, 102, 241, 0.2));
    border-color: rgba(192, 132, 252, 0.65);
    box-shadow: 0 6px 18px rgba(192, 132, 252, 0.28);
}

.doc-link i {
    font-size: 0.9rem;
}

.docs-back-btn::before,
.docs-back-btn::after {
    animation-duration: 6s;
}

@keyframes star-move-bottom {
    0% { transform: translate(0%, 0%); opacity: 1; }
    100% { transform: translate(-100%, 0%); opacity: 0; }
}

@keyframes star-move-top {
    0% { transform: translate(0%, 0%); opacity: 1; }
    100% { transform: translate(100%, 0%); opacity: 0; }
}

@media (max-width: 768px) {
    .developer-docs-header h2 {
        font-size: 2rem;
    }

    .docs-search-bar {
        padding: 12px 14px;
    }

    .docs-search-input {
        font-size: 0.95rem;
    }

    .docs-filters-container {
        flex-direction: column;
        align-items: stretch;
    }

    .docs-filter-group {
        width: 100%;
    }

    .docs-filter-select {
        width: 100%;
        min-width: unset;
    }

    .developer-docs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .doc-card {
        min-height: 380px;
        padding: 28px 22px 22px;
    }

    .doc-content h3 {
        font-size: 1.15rem;
    }

    .doc-content p {
        font-size: 0.92rem;
    }
}
