/* =========================================
   CaptionGhor — PREMIUM STYLE
========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --pink: #ff3f78;
    --pink-2: #ff6b9a;
    --pink-dark: #e92f68;

    --bg: #fff7fa;
    --card: rgba(255, 255, 255, 0.92);
    --soft: #fff0f5;
    --text: #252332;
    --muted: #85818c;

    --border: rgba(255, 63, 120, 0.15);

    --gold: #d8a500;

    --shadow:
        0 12px 35px rgba(255, 63, 120, 0.12);

    --shadow-big:
        0 18px 50px rgba(255, 63, 120, 0.18);

    --radius: 24px;
}


/* =========================================
   BODY
========================================= */

body {
    font-family:
        "Noto Sans Bengali",
        "Noto Sans",
        Arial,
        sans-serif;

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 105, 150, 0.10),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #fff7fa 0%,
            #fffafb 50%,
            #fff5f8 100%
        );

    color: var(--text);
    min-height: 100vh;

    transition:
        background 0.35s ease,
        color 0.35s ease;
}


/* =========================================
   HEADER
========================================= */

.header {
    position: relative;

    background:
        linear-gradient(
            135deg,
            #ff2f70 0%,
            #ff477d 45%,
            #ff75a1 100%
        );

    color: white;

    padding: 20px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    box-shadow:
        0 8px 30px rgba(255, 47, 112, 0.28);

    overflow: hidden;
}

.header::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -70px;
    top: -90px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.12);
}

.header::after {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    left: -40px;
    bottom: -60px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 13px;

    position: relative;
    z-index: 2;
}

.logo {
    width: 54px;
    height: 54px;

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #fff1f5
        );

    border-radius: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 29px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.12);
}

.header h1 {
    font-size: 25px;
    font-weight: 900;

    letter-spacing: -0.5px;
}

.header p {
    font-size: 12px;

    margin-top: 3px;

    opacity: 0.92;
}

.theme-btn {
    position: relative;
    z-index: 3;

    width: 46px;
    height: 46px;

    border: 1px solid
        rgba(255, 255, 255, 0.30);

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.18);

    backdrop-filter: blur(12px);

    color: white;

    font-size: 21px;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.10);

    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.theme-btn:active {
    transform: scale(0.90) rotate(10deg);
}


/* =========================================
   SEARCH
========================================= */

.search-section {
    padding: 20px 15px 12px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 14px 17px;

    min-height: 60px;

    background:
        rgba(255, 255, 255, 0.90);

    border:
        1px solid rgba(255, 63, 120, 0.14);

    border-radius: 20px;

    box-shadow:
        0 10px 35px rgba(255, 63, 120, 0.10);

    backdrop-filter: blur(15px);

    transition:
        border 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.search-box:focus-within {
    border-color: var(--pink);

    box-shadow:
        0 0 0 4px rgba(255, 63, 120, 0.08),
        0 12px 35px rgba(255, 63, 120, 0.15);

    transform: translateY(-1px);
}

.search-box span {
    width: 40px;
    height: 40px;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #fff0f5,
            #ffe4ed
        );

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 21px;

    flex-shrink: 0;
}

.search-box input {
    width: 100%;

    border: none;
    outline: none;

    background: transparent;

    color: var(--text);

    font-size: 16px;

    font-family: inherit;
}

.search-box input::placeholder {
    color: #aaa;
}


/* =========================================
   CATEGORY
========================================= */

.categories {
    padding: 10px 15px 17px;
}

.categories h2 {
    font-size: 22px;
    font-weight: 900;

    margin-bottom: 13px;
}

.category-list {
    display: flex;

    gap: 9px;

    overflow-x: auto;

    padding:
        2px 2px 8px;

    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category {
    flex-shrink: 0;

    border:
        1px solid rgba(255, 63, 120, 0.13);

    background:
        rgba(255, 255, 255, 0.92);

    color: var(--text);

    padding: 10px 16px;

    border-radius: 22px;

    font-family: inherit;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 5px 18px rgba(255, 63, 120, 0.07);

    transition:
        transform 0.2s ease,
        background 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
}

.category:active {
    transform: scale(0.94);
}

.category.active {
    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    color: white;

    border-color: transparent;

    box-shadow:
        0 8px 22px
        rgba(255, 63, 120, 0.28);
}


/* =========================================
   CAPTION SECTION
========================================= */

.caption-section {
    padding:
        8px 15px 35px;
}

.section-title {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 16px;
}

.section-title h2 {
    font-size: 23px;
    font-weight: 900;
}

.section-title p {
    color: var(--muted);

    font-size: 12px;

    margin-top: 4px;
}


/* =========================================
   FAVORITES
========================================= */

.favorite-page-btn {
    border:
        1px solid rgba(255, 63, 120, 0.16);

    background:
        rgba(255, 255, 255, 0.92);

    color: var(--pink);

    padding:
        10px 14px;

    border-radius: 15px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;

    cursor: pointer;

    box-shadow:
        0 7px 22px rgba(255, 63, 120, 0.10);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.favorite-page-btn:active {
    transform: scale(0.94);
}


/* =========================================
   🎲 RANDOM BUTTON
========================================= */

.random-caption-btn {
    border: none;

    background:
        linear-gradient(
            135deg,
            #ff3f78,
            #ff79a3
        );

    color: white;

    padding:
        11px 15px;

    min-height: 43px;

    border-radius: 15px;

    font-family: inherit;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 8px 24px
        rgba(255, 63, 120, 0.25);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.random-caption-btn:active {
    transform:
        scale(0.94)
        rotate(-1deg);

    box-shadow:
        0 4px 14px
        rgba(255, 63, 120, 0.20);
}


/* =========================================
   CAPTION CARD
========================================= */

.caption-card {
    position: relative;

    background:
        rgba(255, 255, 255, 0.94);

    border:
        1px solid rgba(255, 63, 120, 0.13);

    border-radius:
        var(--radius);

    padding: 17px;

    margin-bottom: 17px;

    box-shadow:
        var(--shadow);

    overflow: hidden;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.caption-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;

    background:
        linear-gradient(
            180deg,
            var(--pink),
            #ff8bad
        );
}

.caption-card:hover {
    transform: translateY(-2px);

    box-shadow:
        var(--shadow-big);
}


/* =========================================
   CATEGORY LABEL
========================================= */

.caption-category {
    display: inline-flex;

    align-items: center;

    background:
        linear-gradient(
            135deg,
            #fff0f5,
            #ffe7ef
        );

    color: var(--pink);

    font-size: 14px;

    font-weight: 800;

    padding:
        8px 12px;

    border-radius:
        13px;

    margin-bottom: 12px;
}


/* =========================================
   CAPTION TEXT
========================================= */

.caption-text {
    background:
        linear-gradient(
            145deg,
            #fffafb,
            #fff5f8
        );

    border:
        1px solid #f2dfe6;

    border-radius:
        18px;

    padding:
        18px;

    font-size:
        16px;

    line-height:
        1.9;

    margin-bottom:
        15px;

    color:
        var(--text);

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,0.8);
}


/* =========================================
   ACTIONS
========================================= */

.caption-actions {
    display: grid;

    grid-template-columns:
        1fr 1fr 54px;

    gap: 9px;
}

.caption-actions button {
    border: none;

    min-height: 46px;

    border-radius: 15px;

    font-family: inherit;

    font-size: 13px;

    font-weight: 800;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.caption-actions button:active {
    transform: scale(0.94);
}


/* COPY */

.copy-btn {
    background:
        linear-gradient(
            135deg,
            #fff0f5,
            #ffe5ed
        );

    color: var(--pink);

    border:
        1px solid rgba(255, 63, 120, 0.10) !important;
}


/* SHARE */

.share-btn {
    background:
        linear-gradient(
            135deg,
            #ff3f78,
            #ff6c98
        );

    color: white;

    box-shadow:
        0 7px 18px
        rgba(255, 63, 120, 0.20);
}


/* FAVORITE */

.favorite-btn {
    background:
        linear-gradient(
            135deg,
            #fff9e5,
            #fff1c4
        );

    color:
        var(--gold);

    font-size:
        22px !important;

    border:
        1px solid rgba(216, 165, 0, 0.16) !important;
}

.favorite-btn.active {
    background:
        linear-gradient(
            135deg,
            #ffe0ea,
            #ffc9d9
        );

    color:
        var(--pink);

    box-shadow:
        0 6px 18px
        rgba(255, 63, 120, 0.16);
}


/* =========================================
   NO RESULT
========================================= */

.no-result {
    display: none;

    text-align: center;

    padding:
        50px 20px;

    color:
        var(--muted);
}

.no-result h3 {
    margin:
        10px 0 5px;

    color:
        var(--text);

    font-size:
        18px;
}

.no-result p {
    font-size:
        13px;
}


/* =========================================
   FOOTER
========================================= */

.footer {
    text-align: center;

    background:
        linear-gradient(
            145deg,
            #211d2b,
            #15131d
        );

    color: white;

    padding:
        30px 15px;

    margin-top:
        25px;
}

.footer-logo {
    font-size:
        19px;

    font-weight:
        900;

    margin-bottom:
        8px;
}

.footer p {
    font-size:
        12px;

    color:
        #c8c5cc;
}

.footer .copyright {
    margin-top:
        13px;

    color:
        #85818c;
}


/* =========================================
   MESSAGE / TOAST
========================================= */

.app-message {
    box-shadow:
        0 10px 35px
        rgba(0,0,0,0.25) !important;

    backdrop-filter:
        blur(12px);

    font-family:
        "Noto Sans Bengali",
        "Noto Sans",
        Arial,
        sans-serif;
}


/* =========================================
   DARK MODE
========================================= */

body.dark {
    --bg:
        #0d0d13;

    --card:
        rgba(29, 29, 40, 0.94);

    --soft:
        #292936;

    --text:
        #f7f5f8;

    --muted:
        #aaa7b0;

    --border:
        rgba(255, 255, 255, 0.08);

    background:
        radial-gradient(
            circle at top left,
            rgba(255, 63, 120, 0.13),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #101017,
            #0b0b10
        );

    color:
        var(--text);
}


/* DARK HEADER */

body.dark .header {
    box-shadow:
        0 8px 35px
        rgba(255, 63, 120, 0.18);
}


/* DARK SEARCH */

body.dark .search-box {
    background:
        rgba(30, 30, 41, 0.92);

    border-color:
        rgba(255,255,255,0.08);
}

body.dark .search-box span {
    background:
        rgba(255, 63, 120, 0.12);
}

body.dark .search-box input {
    color:
        white;
}


/* DARK CATEGORY */

body.dark .category {
    background:
        rgba(30, 30, 41, 0.95);

    color:
        #f5f3f6;

    border-color:
        rgba(255,255,255,0.08);
}

body.dark .category.active {
    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--pink-2)
        );

    color:
        white;
}


/* DARK FAVORITE */

body.dark .favorite-page-btn {
    background:
        rgba(30, 30, 41, 0.95);

    color:
        #ff6f99;

    border-color:
        rgba(255,255,255,0.08);
}


/* DARK RANDOM */

body.dark .random-caption-btn {
    box-shadow:
        0 8px 25px
        rgba(255, 63, 120, 0.18);
}


/* DARK CARD */

body.dark .caption-card {
    background:
        rgba(29, 29, 40, 0.96);

    border-color:
        rgba(255,255,255,0.08);

    box-shadow:
        0 15px 45px
        rgba(0,0,0,0.28);
}


/* DARK CATEGORY LABEL */

body.dark .caption-category {
    background:
        rgba(255, 63, 120, 0.13);

    color:
        #ff72a0;
}


/* DARK CAPTION */

body.dark .caption-text {
    background:
        linear-gradient(
            145deg,
            #292934,
            #23232d
        );

    border-color:
        rgba(255,255,255,0.08);

    color:
        #f5f3f7;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,0.03);
}


/* DARK COPY */

body.dark .copy-btn {
    background:
        rgba(255, 63, 120, 0.13);

    color:
        #ff72a0;

    border-color:
        rgba(255, 63, 120, 0.15) !important;
}


/* DARK FAVORITE */

body.dark .favorite-btn {
    background:
        rgba(255, 196, 0, 0.10);

    color:
        #f0c33b;
}

body.dark .favorite-btn.active {
    background:
        rgba(255, 63, 120, 0.16);

    color:
        #ff6d9a;
}


/* DARK FOOTER */

body.dark .footer {
    background:
        #08080c;
}


/* =========================================
   SMALL PHONES
========================================= */

@media (max-width: 380px) {

    .header {
        padding:
            17px 13px;
    }

    .logo {
        width: 50px;
        height: 50px;

        font-size: 26px;
    }

    .header h1 {
        font-size:
            22px;
    }

    .header p {
        font-size:
            11px;
    }

    .theme-btn {
        width: 43px;
        height: 43px;
    }

    .section-title {
        align-items:
            flex-start;
    }

    .section-title h2 {
        font-size:
            21px;
    }

    .favorite-page-btn,
    .random-caption-btn {
        padding:
            9px 10px;

        font-size:
            12px;
    }

    .caption-text {
        font-size:
            15px;

        line-height:
            1.85;

        padding:
            16px;
    }

    .caption-actions {
        grid-template-columns:
            1fr 1fr 52px;
    }

    .caption-actions button {
        font-size:
            12px;
    }
}


/* =========================================
   TOUCH FEEDBACK
========================================= */

button {
    -webkit-tap-highlight-color:
        transparent;
}

button:focus-visible {
    outline:
        3px solid
        rgba(255, 63, 120, 0.25);

    outline-offset:
        2px;
}
/* =========================
   PREMIUM AD SPACE
========================= */

.premium-ad {
    margin: 8px 15px 22px;
    min-height: 95px;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 71, 120, 0.12),
            rgba(255, 255, 255, 0.95)
        );

    border: 1px solid rgba(255, 71, 120, 0.18);

    box-shadow:
        0 10px 30px rgba(255, 71, 120, 0.10);

    display: flex;
    align-items: center;

    padding: 16px;

    position: relative;
    overflow: hidden;
}

.ad-icon {
    width: 50px;
    height: 50px;

    border-radius: 16px;

    background: #fff0f4;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;

    margin-right: 13px;
}

.ad-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ad-content strong {
    color: var(--pink);
    font-size: 15px;
}

.ad-content span {
    color: var(--muted);
    font-size: 11px;
}

.ad-label {
    position: absolute;

    top: 8px;
    right: 10px;

    font-size: 8px;
    letter-spacing: 0.8px;

    color: #aaa;
}


/* DARK MODE */

body.dark .premium-ad {
    background:
        linear-gradient(
            135deg,
            #241b26,
            #20202b
        );

    border-color: #3a303a;
}

body.dark .ad-icon {
    background: #332331;
}

body.dark .ad-content span {
    color: #aaa;
}