:root {
    --bg-color: #0a0e17;
    --text-primary: #ffffff;
    --text-secondary: #adbdcc;
    --accent-primary: #635bff;
    --accent-secondary: #00d4ff;
    --accent-tertiary: #ff4d4d;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Gradient Background */
.gradient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background:
        radial-gradient(circle at 15% 50%, rgba(99, 91, 255, 0.15) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 25%);
    z-index: -1;
    pointer-events: none;
}

.gradient-bg::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 60%;
    height: 80%;
    background: conic-gradient(from 180deg at 50% 50%, #635bff 0deg, #00d4ff 180deg, #635bff 360deg);
    filter: blur(120px);
    opacity: 0.2;
    transform: rotate(-15deg);
    z-index: -1;
    pointer-events: none;
}

/* Layout */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(10, 14, 23, 0.8);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.nav-links a:hover {
    opacity: 0.7;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(99, 91, 255, 0.2);
    color: #80bfff;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(99, 91, 255, 0.3);
}

h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
}

.text-gradient {
    background: linear-gradient(90deg, #00d4ff, #635bff);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 480px;
}

.cta-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 24px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 91, 255, 0.3);
}

.btn-text {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--accent-secondary);
}

/* Hero Visual (Glass Card) */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.glass-card:hover {
    transform: rotateY(0) rotateX(0);
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.card-header span {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.code-preview {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    color: #d6deeb;
}

.line {
    margin-bottom: 4px;
}

.indent {
    padding-left: 20px;
}

.keyword {
    color: #c792ea;
}

.variable {
    color: #d6deeb;
}

.string {
    color: #ecc48d;
}

.class {
    color: #ffcb6b;
}

.property {
    color: #82aaff;
}

.boolean {
    color: #f78c6c;
}

.function {
    color: #82aaff;
}

.comment {
    color: #637777;
    font-style: italic;
}

.floating-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: #1a1f2e;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating-badge .icon {
    font-size: 1.5rem;
}

.floating-badge .text {
    display: flex;
    flex-direction: column;
}

.floating-badge .label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.floating-badge .value {
    font-weight: 700;
    color: #27c93f;
}

/* Tech Stack */
.tech-stack {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-label {
    text-align: center;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    text-align: center;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.tech-item:hover {
    opacity: 1;
}

.footer-logo {
    font-weight: 700;
    color: var(--text-secondary);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Tech Icons */
.tech-icon-wrapper {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: transform 0.3s, background 0.3s;
}

.tech-item:hover .tech-icon-wrapper {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.tech-icon {
    width: 32px;
    height: 32px;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* AI Tutorial Section - Sticky Scroll Layout */
.tutorial {
    padding: 100px 0;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 91, 255, 0.05) 50%, transparent 100%);
}

.tutorial-container {
    display: flex;
    gap: 60px;
    position: relative;
}

.steps-column {
    flex: 1;
    padding-bottom: 100px;
}

.visual-column {
    flex: 1;
    position: sticky;
    top: 120px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.step-block {
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    opacity: 0.3;
    transition: opacity 0.5s, transform 0.5s;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
    margin-left: 20px;
}

.step-block.active {
    opacity: 1;
    border-left-color: var(--accent-secondary);
    transform: translateX(10px);
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
    margin-bottom: 20px;
}

.step-block.active .step-number {
    color: var(--accent-secondary);
    opacity: 0.2;
}

.step-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.step-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    line-height: 1.8;
}

.step-tip {
    background: rgba(255, 189, 46, 0.1);
    border: 1px solid rgba(255, 189, 46, 0.3);
    color: #ffbd2e;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}

.tutorial-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    transform: scale(0.95);
}

.tutorial-img.active {
    opacity: 1;
    transform: scale(1);
}

/* Bookmarklet Generator Styles */
.generator-section {
    background: rgba(13, 17, 23, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 60px 40px;
    margin-top: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.generator-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 91, 255, 0.1) 0%, transparent 70%);
    animation: rotate 10s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.generator-content {
    position: relative;
    z-index: 1;
}

.input-group {
    max-width: 600px;
    margin: 40px auto;
}

.api-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    padding: 20px 24px;
    border-radius: 16px;
    color: var(--text-primary);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.api-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 91, 255, 0.2);
}

.code-box {
    background: #0d1117;
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
    border: 1px solid var(--glass-border);
    text-align: left;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.code-content {
    font-family: 'Fira Code', monospace;
    color: #e6edf3;
    font-size: 0.85rem;
    word-break: break-all;
    line-height: 1.5;
}

.copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.hidden {
    display: none;
}

/* Mobile Menu Active State */
.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.95);
    padding: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    h1 {
        font-size: 3rem;
    }

    .hero p {
        margin: 0 auto 40px;
    }

    .cta-group {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 60px;
        transform: none;
    }

    .glass-card {
        transform: none;
    }

    .glass-card:hover {
        transform: none;
    }

    .tutorial-container {
        flex-direction: column;
    }

    .visual-column {
        position: relative;
        top: 0;
        height: 300px;
        margin-bottom: 40px;
    }

    .step-block {
        min-height: auto;
        padding: 20px;
        margin-bottom: 40px;
        opacity: 1;
    }
}