/* PM2 Python Library Documentation Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Cascadia Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Account for fixed navbar */
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.lang-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.lang-btn i {
    font-size: 0.75rem;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    position: relative;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 0.5rem;
    z-index: 1002;
    background: transparent;
    border: none;
    position: relative;
    min-width: 35px;
    min-height: 35px;
    justify-content: center;
    align-items: center;
}

    .hamburger span {
        width: 25px;
        height: 3px;
        background: var(--text-primary);
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        border-radius: 2px;
        display: block;
        transform-origin: center;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: scale(0);
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }/* Ensure hamburger menu works properly */
.hamburger:hover {
    opacity: 0.8;
}

.hamburger:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-title i {
    color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* Features Section */
.features {
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 4rem;
    height: 4rem;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-white);
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Installation Section */
.install-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.install-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.install-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.requirements {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.requirements h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.requirements ul {
    list-style: none;
    padding-left: 0;
}

.requirements li {
    padding: 0.5rem 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.requirements li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Code Examples */
.quickstart {
    background: var(--bg-secondary);
}

.quickstart-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
}

.code-example {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.code-example h3 {
    padding: 1rem 1.5rem;
    background: var(--bg-dark);
    color: var(--text-white);
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.code-example pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e1e1e;
    overflow-x: auto;
}

.code-example code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Documentation Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.doc-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 1rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.doc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.doc-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--text-white);
    font-size: 1.25rem;
}

.doc-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.doc-card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Examples Tabs */
.examples-preview {
    background: var(--bg-secondary);
}

.examples-tabs {
    max-width: 800px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.tab-content {
    background: var(--bg-card);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.tab-pane pre {
    margin: 0;
    padding: 2rem;
    background: #1e1e1e;
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 3rem 0 1rem;
}

/* Legal Section Styles */
.legal-section {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 2rem;
}

.legal-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legal-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Notice Card Styles for Legal Section */
.notice-card {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border: 2px solid var(--primary-color);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.notice-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.notice-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.notice-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.notice-content li {
    margin-bottom: 0.5rem;
}

.notice-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.notice-content a:hover {
    text-decoration: underline;
}

/* Legal Notice Section */
.legal-notice {
    margin-top: 4rem;
    padding: 2rem 0;
    border-top: 2px solid var(--border-color);
}

.legal-notice h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-white);
}

.footer-section p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--text-white);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-color);
    color: var(--text-white);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Global Responsive Settings */
html {
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    min-width: 320px; /* Minimum width for very small devices */
}

/* Responsive Design */
@media (max-width: 768px) {
    /* HAMBURGER MENU IMPROVEMENTS */
    .hamburger {
        display: flex !important;
        z-index: 1002; /* Higher z-index */
        position: fixed;
        top: 1rem;
        right: 1rem;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 8px;
        box-shadow: var(--shadow-lg);
        padding: 0.75rem;
        border: 2px solid var(--border-color);
        transition: all 0.3s ease;
        cursor: pointer;
    }
    
    .hamburger:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }
    
    .hamburger:hover span {
        background: white;
    }
    
    /* MOBILE NAVIGATION OVERLAY */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 5rem 2rem 2rem;
        flex-direction: column;
        gap: 1rem;
        box-shadow: var(--shadow-lg);
        z-index: 1001;
        align-items: stretch;
        overflow-y: auto;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        will-change: transform;
    }
    
    .nav-menu.active {
        display: flex;
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        width: 100%;
        text-align: left;
        border-radius: 0.5rem;
        background: rgba(37, 99, 235, 0.05);
        margin-bottom: 0.5rem;
        transition: all 0.3s ease;
        font-size: 1.1rem;
        font-weight: 500;
        text-decoration: none;
    }
    
    .nav-menu .nav-link:hover {
        background: var(--primary-color);
        color: white;
        transform: translateX(5px);
    }
    
    /* LANGUAGE SWITCHER MOBILE */
    .language-switcher {
        margin: 2rem 0 0 0;
        padding-top: 2rem;
        border-top: 2px solid var(--border-color);
        justify-content: center;
        width: 100%;
        gap: 1rem;
    }
    
    .lang-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        min-width: 80px;
    }
    
    /* NAVBAR ADJUSTMENTS */
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar .container {
        padding: 0 1rem;
    }
    
    .nav-brand {
        font-size: 1.25rem;
        z-index: 1003;
        position: relative;
    }
    
    /* CONTAINER & SECTIONS */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    section {
        padding: 3rem 0;
    }
    
    /* HERO SECTION MOBILE OPTIMIZATION */
    .hero {
        padding: 7rem 0 4rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        line-height: 1.5;
        padding: 0 1rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        max-width: 300px;
        margin: 0 auto 3rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        text-align: center;
        justify-content: center;
    }
    
    .hero-stats {
        gap: 2rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .stat {
        min-width: 120px;
    }
    
    /* TYPOGRAPHY MOBILE SCALING */
    .section-title {
        font-size: 2rem;
        padding: 0 1rem;
        margin-bottom: 2rem;
    }
    
    /* GRIDS - STACK TO SINGLE COLUMN */
    .features-grid,
    .install-methods,
    .docs-grid,
    .quickstart-content,
    .examples-grid,
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* CARDS MOBILE OPTIMIZATION */
    .feature-card,
    .install-card,
    .doc-card,
    .example-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }
    
    .feature-icon,
    .doc-icon {
        width: 3rem;
        height: 3rem;
        font-size: 1.25rem;
    }
    
    /* CODE BLOCKS - PREVENT HORIZONTAL SCROLL */
    .code-example,
    .install-card {
        overflow: hidden;
        border-radius: 0.75rem;
    }
    
    .code-example pre,
    .install-card pre {
        overflow-x: auto;
        padding: 1rem;
        font-size: 0.8rem;
        line-height: 1.4;
        margin: 0;
        /* Ensure code doesn't break layout */
        white-space: pre;
        word-wrap: normal;
    }
    
    .code-example code,
    .install-card code {
        font-size: 0.8rem;
        font-family: var(--font-mono);
    }
    
    /* TABS MOBILE */
    .tab-buttons {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }
    
    .tab-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        flex: none;
        min-width: auto;
    }
    
    /* REQUIREMENTS LIST */
    .requirements {
        margin: 0 0.5rem;
        padding: 1.5rem;
    }
    
    .requirements ul {
        padding-left: 0;
    }
    
    .requirements li {
        padding: 0.75rem 0 0.75rem 2rem;
        font-size: 0.95rem;
    }
    
    /* LEGAL NOTICE MOBILE */
    .notice-card {
        flex-direction: column;
        text-align: left;
        padding: 1.5rem;
        gap: 1rem;
        margin: 0 0.5rem;
    }
    
    .notice-card i {
        font-size: 1.5rem;
        align-self: flex-start;
    }
    
    .notice-content ul {
        padding-left: 1rem;
    }
    
    .notice-content li {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Tablet responsive (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .quickstart-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .install-methods {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .docs-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 1.5rem;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-buttons {
        gap: 1.5rem;
    }
    
    .hero-stats {
        gap: 2.5rem;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    /* Code blocks remain scrollable on tablet */
    .code-example pre {
        font-size: 0.85rem;
        padding: 1.25rem;
    }
}

/* Small mobile devices (max-width: 480px) */
@media (max-width: 480px) {
    /* EXTRA SMALL CONTAINER */
    .container {
        padding: 0 0.75rem;
    }
    
    /* HERO SECTION VERY SMALL SCREENS */
    .hero {
        padding: 6rem 0 3rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        padding: 0 0.5rem;
        line-height: 1.4;
    }
    
    .hero-buttons {
        max-width: 280px;
    }
    
    .hero-buttons .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* TYPOGRAPHY VERY SMALL */
    .section-title {
        font-size: 1.5rem;
        padding: 0 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .nav-brand {
        font-size: 1.125rem;
    }
    
    .navbar .container {
        padding: 0.5rem 0.75rem;
    }
    
    /* CARDS VERY SMALL */
    .feature-card, 
    .install-card, 
    .doc-card,
    .example-card {
        margin: 0 0.25rem;
        padding: 1.25rem;
    }
    
    .feature-card h3,
    .doc-card h3 {
        font-size: 1.1rem;
    }
    
    .feature-card p,
    .doc-card p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    /* CODE BLOCKS VERY SMALL */
    .code-example pre,
    .install-card pre {
        padding: 0.75rem;
        font-size: 0.7rem;
        overflow-x: auto;
        line-height: 1.3;
    }
    
    .code-example code,
    .install-card code {
        font-size: 0.7rem;
    }
    
    /* TABS VERY SMALL */
    .tab-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        text-align: center;
    }
    
    /* HAMBURGER VERY SMALL */
    .hamburger {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem;
    }
    
    .hamburger span {
        width: 20px;
        height: 2.5px;
    }
    
    /* NAVIGATION MENU VERY SMALL */
    .nav-menu {
        padding: 4rem 1rem 2rem;
    }
    
    .nav-menu .nav-link {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .language-switcher {
        margin: 1.5rem 0 0 0;
        padding-top: 1.5rem;
    }
    
    .lang-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
        min-width: 70px;
    }
    
    /* FOOTER VERY SMALL */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-section {
        padding: 0 1rem;
    }
    
    .footer-section h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .social-links {
        justify-content: center;
        gap: 0.75rem;
    }
    
    .social-links a {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }
    
    /* LEGAL NOTICE VERY SMALL */
    .notice-card {
        margin: 0 0.25rem;
        padding: 1.25rem;
    }
    
    .notice-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .notice-content p,
    .notice-content li {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* REQUIREMENTS VERY SMALL */
    .requirements {
        margin: 0 0.25rem;
        padding: 1.25rem;
    }
    
    .requirements h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .requirements li {
        padding: 0.5rem 0 0.5rem 1.5rem;
        font-size: 0.85rem;
    }
}

/* Extra defensive measures for horizontal scroll */
*, *::before, *::after {
    max-width: 100%;
}

/* Prevent horizontal scroll on body */
body {
    overflow-x: hidden;
}

/* Ensure all code blocks are properly contained */
pre, code {
    overflow-wrap: break-word;
}

/* Code blocks in examples specifically - prevent horizontal page scroll */
.code-example pre,
.install-card pre {
    white-space: pre;
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    word-wrap: normal;
    /* Ensure internal scrollbar only */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) rgba(255, 255, 255, 0.1);
}

.code-example pre::-webkit-scrollbar,
.install-card pre::-webkit-scrollbar {
    height: 6px;
}

.code-example pre::-webkit-scrollbar-track,
.install-card pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.code-example pre::-webkit-scrollbar-thumb,
.install-card pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

/* Ensure containers don't overflow */
.container {
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
}

/* Copy button positioning for all screens */
.copy-btn {
    position: absolute !important;
    top: 0.75rem !important;
    right: 0.75rem !important;
    z-index: 10 !important;
    padding: 0.5rem !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: none !important;
    border-radius: 0.25rem !important;
    color: white !important;
    cursor: pointer !important;
    opacity: 0.8 !important;
    transition: opacity 0.3s ease !important;
}

.copy-btn:hover {
    opacity: 1 !important;
    background: rgba(0, 0, 0, 0.9) !important;
}

/* Additional responsive utilities */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus states for accessibility */
.hamburger:focus,
.nav-link:focus,
.btn:focus,
.tab-btn:focus,
.lang-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hamburger {
        border: 2px solid currentColor;
    }
    
    .nav-menu {
        border: 2px solid currentColor;
    }
    
    .feature-card,
    .install-card,
    .doc-card,
    .code-example {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto !important;
    }
}