/* ===== RESET & VARIABLES ===== */
:root {
    --primary: #ff6b00;
    --primary-dark: #e65100;
    --primary-light: #ff8c40;
    --dark: #0a0a0a;
    --dark-800: #121212;
    --dark-700: #1a1a1a;
    --light: #ffffff;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --glass-bg: rgba(255, 107, 0, 0.03);
    --glass-border: rgba(255, 107, 0, 0.1);
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'Fira Code', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 15px;
}

body {
    font-family: var(--font-sans);
    background: var(--dark);
    color: var(--light);
    line-height: 1.5;
    overflow-x: hidden;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: var(--dark-800);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* ===== TYPOGRAPHY ===== */
.section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.section-title span {
    color: var(--primary);
}

.section-desc {
    text-align: center;
    color: var(--gray-500);
    max-width: 500px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
}

/* ===== LOADING ===== */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s;
}

.loading.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 35px;
    height: 35px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== PARTICLES ===== */
#particleCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.2;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 0.7rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.desktop-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--gray-400);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.btn-get-jpx {
    background: var(--primary);
    color: var(--dark);
    padding: 0.4rem 1.2rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
}

.btn-get-jpx:hover {
    background: var(--primary-light);
}

.menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 1001;
}

.menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    margin: 4px 0;
    transition: 0.2s;
}

.menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background: var(--dark-800);
    padding: 60px 1.5rem 1.5rem;
    z-index: 999;
    transition: 0.3s;
    border-left: 1px solid var(--glass-border);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-link {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.5rem;
    display: block;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
}

.mobile-get-jpx {
    background: var(--primary);
    color: var(--dark);
    padding: 0.7rem;
    border-radius: 3px;
    font-weight: 600;
    border: none;
    width: 100%;
    margin-top: 1rem;
    cursor: pointer;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 70px 5% 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    z-index: 2;
    position: relative;
}

.hero-badge {
    display: inline-block;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.3rem 1rem;
    border-radius: 3px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.jpx-title {
    color: var(--primary);
}

.hero-description {
    color: var(--gray-500);
    font-size: 0.95rem;
    max-width: 450px;
    margin-bottom: 1.5rem;
}

.hero-command {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 0.6rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.command-prompt {
    color: var(--primary);
    font-weight: 600;
}

.command-text {
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.command-copy {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0.2rem;
}

.command-copy:hover {
    color: var(--primary);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--dark);
    padding: 0.6rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    padding: 0.6rem 1.5rem;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--primary);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--dark);
}

.code-card {
    background: var(--dark-800);
    border-radius: 6px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.code-header {
    background: var(--dark-700);
    padding: 0.7rem 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border-bottom: 1px solid var(--glass-border);
}

.code-dots {
    display: flex;
    gap: 5px;
}

.code-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-title {
    color: var(--gray-500);
    font-size: 0.75rem;
    margin-left: auto;
}

.code-body {
    padding: 1rem;
    overflow-x: auto;
}

.code-body pre {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.4;
    min-width: 300px;
}

.keyword { color: var(--primary); }
.string { color: #98c379; }
.comment { color: #5c6370; font-style: italic; }

/* ===== ABOUT ===== */
.about {
    padding: 3rem 5%;
    z-index: 2;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.about-card {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 1.5rem;
}

.card-icon {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
}

.about-card h3 {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.about-card p {
    color: var(--gray-500);
    font-size: 0.85rem;
    line-height: 1.5;
}

.developer-box {
    text-align: center;
    padding: 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    max-width: 300px;
    margin: 0 auto;
    font-size: 0.9rem;
}

.developer-name {
    color: var(--primary);
}

/* ===== INSTALLATION ===== */
.installation {
    padding: 3rem 5%;
    z-index: 2;
    position: relative;
}

.install-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
}

.install-card {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 1.5rem;
    position: relative;
}

.install-card.highlight {
    border-color: var(--primary);
}

.install-badge {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--dark);
    padding: 0.2rem 1rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.install-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.8rem;
}

.install-card h3 {
    color: var(--primary);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.install-card p {
    color: var(--gray-500);
    text-align: center;
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
}

.install-steps {
    margin-bottom: 1.2rem;
}

.install-step {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
    color: var(--gray-400);
    font-size: 0.85rem;
}

.step-number {
    width: 20px;
    height: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--primary);
}

.install-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-install {
    background: transparent;
    color: var(--light);
    border: 1px solid var(--glass-border);
    padding: 0.5rem;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.85rem;
    text-align: center;
    transition: 0.2s;
}

.btn-install:hover {
    border-color: var(--primary);
}

.install-note-small {
    color: var(--gray-600);
    font-size: 0.75rem;
    text-align: center;
    margin-top: 0.8rem;
}

.install-command-large {
    background: var(--dark-700);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.install-command-large code {
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    word-break: break-all;
}

.copy-btn {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: auto;
}

.copy-btn:hover {
    color: var(--primary);
}

.version-info {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.version-badge {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 0.3rem 1rem;
    border-radius: 3px;
    color: var(--gray-400);
    font-size: 0.8rem;
}

.quick-command {
    max-width: 350px;
    margin: 0 auto;
}

.quick-command h3 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.8rem;
    text-align: center;
}

.command-block {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    padding: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.5rem;
}

.command-block code {
    color: var(--gray-300);
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.copy-small {
    background: transparent;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    margin-left: auto;
}

/* ===== SYNTAX ===== */
.syntax {
    padding: 3rem 5%;
    z-index: 2;
    position: relative;
}

.syntax-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.syntax-card {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    overflow: hidden;
}

.syntax-header {
    background: var(--dark-700);
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--glass-border);
}

.syntax-header h3 {
    color: var(--primary);
    font-size: 0.9rem;
}

.syntax-body {
    padding: 0.8rem;
    overflow-x: auto;
}

.syntax-body pre {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.4;
}

/* ===== COMMUNITY ===== */
.community {
    padding: 3rem 5%;
    z-index: 2;
    position: relative;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.community-card {
    background: var(--dark-800);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    padding: 1.2rem;
    text-align: center;
}

.community-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.community-card h3 {
    color: var(--primary);
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.community-card p {
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-bottom: 0.8rem;
}

.community-stats {
    color: var(--gray-400);
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
}

.community-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.8rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-800);
    padding: 2.5rem 5% 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo img {
    width: 24px;
    height: 24px;
}

.footer-logo span {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: 600;
}

.footer-section p {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.footer-credit {
    margin-top: 0.5rem;
}

.footer-section h3 {
    color: var(--primary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.4rem;
}

.footer-section a {
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.8rem;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    color: var(--gray-600);
    font-size: 0.75rem;
}

.footer-command {
    margin-top: 0.5rem;
    font-family: var(--font-mono);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    width: 35px;
    height: 35px;
    background: var(--primary);
    color: var(--dark);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 1rem;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: 0.2s;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .syntax-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .menu-btn {
        display: block;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .install-grid {
        grid-template-columns: 1fr;
    }
    
    .community-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
    }
}

@media (max-width: 600px) {
    .syntax-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .version-info {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
}