* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e88e5;
    --secondary-color: #64b5f6;
    --accent-coral: #ff8a80;
    --dark-navy: #2c3e50;
    --darker-navy: #1e2a38;
    --text-color: #2c3e50;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --gray: #7f8c8d;
    --light-gray: #ecf0f1;
}

html {
    scroll-padding-top: 100px;
}

/* Only enable smooth scroll when user clicks, not on focus */
html:focus-within {
    scroll-behavior: auto;
}

html.smooth-scroll {
    scroll-behavior: smooth;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

p {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Skip to main content link for keyboard users */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    z-index: 1000;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
*:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

*:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Improve button focus styles */
button:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Improve link focus styles */
a:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 2px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: #121926;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo a {
    display: block;
    line-height: 0;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo a:focus-visible {
    outline: 3px solid var(--secondary-color);
    outline-offset: 4px;
    border-radius: 4px;
}

.logo-image {
    height: 60px;
    width: auto;
    display: block;
}

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

.nav-links a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--light-gray);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    transition: border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.github-link:hover {
    border-color: var(--secondary-color);
    background-color: rgba(100, 181, 246, 0.1);
}

.github-link svg {
    flex-shrink: 0;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
    width: 40px;
    height: 40px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-gray);
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

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

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

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--dark-navy), var(--darker-navy));
    color: var(--white);
    padding: 3rem 0 4rem 0;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.hero-demo {
    flex-shrink: 0;
}

.demo-gif {
    max-width: 600px;
    width: 100%;
    height: auto;
    border: 5px solid var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.hero-text {
    text-align: left;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    background-color: var(--secondary-color);
}

/* Why Section */
.why {
    padding: 5rem 0;
    background-color: var(--white);
}

.why h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-color);
}

.why p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    max-width: 900px;
    margin: 1.5rem auto;
    text-align: center;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--light-bg);
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.feature-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--gray);
}

/* Installation Section */
.installation {
    padding: 5rem 0;
    background-color: var(--white);
}

.installation h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.section-intro {
    font-size: 1.2rem;
    color: var(--gray);
    text-align: center;
    margin-bottom: 3rem;
}

.install-option {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.install-option h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.install-option p {
    color: var(--gray);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.requirements {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.requirements strong {
    color: var(--primary-color);
}

/* Usage Section */
.usage {
    padding: 5rem 0;
    background-color: var(--light-bg);
}

.usage h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.usage h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    margin-top: 3rem;
}

.usage h3:first-of-type {
    margin-top: 0;
}

.usage h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.usage-basic,
.options,
.examples,
.file-organization {
    margin-bottom: 3rem;
}

/* Options Table */
.options-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
}

.options-table thead {
    background-color: var(--dark-navy);
    color: var(--white);
}

.options-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 1rem;
}

.options-table tr {
    border-bottom: 1px solid var(--light-bg);
}

.options-table tbody tr:last-child {
    border-bottom: none;
}

.options-table td {
    padding: 1rem;
    vertical-align: top;
}

.options-table td:first-child {
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    width: 30%;
}

.options-table td:last-child {
    color: var(--gray);
}

/* Examples */
.example {
    margin-bottom: 2rem;
}

/* Code Blocks */
pre {
    background-color: var(--dark-navy);
    color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

code {
    background-color: var(--light-bg);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
}

/* FAQ Section */
.faq {
    padding: 5rem 0;
    background-color: var(--white);
}

.faq h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.faq-item {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.05rem;
}

.faq-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.faq-item a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--dark-navy);
    color: var(--light-gray);
    padding: 2rem 0;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo-image {
        height: 45px;
    }

    .hamburger {
        display: flex;
    }

    nav .container {
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 77px;
        right: -100%;
        width: 100%;
        max-width: 300px;
        height: calc(100vh - 77px);
        background-color: #121926;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        padding: 0.5rem 0;
    }

    .github-link {
        width: 100%;
        justify-content: center;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .demo-gif {
        max-width: 100%;
    }

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

    .tagline {
        font-size: 1.3rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .features h2,
    .installation h2,
    .usage h2,
    .faq h2 {
        font-size: 2rem;
    }

    .usage h3 {
        font-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .options-table td:first-child {
        white-space: normal;
        width: auto;
    }

    pre {
        font-size: 0.8rem;
        padding: 1rem;
    }

    .install-option {
        padding: 1.5rem;
    }

    .faq-item {
        padding: 1.5rem;
    }

    .faq-item h3 {
        font-size: 1.1rem;
    }

    .faq-item p {
        font-size: 1rem;
    }
}
