/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal overflow on all devices */
html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Additional mobile-friendly defaults */
img, video, iframe, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* Ensure long words don't break layout */
h1, h2, h3, h4, h5, h6, p, div, span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Handle long URLs and code snippets */
a, code, pre {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Prevent tables from causing horizontal scroll */
table {
    width: 100%;
    table-layout: fixed;
    overflow-wrap: break-word;
}

th, td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --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);
    --border-radius: 0.5rem;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Typography */
.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.highlight {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn--primary {
    background-color: var(--primary-color);
    color: white;
}

.btn--primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn--secondary:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav__icon {
    font-size: 1.75rem;
}

.nav__menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav__link:hover {
    color: var(--primary-color);
}

.nav__link--github {
    font-size: 1.25rem;
}

/* Mobile Navigation Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.nav__toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav__toggle--active .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle--active .nav__toggle-line:nth-child(2) {
    opacity: 0;
}

.nav__toggle--active .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 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: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero__description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero__sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero__section {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero__section:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hero__section-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.hero__section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.hero__section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Applications Section */
.applications {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.applications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.application {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.application:hover:not(.application--coming-soon) {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.application--featured {
    border: 2px solid var(--primary-color);
    position: relative;
}

.application--coming-soon {
    opacity: 0.8;
}

.application__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.application__icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge--live {
    background-color: #10b981;
    color: white;
}

.status-badge--coming-soon {
    background-color: var(--accent-color);
    color: white;
}

.application__title {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.application__description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.application__features ul {
    list-style: none;
    margin-bottom: 2rem;
}

.application__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.application__features li i {
    color: var(--primary-color);
    width: 16px;
}

.application__features .application--coming-soon li i {
    color: var(--text-muted);
}

.application__actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.application__url {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.application__url span {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background-color: var(--bg-tertiary);
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    color: var(--primary-color);
    font-weight: 500;
}

/* Developer Section */
.developer {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.developer__badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.developer__badges img {
    height: 24px;
    transition: height 0.2s ease;
}

.developer__quickstart {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    margin: 3rem 0;
    border: 1px solid var(--border-color);
}

.developer__quickstart h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.quickstart__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.quickstart__step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.step-content {
    flex: 1;
    width: 100%;
}

.step-content .code-block {
    margin-top: 0.5rem;
}

.step-number {
    background-color: var(--primary-color);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.developer__features,
.developer__resources {
    margin: 4rem 0;
}

.developer__features h3,
.developer__resources h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-primary);
}

.btn--large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    min-height: 48px; /* Better touch target */
}

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 48px;
        padding: 1rem 1.5rem;
    }
    
    .btn--small {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }
    
    .nav__link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }
}

/* Packages Section - now part of Developer section */
.packages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Features Grid */
.features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature__icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature__description {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.package {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.package:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.package__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.package__title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    flex-grow: 1;
    margin-right: 1rem;
}

.package__badge {
    height: 24px;
    transition: height 0.2s ease;
    flex-shrink: 0; /* Prevent badge from shrinking */
}

.package__status {
    background-color: var(--accent-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.package__description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.package__features ul {
    list-style: none;
    margin-bottom: 2rem;
}

.package__features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.package__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.package__buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Projects Section */
.projects {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.project {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project:hover:not(.project--coming-soon) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project--coming-soon {
    opacity: 0.7;
}

.project__icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.project__description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.project__link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.project__link:hover {
    color: var(--primary-dark);
}

.project__status {
    color: var(--text-muted);
    font-style: italic;
}

/* Documentation Section */
.docs {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.docs__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.doc {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.doc__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.doc__title i {
    color: var(--primary-color);
}

.doc__description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.doc__link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.doc__link:hover {
    color: var(--primary-dark);
}

/* Quick Start Section */
.quickstart {
    padding: 6rem 0;
    background-color: var(--bg-primary);
}

.quickstart__content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.quickstart__step h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.code-block {
    position: relative;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    padding-right: 3.5rem; /* Make room for copy button */
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.code-block code {
    display: block;
    white-space: pre;
    word-wrap: normal;
    overflow-wrap: normal;
    max-width: calc(100% - 3rem); /* Ensure code doesn't overlap copy button */
}

.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.375rem 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.copy-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

/* Footer */
.footer {
    background-color: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer__links {
    display: flex;
    gap: 2rem;
}

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

.footer__links a:hover {
    color: white;
}

.footer__bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--secondary-color);
    color: var(--text-muted);
}

/* Responsive Design */
/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .hero__title {
        font-size: 3rem;
    }
    
    .applications__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .packages__grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    /* Slightly smaller badges for tablet view */
    .developer__badges img {
        height: 22px;
    }
    
    .package__badge {
        height: 22px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }
    
    .nav__menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        height: calc(100vh - 100%);
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 2rem 0;
        gap: 2rem;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        border-top: 1px solid var(--border-color);
        box-sizing: border-box;
        overflow-x: hidden;
    }
    
    .nav__menu--active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav__link {
        font-size: 1.125rem;
        padding: 0.5rem 1rem;
        border-radius: var(--border-radius);
        transition: all 0.2s ease;
        width: auto;
        max-width: 90%;
        text-align: center;
    }
    
    .nav__link:hover {
        background-color: var(--bg-tertiary);
    }
    
    .hero__title {
        font-size: 2.75rem;
        line-height: 1.1;
    }
    
    .hero__description {
        font-size: 1.125rem;
        padding: 0 1rem;
    }
    
    .hero__sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }
    
    .hero__section {
        padding: 2rem 1.5rem;
    }
    
    .section__title {
        font-size: 2.25rem;
    }
    
    .applications__grid {
        grid-template-columns: 1fr;
    }
    
    .application {
        padding: 2rem;
    }
    
    .application__actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        justify-content: center;
        min-height: 48px; /* Better touch target */
    }
    
    .packages__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Better package layout on mobile */
    .package__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .package__badge {
        height: 18px;
        align-self: flex-start;
    }
    
    .package__buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .quickstart__steps {
        grid-template-columns: 1fr;
    }
    
    .quickstart__step {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.25rem;
        padding: 1.5rem 0;
    }
    
    .step-content {
        flex: 1;
    }
    
    .code-block {
        padding: 1rem;
        padding-right: 3.25rem; /* Ensure enough space for copy button */
        font-size: 0.85rem;
    }
    
    .copy-btn {
        min-width: 38px;
        min-height: 38px;
        top: 0.625rem;
        right: 0.625rem;
        font-size: 0.7rem;
    }
    
    .features__grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .docs__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer__content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer__links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 7rem 0 3rem;
    }
    
    .hero__title {
        font-size: 2.25rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero__description {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    .hero__section {
        padding: 1.5rem;
    }
    
    .hero__section h3 {
        font-size: 1.25rem;
        margin: 1rem 0 0.5rem;
    }
    
    .applications__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .application {
        padding: 1.5rem;
    }
    
    .application__title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .application__description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .application__features ul {
        padding-left: 0;
    }
    
    .application__features li {
        font-size: 0.875rem;
        padding: 0.25rem 0;
    }
    
    .btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px;
        width: 100%;
        justify-content: center;
    }
    
    .btn--small {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        min-height: 44px;
    }
    
    .developer__quickstart {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .quickstart__step {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 1.5rem 0;
        gap: 1rem;
    }
    
    .step-number {
        align-self: flex-start;
        margin-bottom: 0;
    }
    
    .step-content {
        width: 100%;
    }
    
    .step-content h4 {
        margin-bottom: 1rem;
        font-size: 1.125rem;
    }
    
    .code-block {
        width: 100%;
        font-size: 0.8rem;
        padding: 1rem;
        padding-right: 3.5rem; /* Make room for copy button */
    }
    
    .copy-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        min-width: 36px;
        min-height: 36px;
        padding: 0.375rem;
        font-size: 0.65rem;
        border-radius: 0.25rem;
        z-index: 10;
    }
    
    /* Improve badge display on mobile */
    .developer__badges {
        gap: 0.5rem;
        margin-top: 1rem;
        justify-content: center;
        padding: 0;
    }
    
    .developer__badges img {
        height: 16px;
        max-width: none; /* Allow badges to maintain aspect ratio */
    }
    
    .features__grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature,
    .package {
        padding: 1.5rem;
    }
    
    .feature__title {
        font-size: 1.125rem;
    }
    
    .package__buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .section__title {
        font-size: 1.875rem;
        margin-bottom: 2rem;
    }
    
    .section__subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .docs__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .doc {
        padding: 1.5rem;
    }
    
    /* Improve touch targets on mobile */
    .nav__link,
    .doc__link,
    .footer__links a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.75rem 1rem;
    }
    
    .copy-btn {
        min-width: 44px;
        min-height: 44px;
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.5rem;
        font-size: 0.7rem;
        border-radius: 0.375rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Improve badge display on mobile */
    .developer__badges {
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 0 1rem;
    }
    
    .developer__badges img {
        height: 18px;
        max-width: 100%;
    }
    
    .package__badge {
        height: 18px;
        max-width: 100%;
    }
    
    /* Better spacing for package badges */
    .package__header {
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Prevent horizontal scrolling on mobile */
    body {
        overflow-x: hidden;
    }
    
    /* Ensure all containers stay within viewport */
    * {
        max-width: 100%;
    }
    
    /* Better spacing for mobile */
    .section {
        padding: 3rem 0;
    }
    
    /* Improved mobile typography */
    .application__description,
    .package__description {
        line-height: 1.6;
    }
    
    /* Better mobile form elements */
    .code-block {
        max-width: 100%;
        overflow-x: auto;
        word-wrap: break-word;
        white-space: pre-wrap;
    }
    
    .code-block code {
        word-break: break-word;
        white-space: pre-wrap;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    /* Prevent any element from overflowing */
    .hero__content,
    .application,
    .package,
    .feature,
    .doc {
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    /* Responsive images */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Samsung Galaxy S24+ and similar devices */
@media (max-width: 430px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero__title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero__description {
        font-size: 0.95rem;
        padding: 0 0.5rem;
    }
    
    .nav__title {
        font-size: 1.25rem;
    }
    
    /* Ensure code blocks don't cause horizontal scroll */
    .code-block {
        font-size: 0.75rem;
        padding: 0.75rem;
        padding-right: 3rem; /* Space for copy button */
        word-wrap: break-word;
        white-space: pre-wrap;
        overflow-x: hidden;
        scrollbar-width: thin;
    }
    
    .code-block code {
        word-break: break-word;
        white-space: pre-wrap;
        overflow-wrap: break-word;
        max-width: calc(100% - 2.5rem);
    }
    
    .copy-btn {
        min-width: 32px;
        min-height: 32px;
        padding: 0.25rem;
        font-size: 0.6rem;
        top: 0.5rem;
        right: 0.5rem;
    }
    
    /* Better quickstart layout */
    .quickstart__step {
        padding: 1.25rem 0;
        gap: 0.75rem;
    }
    
    .step-content h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .developer__quickstart {
        padding: 1.25rem;
        margin: 2rem 0;
    }
    
    /* Better badge layout for small screens */
    .developer__badges {
        gap: 0.375rem;
        padding: 0 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .developer__badges img {
        height: 14px;
    }
    
    .package__badge {
        height: 16px;
    }
    
    .package__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    /* Prevent button overflow */
    .btn {
        font-size: 0.9rem;
        padding: 0.875rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .application__title {
        font-size: 1.375rem;
    }
    
    /* Tighter spacing for very small screens */
    .section {
        padding: 2.5rem 0;
    }
    
    .section__title {
        font-size: 1.75rem;
    }
    
    /* Ensure navigation doesn't overflow */
    .nav__menu {
        width: 100vw;
        left: 0;
        margin-left: 0;
    }
    
    /* Better responsive grids */
    .features__grid,
    .packages__grid,
    .applications__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Responsive step numbers */
    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero__title {
        font-size: 1.875rem;
    }
    
    .nav__title {
        font-size: 1.125rem;
    }
    
    .code-block {
        font-size: 0.7rem;
        padding: 0.5rem;
        padding-right: 2.75rem; /* Reduced space for copy button */
    }
    
    .code-block code {
        max-width: calc(100% - 2.25rem);
    }
    
    .copy-btn {
        min-width: 28px;
        min-height: 28px;
        padding: 0.125rem;
        font-size: 0.55rem;
        top: 0.375rem;
        right: 0.375rem;
    }
    
    /* Tighter quickstart layout */
    .quickstart__step {
        padding: 1rem 0;
        gap: 0.5rem;
    }
    
    .step-content h4 {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }
    
    .developer__quickstart {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .developer__quickstart h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Extra small badges */
    .developer__badges img {
        height: 12px;
    }
    
    .package__badge {
        height: 14px;
    }
    
    /* Stack everything vertically */
    .package__buttons {
        gap: 0.5rem;
    }
}

/* Landscape mobile phones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 5rem 0 2rem;
    }
    
    .nav__menu {
        padding: 1rem 0;
        gap: 1rem;
    }
}
