
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    color-scheme: dark;
    --bg: #090911;
    --panel: #141320;
    --panel-hover: #1d1a2d;
    --border: #29253b;
    --purple: #985cff;
    --purple-light: #c6a5ff;
    --text: #f5f3fb;
    --muted: #a19bad;
    --gold: #f3c66b;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input {
    font: inherit;
}

button {
    cursor: pointer;
}

.wrap {
    width: min(1160px, calc(100% - 36px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* CABEÇALHO */

.age-strip {
    padding: 7px 12px;
    background: #171020;
    color: #c9b4e6;
    text-align: center;
    font-size: 11px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9,9,17,.96);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}

.topbar-inner {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 900;
    letter-spacing: -1px;
    white-space: nowrap;
}

.logo span:not(.logo-mark) {
    color: var(--purple);
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 33px;
    height: 33px;
    margin-right: 9px;
    border-radius: 10px;
    background: var(--purple);
    color: #fff;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.topbar nav a {
    color: #b9b3c7;
    font-size: 12px;
    font-weight: 700;
}

.topbar nav a:hover {
    color: #fff;
}

.top-pill {
    padding: 7px 12px;
    border: 1px solid #50327b;
    border-radius: 30px;
    color: #d5b9ff;
    background: #21172f;
    font-size: 11px;
    font-weight: 800;
}

/* TÍTULOS E SEÇÕES */

h1, h2, h3, p {
    margin-top: 0;
}

h1, h2, h3 {
    font-family: 'Outfit', sans-serif;
}

.kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--purple-light);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.section-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    margin-bottom: 19px;
}

.section-line h1,
.section-line h2 {
    margin: 0 0 4px;
    font-size: clamp(22px, 2.8vw, 29px);
    line-height: 1.2;
    font-weight: 800;
}

.section-line h1 span,
.sparkle {
    color: var(--purple);
}

.section-line p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.section-space {
    padding-top: 43px;
    scroll-margin-top: 90px;
}

.mini-label {
    color: var(--muted);
    font-size: 11px;
}

.section-chip {
    padding: 7px 11px;
    border: 1px solid #45305f;
    border-radius: 30px;
    background: #1d172b;
    color: #c6a5ff;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

/* STORIES */

.stories-section {
    padding-top: 27px;
    padding-bottom: 23px;
}

.stories-section .section-line {
    margin-bottom: 18px;
}

.stories {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scrollbar-width: thin;
    scrollbar-color: #45305f transparent;
}

.story {
    display: flex;
    flex: 0 0 78px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.story-ring {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    padding: 3px;
    border-radius: 50%;
    background: linear-gradient(35deg,#ffc25b,#fa4ca8,#864cff);
    transition: transform .2s;
}

.story:hover .story-ring {
    transform: scale(1.07);
}

.story-face {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border: 3px solid #090911;
    border-radius: 50%;
    background: #211a35;
    font-size: 26px;
}

.story strong {
    max-width: 90px;
    font-size: 11px;
    font-weight: 700;
}

.gold-ring {
    background: linear-gradient(45deg,#b7802c,#ffeb9e,#dba23e);
}

/* ÁREA DE BUSCA COMPACTA */

.intro-panel {
    display: block;
    min-height: auto;
    border: 1px solid #34294b;
    border-radius: 18px;
    background:
        radial-gradient(circle at 100% 0,rgba(127,64,213,.14),transparent 50%),
        #151221;
}

.intro-copy {
    padding: 24px 27px;
}

.intro-copy h2 {
    margin: 0 0 8px;
    font-size: clamp(25px,3.3vw,36px);
    line-height: 1.13;
    letter-spacing: -.7px;
}

.intro-copy h2 em {
    color: var(--purple-light);
    font-style: normal;
}

.intro-copy p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 12px;
}

.intro-art {
    display: none !important;
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%,670px);
    margin-top: 17px;
    padding: 5px 5px 5px 14px;
    border: 1px solid #403452;
    border-radius: 11px;
    background: #0e0d18;
}

.search > span {
    color: #b28af0;
    font-size: 23px;
}

.search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font-size: 12px;
}

.search input::placeholder {
    color: #8e869e;
}

.search button {
    padding: 10px 19px;
    border: 0;
    border-radius: 8px;
    background: #874be0;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.search button:hover {
    background: #a16aff;
}

/* CARDS DOS BOTS */

.bots-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}

.bot-card {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    min-height: 112px;
    padding: 19px;
    border: 1px solid #39304e;
    border-radius: 16px;
    background: #181525;
    transition: border-color .2s,transform .2s;
}

.bot-card:hover {
    border-color: #965cf2;
    transform: translateY(-3px);
}

.bot-card.second {
    background: #1b1529;
    border-color: #46305f;
}

.bot-icon {
    display: grid;
    flex: 0 0 53px;
    place-items: center;
    width: 53px;
    height: 53px;
    border-radius: 15px;
    background: #6838af;
    color: #fff;
    font-size: 27px;
}

.second .bot-icon {
    background: #8946d6;
}

.bot-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.bot-info small {
    color: #b49ad7;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .7px;
}

.bot-info strong {
    overflow-wrap: anywhere;
    font-family: 'Outfit',sans-serif;
    font-size: 18px;
    line-height: 1.2;
}

.bot-info > span {
    color: var(--muted);
    font-size: 11px;
}

.bot-action {
    margin-left: auto;
    padding: 9px 12px;
    border: 1px solid #5c3988;
    border-radius: 9px;
    color: #e4d1ff;
    background: #35214e;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

/* DESTAQUES DO TXT */

.featured-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.featured-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    min-height: 205px;
    padding: 17px;
    border: 1px solid #684c32;
    border-radius: 16px;
    background: linear-gradient(145deg,#28201e,#17151d);
    transition: transform .2s,border-color .2s;
}

.featured-card:hover {
    transform: translateY(-4px);
    border-color: #e0b65b;
}

.featured-top {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: #f1c875;
    font-size: 9px;
    font-weight: 900;
}

.featured-symbol {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin: 15px 0 10px;
    border-radius: 12px;
    background: #4a3524;
    color: #f5cf7d;
    font-family: 'Outfit',sans-serif;
    font-size: 23px;
    font-weight: 800;
}

.featured-card strong {
    width: 100%;
    overflow-wrap: anywhere;
    font-family: 'Outfit',sans-serif;
    font-size: 16px;
    line-height: 1.25;
}

.featured-card small {
    margin-top: 4px;
    color: #c5aa87;
    font-size: 11px;
}

.featured-cta {
    margin-top: auto;
    padding-top: 14px;
    color: #f4cf87;
    font-size: 11px;
    font-weight: 800;
}

.featured-empty {
    padding: 30px;
    border: 1px dashed #4a355e;
    border-radius: 15px;
    color: var(--muted);
    text-align: center;
    background: #15121f;
}

/* FILTROS */

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.filters a {
    padding: 9px 15px;
    border: 1px solid #302a40;
    border-radius: 30px;
    background: #171521;
    color: #bcb5c9;
    font-size: 11px;
    font-weight: 800;
}

.filters a:hover,
.filters a.active {
    border-color: #854cda;
    background: #6634af;
    color: #fff;
}

.search-note {
    color: var(--muted);
    font-size: 12px;
}

.search-note a {
    color: var(--purple-light);
}

/* GRADE DOS GRUPOS */

.groups-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
}

.community-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 200px;
    padding: 17px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    transition: transform .2s,border-color .2s,background .2s;
}

.community-card:hover {
    transform: translateY(-4px);
    border-color: #8050cb;
    background: var(--panel-hover);
}

.community-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.community-avatar {
    display: grid;
    flex: 0 0 45px;
    place-items: center;
    width: 45px;
    height: 45px;
    border-radius: 13px;
    background: #362451;
    color: #d8baff;
    font-family: 'Outfit',sans-serif;
    font-size: 22px;
    font-weight: 800;
}

.card-mark {
    padding: 5px 7px;
    border: 1px solid #393044;
    border-radius: 7px;
    color: #aaa2b6;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

.community-card h3 {
    margin: 15px 0 7px;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 800;
}

.community-category {
    color: #aaa3b6;
    font-size: 11px;
}

.community-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    color: #c69dff;
    font-size: 11px;
    font-weight: 800;
}

.community-link span {
    font-size: 17px;
}

/* CINCO CARDS DOURADOS */

.community-card.lucky-card {
    border-color: #98743d;
    background: linear-gradient(145deg,#302719,#1c1920);
}

.lucky-card .community-avatar {
    background: #584322;
    color: #ffe09a;
}

.lucky-card .card-mark {
    border-color: #795e34;
    color: #f2cd83;
    background: #392d20;
}

.lucky-card .community-link {
    color: #f3cb7d;
}

.lucky-card:hover {
    border-color: #e2b75e;
}

/* ESTADO VAZIO */

.empty-state {
    grid-column: 1/-1;
    padding: 42px 20px;
    border: 1px dashed #40344f;
    border-radius: 16px;
    background: #151320;
    text-align: center;
}

.empty-state strong {
    font-size: 19px;
}

.empty-state p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

/* PAGINAÇÃO */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.pagination a {
    padding: 10px 15px;
    border: 1px solid #5a3986;
    border-radius: 9px;
    background: #251a37;
    color: #d9bdff;
    font-size: 11px;
    font-weight: 800;
}

.pagination span {
    color: var(--muted);
    font-size: 11px;
}

/* PÁGINA INDIVIDUAL */

.detail {
    min-height: 60vh;
    padding-top: 40px;
    padding-bottom: 60px;
}

.back {
    display: inline-block;
    margin-bottom: 20px;
    color: #c69dff;
    font-size: 12px;
    font-weight: 800;
}

.detail-box {
    max-width: 760px;
    padding: 35px;
    border: 1px solid #44305e;
    border-radius: 18px;
    background: #171322;
}

.detail-box h1 {
    overflow-wrap: anywhere;
    font-size: clamp(27px,4vw,42px);
}

.detail-box p {
    color: var(--muted);
    font-size: 13px;
}

.primary-link {
    display: inline-block;
    margin-top: 15px;
    padding: 13px 20px;
    border-radius: 10px;
    background: #864be0;
    color: white;
    font-size: 13px;
    font-weight: 800;
}

.detail-box small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
}

/* SEGURANÇA E RODAPÉ */

.safety {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 50px;
    margin-bottom: 45px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #13121c;
}

.safety > span {
    font-size: 25px;
}

.safety h2 {
    margin-bottom: 5px;
    font-size: 17px;
}

.safety p {
    max-width: 850px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

footer {
    border-top: 1px solid var(--border);
    background: #0e0d16;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 82px;
}

.footer-inner .logo {
    font-size: 19px;
}

.footer-inner > span {
    color: var(--muted);
    font-size: 11px;
}

/* TABLETS */

@media (max-width: 1050px) {
    .featured-grid,
    .groups-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .bot-card {
        flex-wrap: wrap;
    }

    .bot-action {
        margin-left: 0;
    }
}

@media (max-width: 760px) {
    .topbar nav,
    .top-pill {
        display: none;
    }

    .topbar-inner {
        min-height: 60px;
    }

    .bots-grid {
        grid-template-columns: 1fr;
    }

    .featured-grid,
    .groups-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .section-space {
        padding-top: 35px;
    }
}

/* CELULARES */

@media (max-width: 480px) {
    .wrap {
        width: calc(100% - 26px);
    }

    .age-strip {
        font-size: 10px;
    }

    .logo {
        font-size: 21px;
    }

    .stories-section {
        padding-top: 22px;
        padding-bottom: 18px;
    }

    .stories {
        gap: 12px;
    }

    .story {
        flex-basis: 72px;
    }

    .story-ring {
        width: 66px;
        height: 66px;
    }

    .story-face {
        font-size: 23px;
    }

    .story strong {
        font-size: 10px;
    }

    .mini-label,
    .section-chip {
        display: none;
    }

    .section-line h1,
    .section-line h2 {
        font-size: 23px;
    }

    .intro-copy {
        padding: 20px 17px;
    }

    .intro-copy h2 {
        font-size: 28px;
    }

    .search {
        gap: 6px;
        padding-left: 10px;
    }

    .search button {
        padding: 10px 12px;
    }

    .bot-card {
        padding: 16px;
        gap: 13px;
    }

    .bot-icon {
        flex-basis: 48px;
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .bot-info strong {
        font-size: 17px;
    }

    .bot-action {
        width: 100%;
        text-align: center;
    }

    .featured-grid,
    .groups-grid {
        gap: 10px;
    }

    .featured-card,
    .community-card {
        padding: 13px;
        border-radius: 13px;
    }

    .featured-card {
        min-height: 200px;
    }

    .featured-card strong,
    .community-card h3 {
        font-size: 14px;
    }

    .featured-symbol {
        width: 42px;
        height: 42px;
        font-size: 20px;
    }

    .community-card {
        min-height: 205px;
    }

    .community-avatar {
        flex-basis: 39px;
        width: 39px;
        height: 39px;
        font-size: 19px;
    }

    .card-mark {
        padding: 4px;
        font-size: 7px;
    }

    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .filters a {
        flex: 0 0 auto;
    }

    .detail-box {
        padding: 22px;
    }

    .safety {
        padding: 17px;
    }

    .footer-inner {
        flex-direction: column;
        justify-content: center;
        padding: 22px 0;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}



/* ==========================================
   NOVO CARROSSEL DE GRUPOS EM DESTAQUE
   ========================================== */

.featured-section {
    overflow: hidden;
}

.featured-controls {
    display: flex;
    align-items: center;
    gap: 9px;
}

.featured-arrow {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid #49315f;
    border-radius: 50%;
    background: #21172f;
    color: #e6d3ff;
    font-size: 27px;
    line-height: 1;
    transition: background .2s, transform .2s;
}

.featured-arrow:hover {
    background: #793fc5;
    transform: scale(1.05);
}

.featured-slider {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 5px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: #69418d transparent;
}

.featured-slide {
    flex: 0 0 275px;
    min-width: 0;
    scroll-snap-align: start;
}

.featured-image {
    position: relative;
    height: 365px;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid #46315c;
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 35%, #503080, transparent 70%),
        linear-gradient(145deg, #251737, #0d0b17);
    transition: border-color .25s, transform .25s;
}

.featured-slide:hover .featured-image {
    border-color: #a16aff;
    transform: translateY(-3px);
}

.featured-image > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
    transition: transform .4s;
}

.featured-slide:hover img {
    transform: scale(1.06);
}

.featured-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(
            to bottom,
            rgba(9, 6, 18, .42) 0%,
            rgba(9, 6, 18, .06) 32%,
            rgba(9, 6, 18, .58) 55%,
            rgba(9, 6, 18, .98) 100%
        );
}

.featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 218, 141, .5);
    border-radius: 100px;
    background: rgba(18, 12, 24, .8);
    backdrop-filter: blur(8px);
    color: #ffe0a0;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .8px;
}

.featured-content {
    position: absolute;
    right: 17px;
    bottom: 18px;
    left: 17px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.featured-category {
    display: inline-block;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid rgba(201, 162, 255, .35);
    border-radius: 100px;
    background: rgba(91, 51, 144, .5);
    color: #e4ceff;
    font-size: 10px;
    font-weight: 800;
}

.featured-content h3 {
    display: -webkit-box;
    width: 100%;
    margin: 0 0 5px;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.18;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.featured-enter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 11px 14px;
    border: 1px solid #b789ff;
    border-radius: 11px;
    background: linear-gradient(135deg, #9652e8, #7035bb);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
    transition: filter .2s;
}

.featured-enter:hover {
    filter: brightness(1.18);
}

.featured-enter span:first-child {
    font-size: 18px;
}

.featured-enter span:last-child {
    margin-left: auto;
    font-size: 16px;
}

.featured-hint {
    margin-top: 3px;
    color: #898098;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 760px) {
    .featured-slide {
        flex-basis: 240px;
    }

    .featured-image {
        height: 330px;
    }

    .featured-content h3 {
        font-size: 21px;
    }
}

@media (max-width: 480px) {
    .featured-slider {
        gap: 12px;
        margin-right: -13px;
        padding-right: 13px;
    }

    .featured-slide {
        flex-basis: 225px;
    }

    .featured-image {
        height: 310px;
        border-radius: 16px;
    }

    .featured-content {
        right: 13px;
        bottom: 14px;
        left: 13px;
    }

    .featured-content h3 {
        font-size: 20px;
    }

    .featured-arrow {
        width: 33px;
        height: 33px;
    }
}

/* =====================================================
   CONSULTA GRUPOS — CARDS TECH BLUE
   ===================================================== */

:root {
    --tech-blue: #38bdf8;
    --tech-blue-soft: #7dd3fc;
    --tech-blue-dark: #10283b;
}

/* CARD PRINCIPAL DA PÁGINA INDIVIDUAL */

.detail-box {
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at top right,
            rgba(56, 189, 248, 0.13),
            transparent 55%
        ),
        linear-gradient(
            145deg,
            #111c2b 0%,
            #0b101c 55%,
            #101020 100%
        );

    border: 1px solid rgba(125, 211, 252, 0.30);
    border-radius: 22px;

    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.30),
        0 0 28px rgba(56, 189, 248, 0.06);

    padding: clamp(24px, 4vw, 42px);
}

.detail-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;

    background: linear-gradient(
        90deg,
        transparent,
        #38bdf8,
        #a5e5ff,
        transparent
    );

    box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

.detail-box h1 {
    color: #f4fbff;
    letter-spacing: -0.7px;
    text-shadow: 0 0 25px rgba(56, 189, 248, 0.12);
}

.detail-box h2 {
    color: #d9f3ff;
}

.detail-box .kicker {
    color: var(--tech-blue-soft);
}

/* BOTÃO DE ENTRADA DO GRUPO PRINCIPAL */

.detail-box .primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    background: linear-gradient(
        135deg,
        #0284c7,
        #2563eb
    );

    color: #ffffff;
    border: 1px solid rgba(125, 211, 252, 0.5);
    border-radius: 12px;

    padding: 15px 24px;
    font-weight: 800;
    text-decoration: none;

    box-shadow: 0 8px 25px rgba(2, 132, 199, 0.22);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.detail-box .primary-link:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);

    box-shadow:
        0 12px 32px rgba(2, 132, 199, 0.35);
}

/* CARDS DE TODOS OS GRUPOS E DOS SUGERIDOS */

.community-card {
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at top right,
            rgba(56, 189, 248, 0.09),
            transparent 65%
        ),
        linear-gradient(
            155deg,
            #141c2b,
            #0d111c
        );

    border: 1px solid rgba(100, 165, 205, 0.22);
    border-radius: 18px;

    padding: 22px;

    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.community-card:hover {
    transform: translateY(-5px);

    border-color: rgba(56, 189, 248, 0.65);

    box-shadow:
        0 16px 35px rgba(0, 0, 0, 0.28),
        0 0 25px rgba(56, 189, 248, 0.09);
}

/* LINHA AZUL DECORATIVA */

.community-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(125, 211, 252, 0.55),
        transparent
    );
}

/* AVATAR */

.community-card .community-avatar {
    background: linear-gradient(
        135deg,
        #143b58,
        #17264d
    );

    border: 1px solid rgba(125, 211, 252, 0.28);
    color: #a5e5ff;

    box-shadow: 0 0 18px rgba(56, 189, 248, 0.10);
}

/* NOME DO GRUPO */

.community-card h3 {
    color: #f2f8ff;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

/* ETIQUETA TELEGRAM */

.community-card .card-mark {
    color: #8edaff;
}

/* CATEGORIA */

.community-card .community-category {
    color: #9dc8e0;
}

/* BOTÃO AZUL DOS CARDS */

.community-card .community-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    width: 100%;
    min-height: 44px;

    margin-top: 18px;
    padding: 12px 15px;

    background: linear-gradient(
        135deg,
        #0369a1,
        #1d4ed8
    );

    border: 1px solid rgba(125, 211, 252, 0.30);
    border-radius: 11px;

    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;

    box-shadow: 0 5px 18px rgba(3, 105, 161, 0.20);

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.community-card .community-link:hover {
    background: linear-gradient(
        135deg,
        #0284c7,
        #2563eb
    );

    transform: translateY(-2px);

    box-shadow: 0 9px 25px rgba(2, 132, 199, 0.30);
}

/* PRESERVAR DESTAQUE DOURADO DOS SORTEADOS */

.community-card.lucky-card {
    border-color: rgba(245, 190, 75, 0.50);
}

.community-card.lucky-card::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 205, 100, 0.85),
        transparent
    );
}

/* ACESSIBILIDADE */

.community-card .community-link:focus-visible,
.detail-box


/* =====================================================
   CONSULTA GRUPOS — IMAGENS DE FUNDO NOS CARDS
   ===================================================== */

/* Cards do catálogo e dos grupos relacionados */
.community-card.has-card-image {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background-color: #101e30;
    border: 1px solid rgba(90, 190, 255, 0.55);

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.28),
        inset 0 0 0 1px rgba(130, 210, 255, 0.06);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

/* Fotografia atrás do conteúdo */
.community-card.has-card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;

    background-image: var(--card-bg-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    opacity: 0.48;
    transform: scale(1.02);

    transition:
        opacity 0.3s ease,
        transform 0.4s ease;
}

/* Camada escura para proteger a leitura */
.community-card.has-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background: linear-gradient(
        180deg,
        rgba(7, 17, 31, 0.52) 0%,
        rgba(9, 24, 42, 0.76) 52%,
        rgba(5, 14, 29, 0.94) 100%
    );
}

/* Mantém textos e botões acima do fundo */
.community-card.has-card-image > * {
    position: relative;
    z-index: 1;
}

.community-card.has-card-image h3 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.community-card.has-card-image .community-category {
    color: #ccecff;
}

/* Botão azul */
.community-card.has-card-image .community-link {
    background: linear-gradient(
        135deg,
        #087ac4,
        #1454a1
    );

    color: #ffffff;
    border: 1px solid rgba(145, 220, 255, 0.45);

    box-shadow: 0 4px 16px rgba(0, 91, 190, 0.28);
}

.community-card.has-card-image .community-link:hover {
    background: linear-gradient(
        135deg,
        #1599e8,
        #176ac5
    );
}

/* Efeito de destaque ao passar o mouse */
@media (hover: hover) {
    .community-card.has-card-image:hover {
        transform: translateY(-5px);
        border-color: #81d7ff;

        box-shadow:
            0 14px 38px rgba(0, 0, 0, 0.38),
            0 0 22px rgba(45, 165, 255, 0.18);
    }

    .community-card.has-card-image:hover::before {
        opacity: 0.62;
        transform: scale(1.08);
    }
}


/* =====================================================
   CARD PRINCIPAL DA PÁGINA INDIVIDUAL
   ===================================================== */

.detail-box.has-card-image {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background-color: #101e30;
    border: 1px solid rgba(93, 188, 255, 0.55);

    box-shadow:
        0 12px 38px rgba(0, 0, 0, 0.32),
        0 0 28px rgba(29, 134, 225, 0.09);
}

/* Imagem do próprio grupo */
.detail-box.has-card-image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;

    background-image: var(--card-bg-image);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;

    opacity: 0.32;
}

/* Degradê para leitura dos textos maiores */
.detail-box.has-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    background: linear-gradient(
        135deg,
        rgba(6, 15, 31, 0.91) 0%,
        rgba(9, 26, 47, 0.87) 55%,
        rgba(7, 16, 32, 0.94) 100%
    );
}

.detail-box.has-card-image > * {
    position: relative;
    z-index: 1;
}

.detail-box.has-card-image h1,
.detail-box.has-card-image h2 {
    color: #ffffff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.detail-box.has-card-image p {
    color: #d4e4f3;
}

/* Botão principal */
.detail-box.has-card-image .primary-link {
    background: linear-gradient(
        135deg,
        #0789d6,
        #1458b3
    );

    border: 1px solid rgba(155, 224, 255, 0.45);
    color: #ffffff;

    box-shadow: 0 6px 22px rgba(0, 105, 205, 0.25);
}

.detail-box.has-card-image .primary-link:hover {
    background: linear-gradient(
        135deg,
        #19a4f0,
        #2077d2
    );
}


/* =====================================================
   RESPONSIVIDADE E ACESSIBILIDADE
   ===================================================== */

@media (max-width: 640px) {
    .community-card.has-card-image::before {
        opacity: 0.42;
    }

    .detail-box.has-card-image::before {
        opacity: 0.25;
    }
}

@media (prefers-reduced-motion: reduce) {
    .community-card.has-card-image,
    .community-card.has-card-image::before {
        transition: none;
    }
}

/* TESTE — FUNDO VISÍVEL NOS CARDS */

.community-card.has-card-image {
    position: relative;
    isolation: isolate;
    overflow: hidden;

    background-image:
        linear-gradient(
            rgba(5, 15, 30, 0.45),
            rgba(5, 15, 30, 0.70)
        ),
        var(--card-bg-image) !important;

    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Desativa temporariamente as camadas anteriores */
.community-card.has-card-image::before,
.community-card.has-card-image::after {
    content: none !important;
}

/* Mantém o conteúdo visível */
.community-card.has-card-image > * {
    position: relative;
    z-index: 1;
}

/* =====================================================
   IMAGEM NO CARD INDIVIDUAL DO GRUPO
   ===================================================== */

.detail-box.has-card-image {
    position: relative;
    isolation: isolate;
    overflow: hidden;

background-image:
    linear-gradient(
        180deg,
        rgba(3, 15, 45, 0.78) 0%,
        rgba(3, 15, 45, 0.84) 55%,
        rgba(3, 15, 45, 0.92) 100%
    ),
    var(--card-bg-image) !important;

    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;

    border: 1px solid rgba(95, 190, 255, 0.55);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.30);
}

/* Remove as camadas antigas que poderiam esconder a foto */
.detail-box.has-card-image::before,
.detail-box.has-card-image::after {
    content: none !important;
}

/* Mantém textos e botão acima da imagem */
.detail-box.has-card-image > * {
    position: relative;
    z-index: 1;
}

.detail-box.has-card-image h1,
.detail-box.has-card-image h2 {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.detail-box.has-card-image p {
    color: #e0eaf5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.55);
}

/* Botão azul de entrada */
.detail-box.has-card-image .primary-link {
    background: linear-gradient(135deg, #0789d6, #1458b3);
    color: #ffffff;
    border: 1px solid rgba(155, 224, 255, 0.45);
}

/* BOTÃO LARGO PARA ADICIONAR GRUPOS */

.add-groups-wide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 11px 20px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0869c8, #07458d);
    border: 1px solid rgba(110, 192, 255, 0.5);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 70, 150, 0.22);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.add-groups-wide:hover {
    background: linear-gradient(135deg, #087de9, #0755a9);
    border-color: #8ed5ff;
    color: #fff;
}

/* STORIES PERSONALIZADOS */

.custom-story-trigger {
    appearance: none;
    background: transparent;
    border: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.custom-story-cover {
    overflow: hidden;
}

.custom-story-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.story-viewer[hidden] {
    display: none !important;
}

.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, .94);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.story-viewer-panel {
    position: relative;
    width: min(100%, 420px);
    height: min(90dvh, 760px);
    background: #080b17;
    border-radius: 16px;
    overflow: hidden;
    isolation: isolate;
}

.story-media,
.story-media img,
.story-media video {
    width: 100%;
    height: 100%;
}

.story-media img,
.story-media video {
    object-fit: contain;
}

.story-progress {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 5;
    display: flex;
    gap: 4px;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,.3);
    border-radius: 8px;
    overflow: hidden;
}

.story-progress-fill {
    display: block;
    height: 100%;
    width: 0;
    background: white;
}

.story-viewer-header {
    position: absolute;
    top: 28px;
    left: 16px;
    right: 16px;
    z-index: 6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.story-viewer-header button {
    border: 0;
    background: rgba(0,0,0,.4);
    color: white;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
}

.story-viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 6;
    padding: 60px 20px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: white;
    text-align: center;
}

.story-viewer-footer p {
    margin-bottom: 16px;
    font-size: 15px;
}

.story-viewer-link {
    display: block;
    padding: 13px;
    background: #1667db;
    border-radius: 10px;
    color: white;
    font-weight: 800;
    text-decoration: none;
}

.story-viewer-link[hidden] {
    display: none;
}

.story-nav {
    position: absolute;
    top: 20%;
    bottom: 24%;
    width: 25%;
    z-index: 4;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.story-nav-prev { left: 0; }
.story-nav-next { right: 0; }

@media (max-width: 600px) {
    .story-viewer {
        padding: 0;
    }

    .story-viewer-panel {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
    }
}

/* RESULTADOS DA PESQUISA */

.search-result-info {
    padding: 18px 22px;
    background: rgba(125, 75, 255, 0.06);
    border: 1px solid rgba(160, 120, 255, 0.16);
    border-radius: 16px;
}

.search-result-info h2 {
    font-size: 18px;
    line-height: 1.5;
    margin: 8px 0;
    overflow-wrap: anywhere;
}

.search-result-info h2 span {
    color: #b794ff;
}

.search-clear {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    font-size: 13px;
    color: #b794ff;
    text-decoration: none;
}

.search-clear:hover {
    color: #ffffff;
}

/* ===== PESQUISA COMPACTA DO CABEÇALHO ===== */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.top-search-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(151, 93, 255, 0.10);
    border: 1px solid rgba(177, 125, 255, 0.25);
    border-radius: 13px;
    color: #c8a8ff;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.top-search-toggle:hover,
.top-search-toggle[aria-expanded="true"] {
    background: rgba(151, 93, 255, 0.22);
    border-color: #a77aff;
}

.top-search-toggle svg {
    width: 21px;
    height: 21px;
}

.top-search-panel {
    padding: 12px 0 18px;
    background: #101018;
    border-top: 1px solid rgba(177, 125, 255, 0.12);
    border-bottom: 1px solid rgba(177, 125, 255, 0.20);
}

.top-search-panel[hidden] {
    display: none !important;
}

.top-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 8px 7px 16px;
    background: #1b1927;
    border: 1px solid rgba(177, 125, 255, 0.30);
    border-radius: 14px;
}

.top-search-form > svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #b794ff;
}

.top-search-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 15px;
}

.top-search-form input::placeholder {
    color: #9790aa;
}

.top-search-submit {
    padding: 11px 20px;
    border: 0;
    border-radius: 10px;
    background: #9255f5;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.top-search-submit:hover {
    background: #a36cff;
}

@media (max-width: 650px) {
    .topbar-actions {
        gap: 8px;
    }

    .top-search-toggle {
        width: 39px;
        height: 39px;
    }

    .top-search-form {
        gap: 8px;
        padding-left: 12px;
    }

    .top-search-form input {
        font-size: 14px;
    }

    .top-search-submit {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* CATÁLOGO DENTRO DOS RESULTADOS DA PESQUISA */

#resultados-pesquisa {
    margin-top: 24px;
}

#resultados-pesquisa .search-result-info {
    margin-bottom: 18px;
}

#resultados-pesquisa #grupos {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

#resultados-pesquisa .search-result-info p {
    margin: 8px 0;
    color: #aaa2bd;
    font-size: 14px;
}

/* ========================================
   BOTÕES COMPACTOS DE ADICIONAR GRUPOS
======================================== */

.add-bots-section {
    margin-top: 16px;
    margin-bottom: 24px;
}

.add-bots-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.add-bot-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 54px;
    padding: 12px 14px;

    background: linear-gradient(135deg, #2585e6, #3699f5);
    border: 1px solid rgba(140, 205, 255, 0.35);
    border-radius: 13px;

    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-align: center;

    transition: transform .2s, background .2s, box-shadow .2s;
}

.add-bot-button-second {
    background: linear-gradient(135deg, #318de9, #4ca7fa);
}

.add-bot-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 135, 230, 0.25);
    color: #ffffff;
}

.add-bot-icon {
    font-size: 19px;
    line-height: 1;
    flex-shrink: 0;
}

.add-bots-description {
    margin: 10px 0 0;
    color: #a9a4ba;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .add-bots-buttons {
        gap: 8px;
    }

    .add-bot-button {
        min-height: 50px;
        padding: 10px 7px;
        gap: 6px;
        font-size: 12px;
        border-radius: 11px;
    }

    .add-bot-icon {
        font-size: 16px;
    }

    .add-bots-description {
        font-size: 11px;
    }
}

/* =========================================
   BOTÕES DAS PÁGINAS INDIVIDUAIS DOS GRUPOS
========================================= */

.group-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
    margin-bottom: 28px;
}

.group-quick-actions .add-groups-wide,
.group-quick-enter {
    box-sizing: border-box;
    width: 100%;
}

.group-quick-enter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 54px;
    padding: 14px 20px;

    background: linear-gradient(135deg, #168b65, #20b981);
    border: 1px solid rgba(93, 232, 176, 0.3);
    border-radius: 13px;

    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;

    transition: transform .2s, box-shadow .2s;
}

.group-quick-enter:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(22, 139, 101, 0.25);
    color: #ffffff;
}

/* BOTÃO VERDADEIRO DO TELEGRAM */

.detail-box .primary-link {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 58px;
    padding: 15px 18px;

    border-radius: 13px;
    text-align: center;
    font-size: 15px;
    font-weight: 700;

    scroll-margin-top: 220px;
}

/* ROLAGEM SUAVE ATÉ O BOTÃO */

html {
    scroll-behavior: smooth;
}

@media (max-width: 600px) {
    .group-quick-enter {
        min-height: 50px;
        padding: 12px 15px;
        font-size: 14px;
    }

    .detail-box .primary-link {
        min-height: 54px;
        padding: 13px 10px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}