:root {
    --bg-color: #050511;
    --surface: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.1);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #a855f7;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;

    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background effects */
.blob {
    position: absolute;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.shape1 {
    top: -100px;
    left: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent 70%);
}

.shape2 {
    top: 50vh;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--secondary), transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(50px) scale(1.1);
    }
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, #a855f7, #6366f1, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: gradientFlow 5s ease infinite alternate;
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 100% 50%;
    }
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.3s ease;
}

/* UI Elements */
.glass-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    background: var(--surface-hover);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-primary,
.btn-secondary,
.btn-primary-outline {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--surface-hover);
    transform: translateY(-2px);
}

.btn-primary-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

/* Layout */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(5, 5, 17, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.7rem;
    background: var(--primary);
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    font-weight: 600;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a:not([class]) {
    font-weight: 600;
    color: var(--text-muted);
}

nav a:not([class]):hover {
    color: var(--text-main);
}

main {
    padding: 0 5%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
}

.hero h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 5rem;
    flex-wrap: wrap;
}

.mockup {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.mockup-header {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.url-bar {
    background: var(--surface);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-left: 1rem;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-grow: 1;
    text-align: center;
}

.device-grid {
    display: flex;
    gap: 1rem;
    padding: 2rem;
    justify-content: center;
    align-items: flex-end;
    height: 300px;
    background: linear-gradient(180deg, transparent, rgba(99, 102, 241, 0.1));
}

.device {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.device.mobile {
    width: 150px;
    height: 250px;
}

.device.tablet {
    width: 220px;
    height: 280px;
}

.device.desktop {
    width: 350px;
    height: 220px;
}

.device.mobile,
.device.tablet,
.device.desktop {
    max-width: 100%;
    text-align: center;
    padding: 0.75rem;
}

/* Features */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.features {
    scroll-margin-top: 110px;
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    grid-auto-rows: minmax(200px, auto);
}

.md-col-2 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .md-col-2 {
        grid-column: span 2;
    }
}

.bento-item .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.bento-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.bento-item p {
    color: var(--text-muted);
}

/* DevTools */
.devtools {
    scroll-margin-top: 110px;
    padding-top: 4rem;
    padding-bottom: 5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 900px) {
    .devtools {
        grid-template-columns: 1fr;
    }
}

.devtools .section-title {
    text-align: left;
    margin-bottom: 1rem;
}

.feature-list {
    list-style: none;
    margin-top: 2rem;
}

.feature-list li {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.highlight {
    font-weight: 700;
    color: var(--text-main);
}

.devtool-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.toast {
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid transparent;
    background: rgba(0, 0, 0, 0.4);
    animation: slideIn 0.5s ease-out forwards;
    opacity: 0;
    transform: translateX(20px);
}

.toast:nth-child(1) {
    animation-delay: 0.1s;
}

.toast:nth-child(2) {
    animation-delay: 0.3s;
}

.toast:nth-child(3) {
    animation-delay: 0.5s;
}

.toast:nth-child(4) {
    animation-delay: 0.7s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.error {
    border-color: var(--error);
    color: var(--error);
}

.toast.log {
    border-color: var(--warning);
    color: var(--warning);
}

.toast.network {
    border-color: var(--info);
    color: var(--info);
}

.toast.success {
    border-color: var(--success);
    color: var(--success);
}

/* Installation */
.installation {
    scroll-margin-top: 110px;
    padding-top: 4rem;
    padding-bottom: 5rem;
}

.installation .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
    margin-top: -2rem;
}

.platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.step-list {
    margin: 1.5rem 0 1.5rem 1.5rem;
    color: var(--text-muted);
}

.step-list li {
    margin-bottom: 0.5rem;
}

.step-list a {
    color: var(--primary);
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.alert strong {
    display: block;
    margin-bottom: 0.5rem;
}

.alert p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.alert.warning strong {
    color: var(--warning);
}

.alert.error strong {
    color: var(--error);
}

.code-block {
    display: block;
    background: rgba(0, 0, 0, 0.6);
    padding: 0.8rem;
    border-radius: 6px;
    font-family: var(--font-mono);
    margin-top: 0.5rem;
    color: #e2e8f0;
    overflow-x: auto;
}

.developer-mode {
    margin-top: 2rem;
}

.developer-mode h3 {
    margin-bottom: 1rem;
}

pre code {
    display: block;
    background: rgba(0, 0, 0, 0.6);
    padding: 1.5rem;
    border-radius: 8px;
    font-family: var(--font-mono);
    color: #a855f7;
    line-height: 1.5;
    overflow-x: auto;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 5%;
    margin-top: 5rem;
    background: rgba(0, 0, 0, 0.3);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

#scroll-top-btn {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px var(--primary-glow);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 120;
}

#scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#scroll-top-btn:hover {
    filter: brightness(1.08);
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 88px;
    }

    body {
        font-size: 15.5px;
        line-height: 1.65;
    }

    .navbar {
        padding: 1rem 1.1rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    nav {
        display: none;
    }

    main {
        padding: 0 1.1rem;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .hero h1 {
        letter-spacing: -0.01em;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-bottom: 2.5rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .mockup-header {
        padding: 0.75rem;
    }

    .mockup,
    .hero-image-placeholder {
        width: 100%;
    }

    .url-bar {
        margin-left: 0.5rem;
        font-size: 0.72rem;
        padding: 0.25rem 0.6rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .device-grid {
        height: auto;
        align-items: stretch;
        flex-direction: column;
        padding: 1rem;
    }

    .device.mobile,
    .device.tablet,
    .device.desktop {
        width: 100%;
        height: auto;
        min-height: 70px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.9rem;
        margin-bottom: 2rem;
    }

    .features,
    .devtools,
    .installation {
        padding-top: 3rem;
        scroll-margin-top: 88px;
    }

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

    .glass-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .devtools {
        gap: 2rem;
    }

    .devtools .section-title {
        text-align: center;
    }

    .feature-list li {
        align-items: flex-start;
    }

    .platforms {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .platform-card,
    .developer-mode {
        width: 100%;
    }

    .feature-list {
        margin-top: 1rem;
    }

    .feature-list li {
        margin-bottom: 1rem;
        font-size: 0.96rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 0.5rem;
    }

    #scroll-top-btn {
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 15px;
    }

    main {
        padding: 0 0.8rem;
    }

    .badge {
        font-size: 0.62rem;
    }

    .hero h1 {
        font-size: clamp(2rem, 11.5vw, 2.5rem);
        line-height: 1.15;
    }

    .hero p {
        font-size: 0.96rem;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        padding: 0.75rem 1rem;
        font-size: 0.92rem;
    }

    .section-title {
        font-size: 1.6rem;
        line-height: 1.2;
        text-wrap: balance;
    }

    .bento-item h3,
    .platform-card h3,
    .developer-mode h3 {
        font-size: 1.1rem;
    }

    .bento-item p,
    .step-list,
    .alert p {
        font-size: 0.92rem;
    }

    .feature-list li {
        display: block;
        margin-bottom: 1.1rem;
        line-height: 1.55;
    }

    .feature-list .highlight {
        display: inline;
        margin-right: 0.3rem;
    }

    .step-list li {
        margin-bottom: 0.4rem;
    }

    .url-bar {
        font-size: 0.66rem;
    }

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

    .step-list {
        margin-left: 1rem;
    }

    pre code,
    .code-block {
        font-size: 0.78rem;
        line-height: 1.45;
    }

    #scroll-top-btn {
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }
}

@media (max-width: 380px) {
    .hero-actions {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.42rem;
    }

    .bento-item p,
    .feature-list li,
    .step-list,
    .alert p {
        font-size: 0.88rem;
    }

    .url-bar {
        display: none;
    }
}