@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #050505;
    --card-bg: #0f0f0f;
    --text-color: #ffffff;
    --text-muted: #a0a0a0;
    --accent-color: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-color: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    overscroll-behavior: none;
    /* Prevents swipe-to-close bounce on some devices */
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: var(--transition);
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-color);
    opacity: 0.6;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    opacity: 1;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 150px 20px 40px;
    position: relative;
    overflow: hidden;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 40%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.03), transparent 40%);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vw;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    max-width: 900px;
    width: 100%;
}

.hero-h1 {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 25px;
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero-p {
    font-size: 1.35rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 45px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn-primary {
    padding: 16px 36px;
    background: #fff;
    color: #000;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.05rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px rgba(255, 255, 255, 0.2);
}

.btn-secondary {
    padding: 16px 36px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: var(--transition);
    margin-left: 0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Hero Carousel */
.hero-carousel {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 50px;
}

/* Stats Section */
.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

.stat-card {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.5));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* Features Section */
.features-section {
    padding: 120px 20px;
    background: var(--bg-color);
    position: relative;
}

/* Audio Player */
.hero-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    width: 100%;
}

.audio-player-wrapper.long-pill {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.audio-btn-pill {
    position: relative;
    width: 260px;
    height: 54px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    display: flex;
    align-items: center;
    padding: 0 6px;
    cursor: pointer;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.2s;
}

.audio-btn-pill:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
}

.audio-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
    transition: width 0.1s linear;
}

.audio-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.audio-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.audio-icon svg {
    margin-left: 2px;
    /* Visual center for play icon */
}

.audio-icon.pause-icon svg {
    margin-left: 0;
}

.audio-label {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0.9;
}

/* ── Bots Section ── */
.bots-section {
    padding: 40px 0 80px;
    background: var(--bg-color);
    overflow: hidden;
}

/* Header: sol başlıq + sağ stat */
.bots-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1100px;
    margin: 0 auto 40px;
    padding: 0 40px;
    gap: 20px;
}

.bots-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bots-header-bar {
    width: 4px;
    height: 42px;
    border-radius: 4px;
    background: #fff;
    flex-shrink: 0;
}

.bots-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    margin: 0;
}

.bots-header-stats {
    display: flex;
    align-items: center;
    gap: 20px;
}

.bots-header-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.bots-header-stat svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Bot Chip — carousel kartı */
.bot-carousel-track {
    gap: 12px;
}

.bot-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    padding: 8px 16px 8px 8px;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.bot-chip:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
}

.bot-chip-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.bot-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-chip-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.75);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03));
}

.bot-chip-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.bot-chip-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.bot-chip-user {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    line-height: 1.2;
}

/* Mobile */
@media (max-width: 600px) {
    .bots-header {
        padding: 0 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 28px;
    }

    .bots-title {
        font-size: 1.5rem;
    }

    .bots-header-bar {
        height: 32px;
    }
}


.section-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 80px;
    letter-spacing: -1px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: rgba(255, 255, 255, 0.02);
    padding: 50px 40px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-15px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.3));
}

.feature-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Footer */
.footer {
    padding: 80px 20px 40px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.5;
}

/* Pages */
.page-container {
    padding: 160px 20px 100px;
    max-width: 800px;
    margin: 0 auto;
    transition: var(--transition);
}

html.tg-mini-app .page-container {
    padding-top: 200px;
}

html.tg-mini-app .hero {
    padding-top: 200px;
}

.search-container {
    margin-bottom: 40px;
}

.search-input {
    width: 100%;
    padding: 18px 25px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}

.cmd-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.cmd-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.cmd-header:hover {
    background: var(--hover-color);
}

.cmd-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.cmd-arrow {
    font-size: 0.8rem;
    opacity: 0.5;
    transition: var(--transition);
}

.cmd-row.active {
    border-color: rgba(255, 255, 255, 0.3);
}

.cmd-row.active .cmd-arrow {
    transform: rotate(180deg);
}

.cmd-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cmd-row.active .cmd-content {
    max-height: 1000px;
}

.cmd-body {
    padding: 0 25px 25px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Groups Carousel Section */
.groups-section {
    padding: 80px 0;
    overflow: hidden;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-top: -16px;
    margin-bottom: 0;
}

.carousel-wrapper {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
    padding: 0 20px;
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    cursor: grab;
}

.carousel-wrapper::-webkit-scrollbar {
    display: none;
}

.carousel-wrapper:active {
    cursor: grabbing;
}

.carousel-track {
    display: inline-flex;
    gap: 16px;
    width: max-content;
    will-change: transform;
    /* Optimize for scrolling */
    transform: translate3d(0, 0, 0);
    /* Hardware acceleration */
    touch-action: pan-x;
    /* Allow horizontal scrolling */
}

/* Animations removed for JS control - classes kept for JS logic reference if needed, or removed if unused */
/* .carousel-left and .carousel-right are used in JS for direction detection, but don't need empty rulesets */

.group-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 12px 18px;
    min-width: 190px;
    max-width: 230px;
    flex-shrink: 0;
    transition: border-color 0.3s ease, background 0.3s ease;
    cursor: default;
}

.group-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Compact group chip — new style */
.gc {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-shrink: 0;
    cursor: default;
    padding: 4px 6px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.gc-link {
    cursor: pointer;
}

.gc-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.gc-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.gc-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gc-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
}

.gc-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
}

.gc-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 130px;
}

.gc-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

.gc-count svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* group-card inner elements */
.group-card-link {
    cursor: pointer;
}

.group-card-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.group-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.group-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.group-avatar-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
}

.group-info {
    overflow: hidden;
}

.group-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.group-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 3px;
}

.group-meta svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Auth Pages */
.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-card {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-input {
    width: 100%;
    padding: 15px 20px;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: #fff;
    margin: 20px 0;
    outline: none;
}

/* Extra Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.8s forwards;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-content {
    animation: float 6s ease-in-out infinite;
}

.feature-card {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s ease, background 0.3s ease;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    opacity: 1;
}

.hero-glow {
    filter: blur(80px);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }

    .navbar {
        width: 95%;
        padding: 10px 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        top: 10px;
        /* Default for mobile browser */
        bottom: auto;
        padding: 10px 15px;
        background: rgba(15, 15, 15, 0.85);
        backdrop-filter: blur(25px) saturate(200%);
        -webkit-backdrop-filter: blur(25px) saturate(200%);
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    }

    /* Only push down for Telegram Mini App to clear the close button */
    html.tg-mini-app .navbar {
        top: calc(env(safe-area-inset-top, 0px) + 55px);
    }

    .hero-h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-p {
        font-size: 1.1rem;
    }

    .page-container {
        padding-top: 140px;
    }

    html.tg-mini-app .page-container {
        padding-top: calc(env(safe-area-inset-top, 0px) + 120px);
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .btn-secondary {
        margin-left: 0;
    }

    .stats-grid {
        gap: 20px;
        flex-wrap: wrap;
    }

    .stat-value {
        font-size: 1.8rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .mobile-menu-toggle {
        display: flex !important;
    }
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 2001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 2px;
    background: #fff;
    transition: var(--transition);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    z-index: 2000;
    padding: 100px 30px;
    transition: var(--transition);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar.active {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-link {
    font-size: 1.2rem;
    font-weight: 500;
    opacity: 0.7;
    transition: var(--transition);
}

.sidebar-link.active,
.sidebar-link:hover {
    opacity: 1;
    color: var(--accent-color);
}