/* === Style Version: v4.2.0 === */

/* --- Root Variables --- */
:root {
    --sky-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --deep-black: #0e0e0e;
    --card-bg: #141414;
    --neon-blue: #00f2ff;
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-muted: #8b9cb5;
    --premium-gradient: linear-gradient(135deg, #FFD700, #FDB931);
    --card-bg-premium: #141414;
    --neon-purple: #A020F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    min-width: 0;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--deep-black);
    color: white;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
    /* System font fallback: page renders immediately even before Outfit loads */
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 40px);
}

/* --- Hero Background --- */
.hero-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 100vh;
    background: linear-gradient(to bottom, #001233, #004663, #00b4d8);
    z-index: -1;
    overflow: hidden;
}

#network-canvas {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

.glass-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(0,0,0,0.3) 100%);
}

/* --- Navbar --- */
.navbar {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    position: fixed;
    width: 100%;
    max-width: 100%;
    top: 0;
    z-index: 1000;
    /* تمت إزالة overflow: hidden لكي لا يتم قص القائمة الجانبية */
}

.nav-container {
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: white;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-img { width: 36px; height: 36px; }

/* Desktop Nav Links */
.nav-links-desktop {
    display: none;
    list-style: none;
    align-items: center;
    gap: 4px;
}

@media (min-width: 900px) {
    .nav-links-desktop { display: flex; }
    .hamburger { display: none; }
}

.nav-link-desktop {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link-desktop:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

.nav-link-desktop.premium-link {
    color: var(--neon-blue);
    border: 1px solid rgba(0,242,255,0.3);
}

.nav-link-desktop.premium-link:hover {
    background: rgba(0,242,255,0.1);
}

/* =============================================
   SIDEBAR — Full Redesign
   ============================================= */

/* Overlay backdrop */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}
.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Sidebar panel */
.nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    transform: translateX(110%);
    width: 100%;
    height: 100vh;
    background: #000;
    border-left: none;
    display: flex;
    flex-direction: column;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: none;
    z-index: 999;
    overflow: hidden;
}

.nav-menu::before { display: none; }
.nav-menu::after  { display: none; }

.nav-menu.active { transform: translateX(0); }

/* ---- Sidebar Header ---- */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 18px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    gap: 12px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    text-decoration: none;
}

.sidebar-brand img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---- Sidebar Nav ---- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sidebar-nav::-webkit-scrollbar { width: 0; }

.sidebar-section-label { display: none; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 18px 0;
    border-radius: 0;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: transparent !important;
}

.nav-link:last-child { border-bottom: none; }

.nav-link i { display: none; }

.nav-link span {
    flex: 1;
}

.nav-link:hover {
    color: #fff;
    background: transparent !important;
    border-color: rgba(255,255,255,0.07);
    transform: none;
    box-shadow: none;
}

.nav-link:hover i { color: transparent; }

/* Active state */
.nav-link.active {
    color: var(--neon-blue);
    background: transparent !important;
    border-color: rgba(255,255,255,0.07);
}

.nav-link.active i { color: transparent; }

/* Premium link */
.nav-link--premium {
    color: #FFD700 !important;
    background: transparent !important;
    border-color: rgba(255,255,255,0.07) !important;
}

.nav-link--premium i { display: none !important; }

.nav-link--premium:hover {
    background: transparent !important;
    border-color: rgba(255,255,255,0.07) !important;
}

/* PRO badge */
.sidebar-badge {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #FFD700;
    background: rgba(255,215,0,0.12);
    border: 1px solid rgba(255,215,0,0.3);
    padding: 2px 8px;
    border-radius: 100px;
    margin-left: 10px;
}

/* ---- Sidebar Footer ---- */
.sidebar-footer {
    padding: 20px 16px 28px;
    border-top: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-login-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 14px !important;
    background: #1d6bf5 !important;
    border: 1px solid #1d6bf5 !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    letter-spacing: 0.02em !important;
    transition: all 0.25s ease !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 24px rgba(29, 107, 245, 0.25) !important;
    cursor: pointer !important;
}

.sidebar-login-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
    pointer-events: none;
}

.sidebar-login-btn:hover::after { opacity: 1; }

.sidebar-login-btn:hover {
    background: #1a60e0 !important;
    border-color: #1a60e0 !important;
    box-shadow: 0 0 28px rgba(29,107,245,0.4), 0 8px 32px rgba(0,0,0,0.4) !important;
    transform: translateY(-1px) !important;
}

.sidebar-login-btn i {
    font-size: 0.9rem !important;
    color: #fff !important;
    flex-shrink: 0 !important;
}

.sidebar-login-btn span {
    flex: unset !important;
    color: #fff !important;
}

.sidebar-arrow {
    margin-left: auto !important;
    color: rgba(255,255,255,0.4) !important;
    font-size: 0.75rem !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

.sidebar-login-btn:hover .sidebar-arrow {
    transform: translateX(4px) !important;
    color: var(--neon-blue) !important;
}

/* Hamburger */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
    /* Min 44×44px touch target — prevents "Tap targets too small" PageSpeed warning */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-right: -8px; /* Compensate padding so visual position doesn't shift */
}

.bar {
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: 0.3s;
}

.hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* --- Navbar Login Button --- */
.nav-login-btn {
    display: none;
    align-items: center;
    gap: 7px;
    padding: 8px 20px;
    border-radius: 100px;
    background: #1d6bf5;
    border: 1px solid #1d6bf5;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-login-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.1);
    opacity: 0;
    transition: opacity 0.25s ease;
    border-radius: inherit;
}

.nav-login-btn:hover::before { opacity: 1; }

.nav-login-btn:hover {
    background: #1a60e0;
    border-color: #1a60e0;
    box-shadow: 0 0 20px rgba(29, 107, 245, 0.4), 0 4px 20px rgba(0,0,0,0.3);
    color: #fff;
    transform: translateY(-1px);
}

.nav-login-btn i {
    font-size: 0.8rem;
    color: #fff;
}

@media (min-width: 900px) {
    .nav-login-btn { display: inline-flex; }
}

@media (max-width: 899px) {
    .nav-login-btn {
        display: inline-flex;
        padding: 7px 14px;
        font-size: 0.8rem;
    }
}

/* Mobile Login Item */
.nav-login-mobile-item {
    margin-top: 16px !important;
    padding-top: 16px;
    border-top: 1px solid rgba(0,242,255,0.1);
}

.nav-link-login-mobile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0,242,255,0.1) 0%, rgba(88,101,242,0.08) 100%);
    border: 1px solid rgba(0,242,255,0.25);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link-login-mobile i {
    color: var(--neon-blue);
    font-size: 0.9rem;
}

.nav-link-login-mobile:hover {
    background: linear-gradient(135deg, rgba(0,242,255,0.18) 0%, rgba(88,101,242,0.15) 100%);
    border-color: rgba(0,242,255,0.5);
    box-shadow: 0 0 16px rgba(0,242,255,0.12);
    color: #fff;
}


.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 72px;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 860px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content > p { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .chat-preview-3d { margin: 30px auto 0; transform: none; max-width: 360px; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,242,255,0.1);
    border: 1px solid rgba(0,242,255,0.25);
    color: var(--neon-blue);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
}

.hero-content h1 {
    font-size: clamp(2rem, 5.5vw, 3.6rem);
    line-height: 1.1;
    margin-bottom: 1.2rem;
    font-weight: 800;
}

.hero-content h1 span {
    background: linear-gradient(120deg, #fff, #b3e5fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content > p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #ffffff;
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 480px;
    /* Simplified to single-layer shadow — 3-layer shadow was expensive on mobile */
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Buttons */
.hero-buttons {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(0.9rem, 2vw, 1rem);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.btn-white {
    background: white;
    color: #004663;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.35);
    border: none;
}

.btn-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.55);
}

/* Chat Preview */
.chat-preview-3d {
    background: #2b2d31;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: -20px 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.chat-preview-3d:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.chat-header {
    background: #1e1f22;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.3);
    border-radius: 16px 16px 0 0;
}

.chat-icon-free { width: 34px; border-radius: 0; }
.chat-meta { display: flex; flex-direction: column; }
.bot-name { font-weight: 700; font-size: 0.95rem; color: white; }
.bot-status { font-size: 0.72rem; color: #b5bac1; }
.bot-status i { color: #23a559; font-size: 0.55rem; margin-right: 4px; }

.chat-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    background: #313338;
    border-radius: 0 0 16px 16px;
}

.msg { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.bot-av-free { border-radius: 0; object-fit: contain; }

.content { display: flex; flex-direction: column; }
.name { font-size: 0.88rem; font-weight: 600; color: white; margin-bottom: 4px; }

.app-tag {
    background: #5865F2;
    color: white;
    font-size: 0.63rem;
    padding: 2px 5px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.bubble { color: #dbdee1; font-size: 0.9rem; line-height: 1.5; }

.typing-dots { margin-top: 10px; display: flex; gap: 4px; }
.typing-dots span {
    display: inline-block;
    width: 7px; height: 7px;
    background: #80848e;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 100% { opacity: 0.3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* --- Transition --- */
.transition-fade {
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--deep-black));
    margin-top: -150px;
    position: relative;
    z-index: 2;
}

/* --- Dark Sections --- */
.features-dark, .commands-section, .developer-section {
    background: var(--deep-black);
    padding: clamp(60px, 8vw, 100px) 0;
    position: relative;
    z-index: 3;
    overflow: hidden;
}

/* Ambient glow orbs in background */
.features-dark::before {
    content: '';
    position: absolute;
    top: 10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0,242,255,0.04) 0%, transparent 65%);
    pointer-events: none;
    border-radius: 50%;
    animation: driftOrb 12s ease-in-out infinite alternate;
}

.features-dark::after {
    content: '';
    position: absolute;
    bottom: 5%;
    right: -8%;
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(88,101,242,0.05) 0%, transparent 65%);
    pointer-events: none;
    border-radius: 50%;
    animation: driftOrb 16s ease-in-out infinite alternate-reverse;
}

@keyframes driftOrb {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 30px) scale(1.15); }
}

.section-header { text-align: center; margin-bottom: clamp(40px, 6vw, 60px); }
.section-title.dark-mode { color: white; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 10px; }
.section-subtitle { color: #888; font-size: clamp(0.9rem, 2vw, 1rem); }

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: clamp(16px, 3vw, 30px);
}

/* Neural Cards — Glowing Modern Style v3 */
.neural-card {
    background: linear-gradient(160deg, #0d0d0f 0%, #111216 50%, #0a0a0d 100%);
    border: 1px solid rgba(0, 242, 255, 0.08);
    padding: clamp(28px, 4vw, 40px) clamp(22px, 4vw, 32px);
    border-radius: 20px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    backdrop-filter: blur(10px);
    box-shadow:
        0 2px 0 rgba(255,255,255,0.03) inset,
        0 -1px 0 rgba(0,0,0,0.8) inset,
        0 8px 32px rgba(0,0,0,0.6),
        0 2px 8px rgba(0,0,0,0.9);
}

/* Ambient glow blob inside card */
.neural-card::after {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0,242,255,0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.5s ease;
    opacity: 0.6;
}

.neural-card::before {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(88,101,242,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.neural-card:hover::before { opacity: 1; }

.neural-card:hover {
    transform: translateY(-10px);
    border-color: rgba(0,242,255,0.2);
    background: linear-gradient(160deg, #0f1014 0%, #131519 50%, #0c0c10 100%);
    box-shadow:
        0 2px 0 rgba(0,242,255,0.06) inset,
        0 -1px 0 rgba(0,0,0,0.9) inset,
        0 0 0 1px rgba(0,242,255,0.07),
        0 30px 60px rgba(0,0,0,0.7),
        0 0 40px rgba(0,242,255,0.07),
        0 0 80px rgba(0,100,255,0.04);
}

.card-visual {
    height: 56px;
    width: 56px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
    background: linear-gradient(145deg, #0d1a1f 0%, #081015 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 255, 0.15);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.5),
        0 0 20px rgba(0,242,255,0.08),
        inset 0 1px 0 rgba(0,242,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.6);
}

.neural-node {
    width: 15px; height: 15px;
    background: var(--neon-blue);
    border-radius: 50%;
    box-shadow: 0 0 15px var(--neon-blue);
}
.neural-node.pulse { animation: nodePulse 2s infinite; }
@keyframes nodePulse { 0% { box-shadow: 0 0 0 0 rgba(0,242,255,0.7); } 100% { box-shadow: 0 0 0 12px transparent; } }

.pixel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.pixel-grid span { width: 10px; height: 10px; background: var(--neon-blue); opacity: 0.6; border-radius: 2px; }
.pixel-grid span:nth-child(1) { animation: fadePixel 1s infinite alternate; }
.pixel-grid span:nth-child(4) { animation: fadePixel 1.5s infinite alternate-reverse; }
@keyframes fadePixel { to { opacity: 0.2; } }

.hex-tech {
    font-size: 2rem; color: var(--neon-blue);
    border: 2px solid #333; padding: 10px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(0,242,255,0.05);
}

.identity-ring {
    width: 40px; height: 40px; border: 2px solid var(--neon-blue);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.inner-dot { width: 10px; height: 10px; background: white; border-radius: 50%; }

.feature-card h3 {
    margin-bottom: 12px;
    color: #f0f4ff;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-start;
    font-size: clamp(1.05rem, 2vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-shadow: 0 0 20px rgba(0,242,255,0.15);
}
.feature-card p {
    color: #5a6478;
    line-height: 1.75;
    font-size: clamp(0.88rem, 1.5vw, 0.95rem);
    font-weight: 400;
}

/* --- Tools Grid --- */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: clamp(14px, 2.5vw, 25px);
}

.tool-item {
    background: linear-gradient(155deg, #0c0c0f 0%, #101115 50%, #090910 100%);
    padding: clamp(24px, 4vw, 32px);
    border-radius: 20px;
    border: 1px solid rgba(0, 242, 255, 0.07);
    text-align: center;
    transition: all 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.025) inset,
        0 -1px 0 rgba(0,0,0,0.8) inset,
        0 8px 30px rgba(0,0,0,0.55),
        0 2px 6px rgba(0,0,0,0.8);
}

.tool-item::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-item:hover {
    border-color: rgba(0,242,255,0.2);
    transform: translateY(-8px);
    background: linear-gradient(155deg, #0f1014 0%, #131619 50%, #0c0c11 100%);
    box-shadow:
        0 2px 0 rgba(0,242,255,0.05) inset,
        0 -1px 0 rgba(0,0,0,0.9) inset,
        0 0 0 1px rgba(0,242,255,0.06),
        0 24px 50px rgba(0,0,0,0.65),
        0 0 30px rgba(0,242,255,0.07);
}

.tool-item:hover::after { opacity: 1; }

.tool-item i {
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: var(--neon-blue);
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #0d1a1f 0%, #081015 100%);
    border-radius: 16px;
    border: 1px solid rgba(0,242,255,0.14);
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.6),
        0 0 18px rgba(0,242,255,0.07),
        inset 0 1px 0 rgba(0,242,255,0.07);
}
.tool-item h4 { color: #eef2ff; font-size: clamp(1rem, 2vw, 1.15rem); margin-bottom: 10px; font-weight: 700; text-shadow: 0 0 20px rgba(0,242,255,0.1); }
.tool-item p { color: #4e5a6e; font-size: clamp(0.82rem, 1.5vw, 0.9rem); line-height: 1.65; }

/* --- Commands --- */
.commands-full-list { margin-top: 20px; }

.category-block { margin-bottom: clamp(28px, 5vw, 40px); }

.category-block h3 {
    color: white;
    border-bottom: 1px solid #242424;
    padding-bottom: 12px;
    margin-bottom: 18px;
    font-size: clamp(1.1rem, 2.5vw, 1.3rem);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-block h3 i { color: var(--neon-blue); }

.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: clamp(10px, 2vw, 15px);
}

.cmd-card-mini {
    background: linear-gradient(135deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 14px 18px;
    border-radius: 13px;
    transition: all 0.25s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.cmd-card-mini::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--neon-blue), #5865F2);
    border-radius: 13px 0 0 13px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.cmd-card-mini:hover {
    border-color: rgba(0,242,255,0.2);
    transform: translateY(-3px) translateX(3px);
    background: linear-gradient(135deg, rgba(0,242,255,0.05) 0%, rgba(88,101,242,0.03) 100%);
    box-shadow: 0 8px 24px rgba(0,242,255,0.08), inset 0 1px 0 rgba(255,255,255,0.06);
}

.cmd-card-mini:hover::before { opacity: 1; }

.cmd-card-mini code {
    color: var(--neon-blue);
    font-family: monospace;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    font-size: clamp(0.85rem, 1.8vw, 0.95rem);
}

.cmd-card-mini p { color: #888; font-size: clamp(0.8rem, 1.5vw, 0.85rem); margin: 0; }

/* --- Docs Grid --- */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: clamp(10px, 1.5vw, 16px);
    position: relative;
    padding-bottom: 2px;
}

/* Separator fade at bottom of docs section */
.docs-grid::after {
    content: '';
    position: absolute;
    bottom: -clamp(30px, 5vw, 50px);
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,242,255,0.25), rgba(88,101,242,0.2), transparent);
}

.doc-card {
    background: linear-gradient(155deg, #0c0c0f 0%, #101115 50%, #090910 100%);
    border: 1px solid rgba(0,242,255,0.07);
    padding: clamp(20px, 3vw, 26px);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 0 rgba(255,255,255,0.025) inset,
        0 6px 24px rgba(0,0,0,0.55);
}

/* Glow blob per card */
.doc-card::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(0,242,255,0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Last doc card — extra glow to blend into section edge */
.doc-card:last-child {
    border-color: rgba(0,242,255,0.12);
    box-shadow:
        0 2px 0 rgba(255,255,255,0.03) inset,
        0 6px 24px rgba(0,0,0,0.55),
        0 0 30px rgba(0,242,255,0.05);
}

.doc-card:hover {
    border-color: rgba(0,242,255,0.2);
    transform: translateY(-5px);
    background: linear-gradient(155deg, #0f1014 0%, #131619 50%, #0c0c11 100%);
    box-shadow:
        0 2px 0 rgba(0,242,255,0.05) inset,
        0 20px 40px rgba(0,0,0,0.6),
        0 0 25px rgba(0,242,255,0.06);
}

.doc-card:hover::after { opacity: 1; }

.doc-card h4 {
    color: white;
    font-size: clamp(1rem, 2vw, 1.15rem);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.doc-card h4 i { color: var(--neon-blue); }
.doc-card p { color: #aaa; line-height: 1.7; font-size: clamp(0.88rem, 1.6vw, 0.95rem); }
.doc-card code {
    background: rgba(0,0,0,0.3);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--neon-blue);
    font-family: monospace;
    font-size: 0.88em;
}

/* --- Discord Demo Section --- */
.discord-demo-section { padding-bottom: clamp(60px, 8vw, 100px); }

.demo-window-wrapper {
    position: relative;
    max-width: 1060px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.demo-glow {
    position: absolute;
    inset: -30px;
    background: radial-gradient(ellipse at 50% 50%, rgba(88,101,242,0.15) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 30px;
}

.discord-app-window {
    display: flex;
    height: clamp(420px, 55vw, 600px);
    background-color: #313338;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
    border: 1px solid #1e1f22;
    font-family: 'Outfit', sans-serif;
    position: relative;
    z-index: 1;
}

/* Sidebar */
.discord-sidebar {
    width: 230px;
    background-color: #2b2d31;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease;
}

.server-header {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.92rem;
    color: #f2f3f5;
    box-shadow: 0 1px 0 rgba(4,4,5,0.3);
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.server-header:hover { background-color: #35373c; }

.channels-list {
    flex: 1;
    padding: 12px 6px;
    overflow-y: auto;
    overflow-x: hidden;
}

.channels-list::-webkit-scrollbar { width: 4px; }
.channels-list::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 2px; }

.channel-category {
    font-size: 11px;
    font-weight: 700;
    color: #949ba4;
    padding-left: 18px;
    margin-bottom: 4px;
    letter-spacing: 0.05em;
}

.channel-category.margin-top { margin-top: 16px; }

.channel-item {
    display: flex;
    align-items: center;
    padding: 7px 8px;
    margin-bottom: 2px;
    border-radius: 6px;
    color: #949ba4;
    cursor: pointer;
    font-weight: 500;
    font-size: 14.5px;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
}

.channel-item i { margin-right: 6px; font-size: 16px; color: #80848e; flex-shrink: 0; }
.channel-item span { overflow: hidden; text-overflow: ellipsis; }
.channel-item:hover { background-color: #35373c; color: #dbdee1; }
.channel-item.active { background-color: #404249; color: white; }
.channel-item.active i { color: #dbdee1; }

/* User Area */
.user-area {
    background-color: #232428;
    height: 52px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-area-avatar { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.user-details { flex: 1; display: flex; flex-direction: column; font-size: 12.5px; overflow: hidden; }
.username { font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.discriminator { color: #949ba4; font-size: 10.5px; }
.user-icons { display: flex; gap: 8px; color: #b5bac1; font-size: 16px; }
.user-icons i { cursor: pointer; transition: 0.2s; }
.user-icons i:hover { color: white; }

/* Chat Area */
.discord-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #313338;
    min-width: 0;
}

.chat-header-bar {
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 0 rgba(4,4,5,0.3);
    color: #80848e;
    flex-shrink: 0;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    gap: 0;
    overflow: hidden;
    flex: 1;
}

.header-left i { margin-right: 8px; color: #80848e; font-size: 18px; flex-shrink: 0; }
.header-left > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topic {
    margin-left: 12px;
    padding-left: 12px;
    border-left: 1px solid #40434a;
    font-weight: 400;
    color: #949ba4;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}
.header-icons i:hover { color: #dbdee1; }

.search-bar-fake {
    background: #1e1f22;
    height: 24px;
    width: 130px;
    border-radius: 4px;
    font-size: 12.5px;
    padding: 2px 8px;
    color: #949ba4;
    display: flex;
    align-items: center;
}

/* Messages */
.messages-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: clamp(12px, 3vw, 20px) clamp(10px, 2.5vw, 16px);
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.messages-wrapper::-webkit-scrollbar { width: 6px; }
.messages-wrapper::-webkit-scrollbar-track { background: #2b2d31; }
.messages-wrapper::-webkit-scrollbar-thumb { background: #1a1b1e; border-radius: 3px; }

.message-group {
    display: flex;
    gap: 14px;
    animation: msgSlideIn 0.25s ease;
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.msg-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.msg-avatar:hover { opacity: 0.8; }

.msg-content { display: flex; flex-direction: column; min-width: 0; }

.msg-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.msg-author { font-weight: 500; color: white; cursor: pointer; font-size: 15px; }
.msg-author.bot { color: #00aff4; }
.msg-author:hover { text-decoration: underline; }
.msg-timestamp { font-size: 11px; color: #949ba4; }

.bot-tag {
    background: #5865F2;
    color: white;
    font-size: 9.5px;
    padding: 1px 4px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    vertical-align: middle;
}

.msg-text {
    color: #dbdee1;
    font-size: clamp(13px, 2vw, 15px);
    line-height: 1.45;
    word-break: break-word;
}

/* Embed */
.discord-embed {
    background: #2b2d31;
    border-left: 4px solid #5865F2;
    padding: 12px;
    border-radius: 4px;
    margin-top: 8px;
    max-width: min(380px, 100%);
}

.embed-title { font-weight: 600; color: white; margin-bottom: 8px; font-size: 14px; }
.embed-desc { font-size: 13px; color: #dcddde; margin-bottom: 8px; }

.embed-image {
    margin-top: 8px;
    border-radius: 6px;
    max-width: 100%;
    display: block;
    max-height: 180px;
    object-fit: cover;
}

/* Input */
.input-area-wrapper { padding: 0 clamp(8px, 2vw, 16px) clamp(14px, 3vw, 22px); flex-shrink: 0; }

.chat-input {
    background: #383a40;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dbdee1;
}

.input-icons-left i { color: #b5bac1; font-size: 18px; cursor: pointer; }
.input-icons-left i:hover { color: #dbdee1; }
.input-placeholder { flex: 1; color: #5d6069; font-size: clamp(13px, 2vw, 15px); }
.input-icons-right { display: flex; gap: 10px; color: #b5bac1; font-size: 20px; cursor: pointer; }
.input-icons-right i:hover { color: #dbdee1; }

/* --- Discord Demo Responsive --- */
@media (max-width: 900px) {
    .topic { display: none; }
    .search-bar-fake { display: none; }
    .header-icons i:not(:last-child):not(:nth-last-child(2)) { display: none; }

    .discord-sidebar { width: 200px; }
}

@media (max-width: 700px) {
    .discord-app-window {
        height: clamp(380px, 70vw, 500px);
        border-radius: 8px;
    }

    .discord-sidebar {
        width: 52px;
    }

    .server-header span,
    .channel-category,
    .channel-item span,
    .user-details,
    .user-icons { display: none !important; }

    .channel-item {
        justify-content: center;
        padding: 10px 0;
        width: 36px;
        height: 36px;
        margin: 3px auto;
        border-radius: 50%;
    }

    .channel-item i { margin: 0; font-size: 17px; }

    .channel-item.active {
        background-color: #5865F2;
        border-radius: 12px;
    }

    .channels-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px 0;
    }

    .user-area { justify-content: center; padding: 0; }

    .header-icons { display: none; }

    .input-icons-right { display: none; }

    .msg-avatar { width: 32px; height: 32px; }

    .server-header {
        justify-content: center;
        height: 48px;
    }

    .server-header i { margin: 0; }
}

@media (max-width: 450px) {
    .discord-app-window { border-radius: 6px; }
    .discord-sidebar { width: 44px; }
    .channel-item { width: 32px; height: 32px; }
    .channel-item i { font-size: 15px; }
    .input-icons-left { display: none; }
}

/* --- Footer --- */
.modern-footer {
    background:
        linear-gradient(to bottom, rgba(6,6,6,0.55) 0%, rgba(6,6,6,0.70) 100%),
        url('assets/a_digital_background_illustration_features_a_soft.png') center center / cover no-repeat;
    border-top: 1px solid #1a1a1a;
    padding-top: clamp(50px, 8vw, 80px);
    padding-bottom: 30px;
    position: relative;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: clamp(20px, 4vw, 40px);
    margin-bottom: 50px;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 14px;
}

.footer-logo img { width: 32px; height: 32px; }

.brand-col p {
    color: #c8d8e8;
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(0, 180, 216, 0.3);
}

.footer-social-icons a {
    width: 36px; height: 36px;
    background: #111;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    margin-right: 8px;
    transition: all 0.3s;
    text-decoration: none;
    font-size: 0.95rem;
}

.footer-social-icons a:hover { background: var(--neon-blue); color: #000; transform: translateY(-2px); }

.footer-col h4 { color: white; margin-bottom: 18px; font-size: 0.95rem; font-weight: 600; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }

.footer-col ul li a {
    color: #999;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-col ul li a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    padding-top: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.88rem;
}

/* --- Main Responsive Breakpoints --- */
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn-pill { width: 100%; max-width: 320px; }
    .nav-menu { width: 100%; }
}

@media (max-width: 400px) {
    .chat-preview-3d { max-width: 100%; }
}

/* --- Premium Styles (kept for /premium page) --- */
.premium-page-wrapper { padding-top: 100px; padding-bottom: 80px; position: relative; z-index: 2; }

.lang-toggle-container { position: absolute; top: 100px; right: 20px; z-index: 10; }
html[dir="rtl"] .lang-toggle-container { right: auto; left: 20px; }

.lang-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lang-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--neon-blue); transform: translateY(-2px); }

.premium-hero { text-align: center; padding: 60px 0 80px; }
.premium-hero h1 { font-size: clamp(2rem, 6vw, 4rem); margin-bottom: 1.5rem; font-weight: 900; color: white; }
.premium-hero h1 span { background: linear-gradient(135deg, #5865F2, #A020F0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.premium-gem-styled {
    display: inline-block;
    background: var(--premium-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,215,0,0.5));
    animation: gem-float 4s ease-in-out infinite;
}
@keyframes gem-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.premium-hero p { color: #b0b0b0; font-size: clamp(1rem, 2.5vw, 1.2rem); max-width: 700px; margin: 0 auto; line-height: 1.7; }

.pricing-section { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; margin-bottom: 6rem; align-items: center; }
.plan-card {
    background: var(--card-bg-premium); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 24px; padding: 3rem; width: min(380px, 90vw); position: relative; transition: all 0.4s ease;
}
.plan-card:hover { transform: translateY(-10px); border-color: rgba(255,255,255,0.2); background: #1a1a1a; }
.plan-card.premium { border: 1px solid rgba(160,32,240,0.5); background: linear-gradient(160deg, #161824 0%, #1e1024 100%); box-shadow: 0 0 40px rgba(160,32,240,0.15); transform: scale(1.05); z-index: 2; }
.plan-card.premium:hover { transform: scale(1.08) translateY(-10px); }

.badge-recommended { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, #A020F0, #5865F2); padding: 6px 20px; border-radius: 30px; font-size: 0.8rem; font-weight: 800; color: #fff; box-shadow: 0 5px 15px rgba(160,32,240,0.4); letter-spacing: 1px; white-space: nowrap; }

.plan-header { text-align: center; margin-bottom: 2.5rem; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 2rem; }
.plan-price { font-size: 3rem; font-weight: 800; color: #fff; margin: 10px 0; }
.plan-features ul { list-style: none; }
.plan-features li { margin-bottom: 1.2rem; display: flex; align-items: center; gap: 12px; color: #ccc; font-size: 1rem; }
.plan-features li i { color: #5865F2; }
.plan-card.premium .plan-features li i { color: #D68AFF; }

.features-grid-title { text-align: center; margin-bottom: 4rem; font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 700; color: white; }
.features-grid-prem { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; margin-bottom: 6rem; }
.feature-box { background: var(--card-bg-premium); border: 1px solid rgba(255,255,255,0.08); padding: 2rem; border-radius: 20px; transition: 0.4s; position: relative; overflow: hidden; }
.feature-box:hover { transform: translateY(-5px); border-color: var(--neon-purple); box-shadow: 0 10px 30px rgba(160,32,240,0.15); }
.feature-box i { font-size: 2rem; color: #FFD700; margin-bottom: 1.2rem; display: block; }
.feature-box h4 { font-size: 1.4rem; margin-bottom: 0.8rem; color: #fff; }
.feature-box p { color: #b0b0b0; line-height: 1.7; }
.command-tag { background: rgba(160,32,240,0.15); padding: 4px 10px; border-radius: 6px; font-family: monospace; color: #D68AFF; font-size: 0.8rem; display: inline-block; margin-top: 10px; border: 1px solid rgba(160,32,240,0.2); }

.activation-card { background: linear-gradient(90deg, #161824 0%, #1e2030 100%); border: 1px solid rgba(255,255,255,0.05); padding: 3rem; border-radius: 24px; margin-top: 2rem; position: relative; overflow: hidden; }
.activation-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: #0070BA; }
html[dir="rtl"] .activation-card::before { left: auto; right: 0; }
.activation-card h3 { margin-bottom: 1.5rem; font-size: clamp(1.4rem, 3vw, 1.8rem); color: #fff; display: flex; align-items: center; gap: 15px; }

.btn-discord-cta { display: inline-flex; align-items: center; justify-content: center; gap: 12px; background-color: #5865F2; color: #fff; padding: 16px 40px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 1.1rem; margin-top: 30px; transition: 0.3s; box-shadow: 0 0 20px rgba(88,101,242,0.3); }
.btn-discord-cta:hover { background-color: #4752c4; transform: scale(1.05); box-shadow: 0 0 30px rgba(88,101,242,0.5); }

.tech-specs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.spec-item { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,0.05); padding: 8px 15px; border-radius: 50px; font-size: 0.88rem; color: var(--neon-blue); border: 1px solid rgba(0,242,255,0.2); }

@media (max-width: 768px) {
    .lang-toggle-container { top: 90px; right: 50%; transform: translateX(50%); }
    html[dir="rtl"] .lang-toggle-container { right: auto; left: 50%; transform: translateX(-50%); }
    .plan-card.premium { transform: scale(1); }
    .plan-card.premium:hover { transform: translateY(-10px); }
}

/* ================================================================
   PERFORMANCE PATCH v4.1
   Optimizations for PageSpeed Insights — LCP, INP, CLS, TTFB
   ================================================================ */

/* --- Content Visibility: Skip rendering off-screen sections ---
   Browser skips layout/paint for below-fold sections until they
   approach viewport. contain-intrinsic-size prevents CLS on reveal. */
.trusted-guilds-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 340px;
}
.discord-demo-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 700px;
}
#features.features-dark {
    content-visibility: auto;
    contain-intrinsic-size: 0 600px;
}
#tools.features-dark {
    content-visibility: auto;
    contain-intrinsic-size: 0 480px;
}
#commands.commands-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 900px;
}
#docs.developer-section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}
.modern-footer {
    content-visibility: auto;
    contain-intrinsic-size: 0 320px;
}

/* --- Layout Containment: isolate card-grid repaints ---
   Prevents style/layout changes inside grids from bubbling up. */
.features-grid,
.tools-grid,
.docs-grid,
.commands-full-list {
    contain: layout style;
}

/* --- Guilds Marquee: promote to GPU compositor layer ---
   Avoids expensive per-frame repaints during CSS animation. */
.guilds-marquee {
    backface-visibility: hidden;
    will-change: transform;
}

/* --- Navbar: contain internal layout changes --- */
.navbar {
    contain: layout;
}

/* --- Hero chat card: promote 3D transform to GPU --- */
.chat-preview-3d {
    transform: perspective(1000px) rotateY(-10deg) rotateX(5deg) translateZ(0);
    backface-visibility: hidden;
}

/* --- Reduce animation cost on low-power devices --- */
@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;
    }

    /* Hide canvas entirely — saves CPU/GPU on every frame */
    #network-canvas { display: none !important; }
    .glass-overlay { background: rgba(0, 0, 0, 0.2); }

    /* Disable scrolling marquee */
    .guilds-marquee {
        animation: none !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }
}

/* --- Mobile: disable heavy backdrop-filters to reduce paint cost --- */
@media (max-width: 768px) {
    .neural-card {
        backdrop-filter: none;
    }
    .btn-glass {
        backdrop-filter: none;
        background: rgba(255, 255, 255, 0.15);
    }
    /* Disable nav-menu backdrop-filter on mobile — expensive compositing */
    .nav-menu {
        backdrop-filter: none;
    }
    /* Disable driftOrb background animations — not visible on small screens,
       but still consume CPU/GPU every frame */
    .features-dark::before,
    .features-dark::after {
        animation: none;
    }
    /* Flatten 3D chat card — perspective transforms are expensive on mobile GPU */
    .chat-preview-3d {
        transform: none;
        transition: none;
    }
    .chat-preview-3d:hover {
        transform: none;
    }
}
