/* ==========================================================================
   BYTOGRAPHIA DESIGN SYSTEM & BRAND TOKENS
   ========================================================================== */

:root,
[data-theme="dark"] {
    color-scheme: dark;

    /* Core Palette */
    --bg-color: #09090b;
    --bg-elevated: #0d1117;
    --surface: #161b22;
    --surface-hover: #1b1a28;
    --surface-subtle: rgba(255, 255, 255, 0.02);
    --surface-glass: rgba(255, 255, 255, 0.04);
    --surface-glass-hover: rgba(255, 255, 255, 0.08);

    /* Typography Colors */
    --text-main: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #a1a1aa;
    --text-quote: #d1d5db;

    /* Brand Accents */
    --accent-purple: #8b5cf6;
    --accent-purple-hover: #7c3aed;
    --accent-lavender: #c4b5fd;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #fbbf24;

    /* Borders & Dividers */
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(139, 92, 246, 0.35);

    /* Navigation, Dropdown & Footer */
    --nav-bg: rgba(9, 9, 11, 0.82);
    --drawer-bg: #09090b;
    --footer-bg: linear-gradient(180deg, #0a0a0f 0%, #050507 100%);
    --dropdown-bg: #1c2128;
    --dropdown-hover: #2d333b;
    --dropdown-border: #30363d;
    --dropdown-text: #c9d1d9;
    --switch-bg: #30363d;
    --switch-active: #3b82f6;

    /* Form Surfaces */
    --input-bg: rgba(22, 27, 34, 0.78);
    --input-bg-focus: rgba(27, 26, 40, 0.92);
    --input-placeholder: #71717a;
    --select-option-bg: #161b22;
    --checkbox-bg: rgba(255, 255, 255, 0.05);

    /* Terminal & Code Surface */
    --terminal-bg: #0d1117;
    --terminal-header: #161b22;
    --terminal-text: #e6edf3;

    /* Effects & Shadows */
    --shadow-card: 0 10px 30px rgba(139, 92, 246, 0.08);
    --shadow-dropdown: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-terminal: 0 20px 40px rgba(0, 0, 0, 0.5);
    --glow-purple: 0 0 15px rgba(139, 92, 246, 0.4);
    --glow-blue: 0 0 15px rgba(59, 130, 246, 0.4);
    --spotlight-gradient: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(0, 0, 0, 0) 60%);
    --particle-dot: rgba(139, 92, 246, 0.12);

    /* Typography */
    --font-heading: 'Inter', sans-serif;
    --font-body: 'JetBrains Mono', 'Hind Siliguri', monospace;
    --font-mono: 'JetBrains Mono', monospace;
    --font-bn: 'Hind Siliguri', var(--font-body);

    /* Sizing & Radii */
    --btn-height: 44px;
    --btn-height-sm: 38px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 999px;
    --container-max: 1400px;
}

[data-theme="light"] {
    color-scheme: light;

    --bg-color: #f8fafc;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f1f5f9;
    --surface-subtle: rgba(15, 23, 42, 0.025);
    --surface-glass: rgba(15, 23, 42, 0.04);
    --surface-glass-hover: rgba(15, 23, 42, 0.08);

    --text-main: #0f172a;
    --text-secondary: #1e293b;
    --text-muted: #475569;
    --text-quote: #334155;

    --accent-purple: #7c3aed;
    --accent-purple-hover: #6d28d9;
    --accent-lavender: #6d28d9;
    --accent-blue: #2563eb;
    --accent-green: #059669;

    --border: rgba(15, 23, 42, 0.1);
    --border-strong: rgba(15, 23, 42, 0.18);
    --border-accent: rgba(124, 58, 237, 0.35);

    --nav-bg: rgba(248, 250, 252, 0.88);
    --drawer-bg: #ffffff;
    --footer-bg: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    --dropdown-bg: #ffffff;
    --dropdown-hover: #f1f5f9;
    --dropdown-border: rgba(15, 23, 42, 0.12);
    --dropdown-text: #334155;
    --switch-bg: #cbd5e1;

    /* Form Surfaces (Eye-comfort slate tint, zero harsh white glare) */
    --input-bg: rgba(241, 245, 249, 0.85);
    --input-bg-focus: rgba(226, 232, 240, 0.65);
    --input-placeholder: #64748b;
    --select-option-bg: #f1f5f9;
    --checkbox-bg: rgba(15, 23, 42, 0.06);

    --terminal-bg: #0f172a;
    --terminal-header: #1e293b;
    --terminal-text: #f8fafc;

    --shadow-card: 0 10px 30px rgba(15, 23, 42, 0.07);
    --shadow-dropdown: 0 12px 32px rgba(15, 23, 42, 0.12);
    --shadow-terminal: 0 20px 40px rgba(15, 23, 42, 0.16);
    --glow-purple: 0 4px 16px rgba(124, 58, 237, 0.25);
    --glow-blue: 0 4px 16px rgba(37, 99, 235, 0.25);
    --spotlight-gradient: radial-gradient(circle, rgba(124, 58, 237, 0.08) 0%, rgba(0, 0, 0, 0) 60%);
    --particle-dot: rgba(124, 58, 237, 0.14);
}

/* ================= RESET & BASE ================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background-color 0.25s ease, color 0.25s ease;
    animation: bytoPageFadeIn 0.35s ease-out both;
}

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

h1, h2, h3, h4, .logo-text, .nav-links a, .badge, button, .testimonial-info h4 {
    font-family: var(--font-heading);
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

.bn-text { font-family: var(--font-bn); }

/* ================= AMBIENT BACKGROUND UTILITIES ================= */
.particles-bg {
    position: fixed;
    inset: 0;
    background-image: radial-gradient(var(--particle-dot) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.4;
    pointer-events: none;
}

#spotlight {
    position: fixed;
    top: 0;
    left: 0;
    width: 800px;
    height: 800px;
    background: var(--spotlight-gradient);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.code-rain {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.code-rain span {
    position: absolute;
    top: -2rem;
    left: var(--x);
    color: rgba(167, 139, 250, 0.18);
    font: 400 var(--size) var(--font-mono);
    opacity: 0;
    animation: codeFall var(--duration) linear var(--delay) infinite;
}

.code-rain span:nth-child(5n) {
    color: rgba(126, 231, 135, 0.15);
}

/* ================= DESIGN SYSTEM UTILITIES ================= */
.glass-card {
    background: var(--surface-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(12px);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-card);
}

.neon-glow-purple {
    box-shadow: var(--glow-purple);
}

.neon-glow-blue {
    box-shadow: var(--glow-blue);
}

.gradient-text {
    background: linear-gradient(90deg, #a78bfa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    color: var(--accent-lavender);
    margin-bottom: 24px;
}

.badge .dot {
    width: 8px;
    height: 8px;
    background: var(--accent-purple);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* ================= BUTTONS ================= */
.btn-glow,
.btn-outline,
.btn-full,
.btn-outline-sm,
.lang-toggle,
.icon-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-glow {
    min-height: var(--btn-height);
    background: var(--accent-purple);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    background: var(--accent-purple-hover);
    transform: translateY(-2px);
    box-shadow: var(--glow-purple);
}

.btn-outline {
    min-height: var(--btn-height);
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-secondary);
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent-purple);
    color: var(--accent-lavender);
    background: rgba(139, 92, 246, 0.08);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
    transform: translateY(-2px);
}

.btn-full {
    flex: 1;
    min-height: var(--btn-height-sm);
    padding: 8px 14px;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-full:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    color: #ffffff;
}

.btn-outline-sm {
    min-height: var(--btn-height-sm);
    padding: 8px 15px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: 0.3s;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-outline-sm:hover {
    border-color: var(--accent-purple);
    color: var(--accent-lavender);
    background: rgba(139, 92, 246, 0.06);
}

.btn-glow::after,
.btn-outline::after,
.btn-full::after,
.btn-outline-sm::after,
.lang-toggle::after {
    content: '';
    position: absolute;
    top: -35%;
    left: -70%;
    width: 45%;
    height: 170%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: skewX(-20deg);
    animation: buttonShine 6s ease-in-out infinite;
    pointer-events: none;
}

/* ================= UNIFIED HEADER & NAVBAR ================= */
.announcement-bar {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.15));
    text-align: center;
    padding: 8px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 20;
    color: var(--text-main);
}

.announcement-bar span.ann-badge {
    color: var(--accent-purple);
    font-weight: 700;
}

.announcement-bar a {
    text-decoration: underline;
    color: var(--accent-lavender);
    margin-left: 6px;
    font-weight: 600;
}

.site-nav-wrapper {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    max-width: var(--container-max);
    margin: 0 auto;
    gap: 16px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.logo-container img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text-main);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
    align-items: center;
}

.nav-links a {
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: 0.25s ease;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    border-bottom-color: var(--accent-purple);
}

.nav-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.lang-toggle,
.theme-icon-btn {
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    transition: 0.3s;
    color: var(--text-main);
    cursor: pointer;
}

.lang-toggle {
    padding: 0 12px;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.theme-icon-btn {
    width: 36px;
    font-size: 0.95rem;
}

.lang-toggle:hover,
.theme-icon-btn:hover {
    background: var(--surface-glass-hover);
    border-color: var(--border-accent);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.nav-auth-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-purple);
    color: #ffffff;
    transition: 0.25s ease;
    white-space: nowrap;
}

.nav-auth-btn:hover {
    background: var(--accent-purple-hover);
    box-shadow: var(--glow-purple);
    transform: translateY(-1px);
}

/* Profile Dropdown */
.profile-menu-container {
    position: relative;
}

.user-profile-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid transparent;
    overflow: hidden;
}

.user-profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-profile-btn:hover {
    box-shadow: var(--glow-blue);
    transform: scale(1.05);
}

.profile-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    width: 270px;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    z-index: 120;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 18px;
    border-bottom: 1px solid var(--dropdown-border);
    font-family: var(--font-heading);
    color: var(--text-main);
}

.dropdown-header-name {
    font-weight: 700;
    font-size: 1rem;
    display: block;
}

.dropdown-header-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    color: var(--dropdown-text);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--dropdown-hover);
    color: var(--text-main);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 1rem;
    color: var(--text-muted);
}

.dropdown-item:hover i {
    color: var(--accent-purple);
}

.dropdown-divider {
    height: 1px;
    background: var(--dropdown-border);
    margin: 4px 0;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    cursor: pointer;
}

.theme-switch-wrapper:hover {
    background: var(--dropdown-hover);
}

.theme-switch-label {
    color: var(--dropdown-text);
    font-family: var(--font-heading);
    font-size: 0.92rem;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--switch-bg);
    transition: 0.35s;
    border-radius: 34px;
}

.slider::before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.35s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--switch-active);
}

input:checked + .slider::before {
    transform: translateX(22px);
}

/* ================= MOBILE DRAWER ================= */
.mobile-menu-btn {
    display: none;
    font-size: 1.35rem;
    cursor: pointer;
    color: var(--text-main);
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--surface-glass);
    border: 1px solid var(--border);
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100dvh;
    background: var(--drawer-bg);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 72px 0 24px;
    z-index: 100;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.45);
    overflow-y: auto;
}

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

.mobile-nav-links {
    display: flex;
    flex-direction: column;
}

.mobile-nav-links a {
    padding: 15px 24px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--text-main);
    background: rgba(139, 92, 246, 0.1);
    padding-left: 32px;
    border-left: 4px solid var(--accent-purple);
}

.mobile-drawer-controls {
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: auto;
    border-top: 1px solid var(--border);
}

.mobile-drawer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    transition: 0.25s;
}

.mobile-close-btn:hover {
    color: var(--text-main);
    background: var(--surface-glass-hover);
}

/* ================= UNIFIED FOOTER ================= */
.site-footer {
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    padding: 60px 5% 30px;
    margin-top: 100px;
    position: relative;
    z-index: 10;
    background: var(--footer-bg);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
    gap: 40px;
    margin-bottom: 45px;
}

.footer-logos {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.footer-logos img {
    height: 34px;
    width: auto;
    object-fit: contain;
}

.footer-brand h3 {
    font-size: 1.75rem;
    margin-bottom: 10px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.92rem;
    max-width: 320px;
    margin-bottom: 18px;
    line-height: 1.7;
}

.license-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: var(--accent-lavender);
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.08);
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    font-weight: 600;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col a {
    color: var(--text-muted);
    font-size: 0.92rem;
    transition: 0.25s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-col a:hover {
    color: var(--accent-purple);
}

.footer-contact li {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-contact i {
    color: var(--accent-purple);
    margin-top: 4px;
    font-size: 1.05rem;
}

.footer-socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-socials a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.3s ease;
    color: var(--text-muted);
    background: var(--surface-subtle);
}

.footer-socials a:hover {
    transform: translateY(-3px);
    border-color: transparent;
    color: #ffffff;
}

.footer-socials a[aria-label="Facebook"]:hover {
    background: #1877F2;
    box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.footer-socials a[aria-label="YouTube"]:hover {
    background: #FF0000;
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.4);
}

.footer-socials a[aria-label="GitHub"]:hover {
    background: #333333;
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.25);
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding-top: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ================= KEYFRAMES ================= */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeLeft { to { opacity: 1; transform: translateX(0); } }
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes buttonShine {
    0%, 78% { transform: translateX(0) skewX(-20deg); }
    100% { transform: translateX(380%) skewX(-20deg); }
}
@keyframes codeFall {
    0% { transform: translate3d(0, -5vh, 0); opacity: 0; }
    12% { opacity: 0.55; }
    88% { opacity: 0.4; }
    100% { transform: translate3d(0, 110vh, 0); opacity: 0; }
}

/* ================= GLOBAL FORM POLISH (GLASSMORPHISM & EYE-COMFORT) ================= */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]),
textarea,
select {
    background: var(--input-bg);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    outline: none;
}

input::placeholder,
textarea::placeholder {
    color: var(--input-placeholder);
    opacity: 1;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
textarea:focus,
select:focus {
    background: var(--input-bg-focus);
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
}

/* Eliminate Browser Autofill Harsh White/Yellow Backgrounds */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-main);
    caret-color: var(--text-main);
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset !important;
    box-shadow: 0 0 0 1000px var(--surface) inset !important;
    border: 1px solid var(--border-accent);
    transition: background-color 5000s ease-in-out 0s;
}

/* Custom Styled Glassmorphism Select Dropdown */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 38px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px 14px;
}

select option {
    background-color: var(--select-option-bg);
    color: var(--text-main);
    padding: 8px 12px;
}

/* Custom Eye-Comfort Checkbox (No Harsh White Box) */
input[type="checkbox"]:not(.theme-switch input) {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border-radius: 5px;
    border: 1.5px solid var(--border-strong);
    background-color: var(--checkbox-bg);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    vertical-align: middle;
    transition: all 0.2s ease;
    position: relative;
}

.theme-switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
}

input[type="checkbox"]:not(.theme-switch input)::before {
    content: "";
    width: 10px;
    height: 10px;
    transform: scale(0);
    transition: transform 0.16s ease-in-out;
    box-shadow: inset 1em 1em #ffffff;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:not(.theme-switch input):hover {
    border-color: var(--accent-purple);
    background-color: rgba(139, 92, 246, 0.12);
}

input[type="checkbox"]:not(.theme-switch input):checked {
    background-color: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.35);
}

input[type="checkbox"]:not(.theme-switch input):checked::before {
    transform: scale(1);
}

input[type="checkbox"]:not(.theme-switch input):focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}

/* ================= ONE-TIME GLOBAL POPUP MODAL ================= */
.byto-global-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 5, 10, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.byto-global-modal.active {
    opacity: 1;
    visibility: visible;
}

.byto-global-modal-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-xl);
    padding: 28px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 30px rgba(139, 92, 246, 0.18);
    position: relative;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.byto-global-modal.active .byto-global-modal-card {
    transform: scale(1) translateY(0);
}

.byto-global-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent-lavender);
    background: rgba(139, 92, 246, 0.14);
    border: 1px solid var(--border-accent);
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 14px;
}

.byto-global-modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.3;
}

.byto-global-modal-body {
    font-size: 0.94rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 22px;
}

.byto-global-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* ================= DUAL FLOATING WIDGET DOCK & MINI PANELS ================= */
.byto-floating-dock {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.byto-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.38);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}

.byto-fab:hover {
    transform: translateY(-3px) scale(1.06);
}

.byto-fab-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    box-shadow: 0 10px 26px rgba(139, 92, 246, 0.4);
}

.byto-fab-ai:hover {
    box-shadow: 0 14px 32px rgba(139, 92, 246, 0.58);
}

.byto-fab-support {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 10px 26px rgba(16, 185, 129, 0.38);
}

.byto-fab-support:hover {
    box-shadow: 0 14px 32px rgba(16, 185, 129, 0.55);
}

.byto-fab-tooltip {
    position: absolute;
    right: 62px;
    background: var(--dropdown-bg);
    color: var(--text-main);
    border: 1px solid var(--border-strong);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: var(--shadow-dropdown);
}

.byto-fab:hover .byto-fab-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.byto-mini-panel {
    position: fixed;
    right: 22px;
    bottom: 148px;
    width: 365px;
    max-width: calc(100vw - 28px);
    max-height: min(540px, calc(100dvh - 170px));
    background: var(--bg-elevated);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    box-shadow: 0 22px 55px rgba(0, 0, 0, 0.52);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 910;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

.byto-mini-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.byto-mini-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-glass);
    gap: 10px;
}

.byto-mini-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 700;
    font-size: 0.94rem;
    color: var(--text-main);
}

.byto-mini-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.byto-mini-icon-btn {
    height: 30px;
    padding: 0 9px;
    border-radius: var(--radius-sm);
    background: var(--surface-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.76rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: 0.2s ease;
}

.byto-mini-icon-btn:hover {
    border-color: var(--accent-purple);
    color: var(--text-main);
    background: var(--surface-glass-hover);
}

.byto-mini-meta-bar {
    padding: 7px 14px;
    font-size: 0.74rem;
    color: var(--text-muted);
    background: var(--surface-subtle);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.byto-mini-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.byto-msg {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.55;
    word-break: break-word;
}

.byto-msg-user {
    align-self: flex-end;
    background: var(--accent-purple);
    color: #ffffff;
    border-bottom-right-radius: 3px;
}

.byto-msg-bot {
    align-self: flex-start;
    background: var(--surface-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-bottom-left-radius: 3px;
}

.byto-msg-attachment {
    margin-top: 6px;
    max-width: 100%;
    max-height: 140px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: block;
}

.byto-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 14px 4px;
}

.byto-chip {
    font-size: 0.75rem;
    padding: 5px 10px;
    border-radius: var(--radius-pill);
    background: var(--surface-glass);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: 0.2s ease;
}

.byto-chip:hover {
    border-color: var(--accent-green);
    color: var(--text-main);
    background: rgba(16, 185, 129, 0.12);
}

.byto-mini-footer {
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    background: var(--surface-subtle);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.byto-mini-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.byto-mini-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    font-size: 0.84rem;
}

.byto-mini-send-btn {
    height: 38px;
    padding: 0 13px;
    border-radius: var(--radius-sm);
    background: var(--accent-purple);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.byto-mini-send-btn:hover {
    background: var(--accent-purple-hover);
}

.byto-mini-send-btn.support {
    background: var(--accent-green);
}

.byto-mini-send-btn.support:hover {
    opacity: 0.9;
}

/* ================= SHARED RESPONSIVE ================= */
@media (max-width: 900px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: inline-flex; }
    .footer-grid { grid-template-columns: 1fr; text-align: left; }
    .footer-brand p { margin: 0 0 18px 0; }
    .footer-col ul { align-items: flex-start; }
}

@media (max-width: 600px) {
    .profile-dropdown {
        right: -10px;
        width: 250px;
    }
    .nav-auth-btn span.auth-btn-label {
        display: none;
    }
    .nav-auth-btn {
        padding: 0 12px;
    }
    .byto-floating-dock {
        right: 14px;
        bottom: 14px;
    }
    .byto-mini-panel {
        right: 14px;
        bottom: 136px;
        width: calc(100vw - 28px);
    }
}

@media (max-width: 400px) {
    .site-nav { padding: 12px 4%; gap: 8px; }
    .logo-container { gap: 6px; }
    .logo-text { font-size: clamp(1rem, 5vw, 1.25rem); }
    .nav-actions { gap: 6px; }
    .lang-toggle { padding: 0 9px; }
    .footer-contact li > div { min-width: 0; overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
    body,
    .code-rain span,
    .btn-glow::after,
    .btn-outline::after,
    .btn-full::after,
    .btn-outline-sm::after,
    .lang-toggle::after {
        animation: none;
        transition: none;
    }
}