@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg: #050914;
    --panel: rgba(15, 21, 40, 0.8);
    --panel-strong: rgba(16, 24, 46, 0.92);
    --card: rgba(10, 15, 30, 0.75);
    --border: rgba(255, 255, 255, 0.08);
    --text: #e8edff;
    --muted: #93a0c4;
    --accent: #5bd9ff;
    --accent-2: #3f6bff;
    --accent-3: #2bd0ff;
    --shadow-strong: 0 30px 80px rgba(3, 8, 20, 0.75);
    color-scheme: dark;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Outfit", "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, rgba(91, 217, 255, 0.12), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(63, 107, 255, 0.12), transparent 32%),
        radial-gradient(circle at 50% 50%, rgba(43, 208, 255, 0.08), transparent 38%),
        var(--bg);
    overflow-x: hidden;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 60% 0%, rgba(91, 217, 255, 0.16), transparent 40%),
        radial-gradient(circle at 0% 30%, rgba(63, 107, 255, 0.2), transparent 36%);
    mix-blend-mode: screen;
    opacity: 0.8;
    z-index: 0;
}

.page-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.sidebar {
    position: relative;
    background: linear-gradient(180deg, rgba(9, 14, 26, 0.9), rgba(9, 14, 26, 0.8));
    border-right: 1px solid var(--border);
    padding: 28px 22px;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.sidebar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(91, 217, 255, 0.12), transparent 35%),
        radial-gradient(circle at 80% 70%, rgba(63, 107, 255, 0.12), transparent 36%);
    pointer-events: none;
}

.sidebar__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 20px 0;
    /* Minimized top margin */
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0;
    /* Completely removed padding */
}

.brand__logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    background: transparent !important;
    padding: 0;
    overflow: hidden;
    /* Ensure cropped parts don't leak */
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand__logo img {
    width: 100%;
    height: 105px;
    /* Fixed height to force cropping of top/bottom empty space */
    object-fit: cover;
    /* Zooms in to fill width, effectively cropping vertical gaps */
    object-position: center;
    transform: scale(1.1);
    /* Slight Zoom to ensure edge-to-edge fill */
    filter: none;
}

.brand__text {
    display: none;
}

.brand__name {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand__tagline {
    font-size: 12px;
    color: var(--muted);
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.nav__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    color: var(--muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    text-decoration: none !important;
    outline: none !important;
}

.nav__item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.08);
}

.nav__item--active {
    background: linear-gradient(135deg, rgba(91, 217, 255, 0.18), rgba(63, 107, 255, 0.2));
    color: #f6f8ff;
    border-color: rgba(91, 217, 255, 0.25);
    box-shadow: 0 16px 40px rgba(63, 107, 255, 0.18);
}

.nav__icon {
    width: 20px;
    height: 20px;
    color: #9bc7ff;
}

.nav__icon svg {
    width: 100%;
    height: 100%;
}

.nav__label {
    flex: 1;
    font-size: 14px;
}

.main {
    position: relative;
    padding: 36px 44px 48px;
    overflow: hidden;
    background: linear-gradient(115deg, rgba(8, 13, 26, 0.92), rgba(7, 11, 20, 0.94));
}

.main::before,
.main::after {
    content: "";
    position: absolute;
    filter: blur(120px);
    opacity: 0.5;
    pointer-events: none;
    /* Fix: Prevent blobs from blocking clicks */
    z-index: 0;
}

.main::before {
    width: 340px;
    height: 340px;
    top: -80px;
    right: 120px;
    background: radial-gradient(circle, rgba(91, 217, 255, 0.18), transparent 60%);
}

.main::after {
    width: 260px;
    height: 260px;
    bottom: -80px;
    left: 60px;
    background: radial-gradient(circle, rgba(63, 107, 255, 0.18), transparent 60%);
}

.main__content {
    position: relative;
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 26px;
    min-height: calc(100vh - 140px);
    justify-content: center;
    z-index: 1;
    /* Ensure content is above bg */
}

.main__topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    position: relative;
    /* Fix: Ensure z-index works */
    z-index: 10;
    /* Fix: High z-index to be clickable */
}

.main__content+.feature-grid {
    margin-top: 14px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c6d6ff;
    font-weight: 600;
    letter-spacing: 0.1px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.pill__icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: #7be7ff;
}

.pill__icon svg {
    width: 100%;
    height: 100%;
}

.avatar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
    color: #d9e6ff;
    display: grid;
    place-items: center;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.avatar-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(91, 217, 255, 0.35);
    box-shadow: 0 12px 30px rgba(63, 107, 255, 0.25);
}

.avatar-initial {
    font-size: 14px;
}

.hero-card {
    width: 100%;
    max-width: 1120px;
    position: relative;
    overflow: hidden;
    padding: 42px 36px 32px;
    border-radius: 26px;
    background: radial-gradient(120% 120% at 50% 0%, rgba(63, 107, 255, 0.35), rgba(9, 14, 26, 0.9) 65%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: var(--shadow-strong);
}

.hero-card__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(80% 120% at 50% 10%, rgba(91, 217, 255, 0.22), transparent 70%);
    filter: blur(20px);
    opacity: 0.9;
}

.hero-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
    text-align: center;
}

.hero-card h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 44px);
    letter-spacing: 0.5px;
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.hero-subtext {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.hero-card__input {
    width: min(820px, 100%);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(14px);
}

.input__icon {
    width: 22px;
    height: 22px;
    color: #9fd7ff;
    display: grid;
    place-items: center;
}

.input__icon svg {
    width: 100%;
    height: 100%;
}

.hero-card__input input {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 16px;
    padding: 12px 6px;
    outline: none;
}

.hero-card__input input::placeholder {
    color: #9fb1d8;
}

.convert-btn {
    border: none;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    color: #0b1024;
    cursor: pointer;
    background: linear-gradient(135deg, #6ae1ff, #3f6bff);
    box-shadow: 0 14px 30px rgba(63, 107, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.convert-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(63, 107, 255, 0.42);
}

.convert-btn:active {
    transform: translateY(0);
}

.feature-grid {
    margin-top: 30px;
    width: 100%;
    max-width: 1120px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.feature-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: var(--card);
    border-radius: 18px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.feature-card:hover {
    border-color: rgba(91, 217, 255, 0.35);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
}

.feature-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(91, 217, 255, 0.16), rgba(63, 107, 255, 0.18));
    display: grid;
    place-items: center;
    color: #9dd9ff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.feature-icon svg {
    width: 26px;
    height: 26px;
}

.feature-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    letter-spacing: 0.1px;
}

.feature-card p {
    margin: 0;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}

.muted-line {
    color: #7f8db2;
    margin-top: 6px;
}

@media (max-width: 960px) {
    .page-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main {
        padding: 28px 20px 36px;
    }

    .main__content {
        min-height: auto;
        gap: 22px;
    }

    .hero-card__input {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .convert-btn {
        grid-column: 1 / -1;
        width: 100%;
    }
}

@media (max-width: 640px) {
    .main__topbar {
        justify-content: space-between;
    }

    .hero-card {
        padding: 32px 22px 26px;
    }

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

/* Profile Dropdown */
.profile-dropdown-container {
    position: relative;
    display: inline-block;
}

.profile-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 200px;
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.15s;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.dropdown-item:hover {
    background: #1e293b;
    color: #fff;
}

.dropdown-item.danger {
    color: #f87171;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Add arrow to bubble */
.profile-dropdown-menu::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: #0f172a;
    border-left: 1px solid #1e293b;
    border-top: 1px solid #1e293b;
    transform: rotate(45deg);
}

/* =========================================
   Mobile Bottom Navigation
   ========================================= */
.bottom-nav {
    display: none;
    /* Hidden by default on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 10px;
    height: 65px;
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    text-decoration: none !important;
    padding: 8px;
    border-radius: 12px;
    transition: all 0.2s;
    width: 60px;
}

.bottom-nav-item svg {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
    transition: transform 0.2s;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

.bottom-nav-item:active {
    transform: scale(0.95);
}

/* Mobile Visibility & Active States */
@media (max-width: 960px) {
    .sidebar {
        display: none !important;
    }

    .bottom-nav {
        display: flex;
    }

    .main {
        padding-bottom: 80px;
        /* Space for bottom nav */
    }

    /* Active States Colors */
    .bottom-nav-item.active-yt {
        color: #ff4b4b;
        background: rgba(255, 75, 75, 0.1);
    }

    .bottom-nav-item.active-tiktok {
        color: #fe2c55;
        background: rgba(254, 44, 85, 0.1);
    }

    .bottom-nav-item.active-sc {
        color: #ff5500;
        background: rgba(255, 85, 0, 0.1);
    }

    .bottom-nav-item.active-sp {
        color: #1db954;
        background: rgba(29, 185, 84, 0.1);
    }

    .bottom-nav-item.active-ai {
        color: #a855f7;
        background: rgba(168, 85, 247, 0.1);
    }

    /* Fix Footer overlap */
    footer {
        padding-bottom: 90px !important;
    }
}