/* Complete redesign inspired by npm registry with professional styling */

:root {
    --primary: #cb3837;
    --primary-hover: #a83534;
    --primary-light: #fff5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-tertiary: #6f6f6f;
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #fafafa;
    --border-color: #e0e0e0;
    --code-bg: #2d2d2d;
    --code-text: #f8f8f2;
    --success: #10b981;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Professional header with logo integration */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-image {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease-in-out;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.header-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2.5rem;
}

.header-nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.header-nav ul li a:hover {
    color: var(--primary);
}

/* Main wrapper layout */
.main-wrapper {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    min-height: calc(100vh - 73px);
}

/* Improved sidebar with npm-style design */
.sidebar {
    width: 280px;
    background-color: var(--bg-tertiary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    overflow-y: auto;
    flex-shrink: 0;
    height: calc(100vh - 73px);
    position: sticky;
    top: 73px;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav ul li {
    margin: 0;
}

.sidebar-nav ul li a {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav ul li a:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

/* Main content area with better spacing */
.content {
    flex: 1;
    padding: 3rem;
    overflow-y: auto;
    background-color: var(--bg-primary);
}

.hero-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-section h1 {
    font-size: 3rem;
    color: var(--primary);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

table,
th,
td {
    border: 1px solid black;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
}

.contributors-section {
    text-align: center;
}

.contributors-section img {
    max-width: 100%;
    height: auto;
}

h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin: 2.5rem 0 1.5rem 0;
    font-weight: 700;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
}

h3 {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 1.5rem 0 1rem 0;
    font-weight: 600;
}

p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0 0 1.25rem 0;
    font-size: 1rem;
}

code {
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: "Fira Code", monospace;
    font-size: 0.9em;
    font-weight: 500;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

ul,
ol {
    margin: 0 0 1.5rem 0;
    padding-left: 1.75rem;
    color: var(--text-secondary);
}

ul li,
ol li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

ul li strong,
ol li strong {
    color: var(--text-primary);
}

section {
    margin-bottom: 2.5rem;
}

/* Enhanced code block with npm-style design */
.code-block {
    background-color: var(--code-bg);
    color: var(--code-text);
    padding: 1.5rem;
    border-radius: 6px;
    margin: 1.5rem 0;
    overflow-x: auto;
    font-family: "Fira Code", monospace;
    font-size: 0.95rem;
    line-height: 1.6;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.code-block code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    flex: 1;
    overflow-x: auto;
}

.copy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(203, 56, 55, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

.copy-btn.copied {
    background-color: var(--success);
}

.copy-icon {
    font-size: 1rem;
}

/* Responsive design for tablets and mobile */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        padding: 1.5rem 0;
    }

    .sidebar-nav ul li a {
        padding: 0.7rem 1.25rem;
        font-size: 0.9rem;
    }

    .content {
        padding: 2.5rem 2rem;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 1rem 1.5rem;
    }

    .hamburger-menu {
        display: flex;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 73px;
        left: 0;
        right: 0;
        background-color: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        z-index: 999;
    }

    .header-nav.active {
        display: block;
    }

    .header-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }

    .header-nav ul li {
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .header-nav ul li a {
        display: block;
        padding: 1rem 1.5rem;
        text-align: left;
    }

    .main-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        position: static;
        height: auto;
    }

    .sidebar.active {
        max-height: 500px;
        padding: 1.5rem 0;
    }

    .sidebar-nav ul li a {
        padding: 0.75rem 1.5rem;
    }

    .content {
        padding: 2rem 1.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .code-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .copy-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem 1rem;
    }

    .logo-image {
        height: 32px;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .content {
        padding: 1.5rem 1rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    p {
        font-size: 0.95rem;
    }

    .code-block {
        padding: 1rem;
        font-size: 0.85rem;
        margin: 1rem 0;
    }

    .copy-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    ul,
    ol {
        padding-left: 1.5rem;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}