/* ============================================================================
   Girl catalog page ("strona laski") — Phase 03 · premium pass
   One centered column (banner + heading + grid share the same edges) on the
   palette CSS variables, so the 8-palette switcher + light/dark themes keep
   working. Display type: Bodoni Moda.
   ========================================================================== */

:root {
    --font-display: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    --gp-gutter: clamp(16px, 4vw, 44px);
    --gp-max: 1200px;
    --gp-radius: 24px;
}

.gp { width: 100%; overflow-x: clip; }

/* Single centered column → banner and content align perfectly */
.gp-shell {
    max-width: var(--gp-max);
    margin: 0 auto;
    padding: clamp(14px, 2.2vw, 26px) var(--gp-gutter) clamp(64px, 9vw, 120px);
}

/* ---------- Banner ------------------------------------------------------- */
.gp-banner {
    position: relative;
    border-radius: var(--gp-radius);
    overflow: hidden;
    isolation: isolate;
    min-height: clamp(300px, 38vw, 440px);
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center 22%;
    background-repeat: no-repeat;
    box-shadow:
        0 1px 0 0 rgba(255, 255, 255, 0.06) inset,
        0 30px 80px -40px rgba(0, 0, 0, 0.85);
}
.gp-banner--noimg {
    background-image:
        radial-gradient(120% 140% at 16% 14%,
            color-mix(in srgb, var(--message-bubble) 55%, #1b1222) 0%,
            #170f1e 56%, #0c0810 100%);
}
/* legibility + depth gradient */
.gp-banner-grad {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to top, rgba(8, 6, 12, 0.92) 0%, rgba(8, 6, 12, 0.5) 30%, rgba(8, 6, 12, 0.08) 58%, transparent 80%),
        radial-gradient(140% 120% at 80% 0%, transparent 40%, rgba(8, 6, 12, 0.55) 100%);
}
/* fine grain for a printed-editorial texture */
.gp-banner-grain {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.3;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

.gp-back {
    position: absolute;
    top: 18px; left: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 14px 8px 9px;
    border-radius: 999px;
    background: rgba(12, 10, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease;
}
.gp-back:hover { background: rgba(12, 10, 16, 0.75); transform: translateX(-2px); }
.gp-back svg { width: 17px; height: 17px; }

.gp-live {
    position: absolute;
    top: 18px; right: 18px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(12, 10, 16, 0.5);
    border: 1px solid rgba(46, 204, 113, 0.45);
    backdrop-filter: blur(10px);
    color: #eafff2;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.gp-live-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #2ecc71;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6);
    animation: gpPulse 2s ease-out infinite;
}

.gp-banner-foot {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    gap: clamp(14px, 2.2vw, 26px);
    width: 100%;
    padding: clamp(20px, 3.2vw, 40px);
}

.gp-avatar-wrap { position: relative; flex: 0 0 auto; }
.gp-avatar-wrap.js-open-gallery { cursor: pointer; }
.gp-avatar-wrap.js-open-gallery:focus-visible { outline: 2px solid var(--message-bubble); outline-offset: 4px; border-radius: 50%; }
.js-open-gallery:hover .gp-avatar { box-shadow: 0 0 0 4px color-mix(in srgb, var(--message-bubble) 70%, transparent), 0 14px 40px -12px rgba(0, 0, 0, 0.8); }
.gp-avatar {
    width: clamp(84px, 11vw, 124px);
    height: clamp(84px, 11vw, 124px);
    border-radius: 50%;
    overflow: hidden;
    background: var(--bg-input);
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--message-bubble) 55%, transparent),
        0 14px 40px -12px rgba(0, 0, 0, 0.8);
    display: flex; align-items: center; justify-content: center;
}
.gp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gp-avatar-icon { font-size: 42px; opacity: 0.5; }

.gp-identity { flex: 1 1 auto; min-width: 0; }
.gp-name {
    margin: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.9rem, 4.6vw, 3.2rem);
    line-height: 1.04;
    color: #fff;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.55);
}
.gp-verified {
    display: inline-flex;
    width: clamp(20px, 2.4vw, 26px);
    height: clamp(20px, 2.4vw, 26px);
    color: var(--message-bubble);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.gp-verified svg { width: 100%; height: 100%; }
.gp-age {
    font-family: -apple-system, system-ui, sans-serif;
    font-weight: 500;
    font-size: clamp(0.95rem, 1.6vw, 1.25rem);
    color: rgba(255, 255, 255, 0.7);
    padding: 2px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

.gp-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.gp-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.92);
    font-size: 12.5px;
    font-weight: 600;
}
.gp-chip svg { width: 15px; height: 15px; opacity: 0.85; }
.gp-chip--new { color: #fff; border-color: color-mix(in srgb, var(--message-bubble) 60%, transparent); }

.gp-bio {
    margin: 12px 0 0;
    max-width: 62ch;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(0.92rem, 1.3vw, 1.02rem);
    line-height: 1.5;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.gp-banner-actions { flex: 0 0 auto; align-self: flex-end; }
.gp-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.gp-chat-btn:hover {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.8);
}
.gp-chat-btn svg { width: 18px; height: 18px; }

/* ---------- Section head ------------------------------------------------- */
.gp-content { padding-top: clamp(30px, 4.5vw, 56px); }
.gp-section-head { margin-bottom: clamp(20px, 3vw, 34px); }
.gp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.gp-eyebrow-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--message-bubble);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--message-bubble) 28%, transparent);
}
.gp-heading {
    margin: 12px 0 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.7rem, 4vw, 2.9rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    text-wrap: balance;
}
.gp-subheading {
    margin: 0;
    max-width: 56ch;
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    line-height: 1.55;
}

/* ---------- Content grid ------------------------------------------------- */
.gp-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: clamp(12px, 1.5vw, 20px);
}
@media (min-width: 640px)  { .gp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 940px)  { .gp-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1180px) { .gp-grid { grid-template-columns: repeat(5, 1fr); } }

.gp-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: var(--bg-input);
    border: 1px solid var(--border-main);
    box-shadow: 0 18px 40px -34px rgba(0, 0, 0, 0.7);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease, border-color 0.28s ease;
    animation: gpCardIn 0.5s ease both;
}
@media (hover: hover) {
    .gp-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 26px 50px -28px rgba(0, 0, 0, 0.7);
        border-color: color-mix(in srgb, var(--message-bubble) 45%, var(--border-main));
    }
}

.gp-card-media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: color-mix(in srgb, var(--message-bubble) 12%, transparent);
}
.gp-card-media img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (hover: hover) { .gp-card:hover .gp-card-media img { transform: scale(1.06); } }
.gp-card-shade {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 42%);
}
.gp-card-noimg {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 46px; opacity: 0.55;
}
.gp-card--exhausted .gp-card-media img { filter: grayscale(0.55) brightness(0.82); }

.gp-card-kind {
    position: absolute;
    top: 10px; left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(12, 10, 16, 0.6);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.gp-card-kind svg { width: 13px; height: 13px; }
.gp-card-owned {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(46, 204, 113, 0.92);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}
.gp-card-label {
    position: absolute;
    left: 12px; right: 12px; bottom: 11px;
    z-index: 2;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.05rem;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
    line-height: 1.2;
}

.gp-card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    margin-top: auto;
}

/* ---------- Buttons ------------------------------------------------------ */
.gp-gen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 11px 15px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--message-bubble) 92%, #fff) 0%,
        var(--message-bubble) 55%,
        color-mix(in srgb, var(--message-bubble) 70%, #000) 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 12px 26px -16px color-mix(in srgb, var(--message-bubble) 95%, transparent);
}
.gp-gen-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.gp-gen-btn:active { transform: translateY(0); }
.gp-gen-btn--video {
    background: color-mix(in srgb, var(--message-bubble) 16%, transparent);
    color: var(--text-primary);
    box-shadow: none;
    border: 1px solid color-mix(in srgb, var(--message-bubble) 45%, var(--border-main));
}
.gp-gen-btn--video:hover { background: color-mix(in srgb, var(--message-bubble) 26%, transparent); filter: none; }

.gp-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}
.gp-gen-btn--video .gp-price { background: color-mix(in srgb, var(--message-bubble) 22%, transparent); }
.gp-coin { width: 14px; height: 14px; object-fit: contain; }

.gp-card-done {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 7px 0;
}

/* ---------- Custom request card ------------------------------------------ */
.gp-card--custom {
    position: relative;
    padding: clamp(15px, 1.6vw, 19px);
    background:
        radial-gradient(120% 100% at 0% 0%, color-mix(in srgb, var(--message-bubble) 26%, var(--bg-input)) 0%, var(--bg-input) 62%);
    border: 1px solid color-mix(in srgb, var(--message-bubble) 50%, var(--border-main));
    overflow: hidden;
}
.gp-card--custom::before {
    /* soft glow corner */
    content: "";
    position: absolute;
    top: -40%; left: -30%;
    width: 80%; height: 80%;
    background: radial-gradient(circle, color-mix(in srgb, var(--message-bubble) 40%, transparent) 0%, transparent 70%);
    pointer-events: none;
}
.gp-custom-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
}
.gp-custom-spark {
    display: inline-flex;
    width: 22px; height: 22px;
    color: var(--message-bubble);
    filter: drop-shadow(0 2px 6px color-mix(in srgb, var(--message-bubble) 60%, transparent));
}
.gp-custom-spark svg { width: 100%; height: 100%; }
.gp-custom-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
}
.gp-custom-sub {
    position: relative;
    margin: 7px 0 13px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}
.gp-custom-input {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    padding: 12px 14px;
    border: 1px solid var(--border-main);
    border-radius: 13px;
    background: color-mix(in srgb, var(--bg-input) 80%, #000 4%);
    color: var(--text-primary);
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 13px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gp-custom-input::placeholder { color: var(--text-muted); }
.gp-custom-input:focus {
    outline: none;
    border-color: var(--message-bubble);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--message-bubble) 26%, transparent);
}
.gp-gen-btn--custom { margin-top: auto; }

/* ---------- Empty / coming-soon ------------------------------------------ */
.gp-grid--empty { grid-template-columns: 1fr; }
@media (min-width: 720px) {
    .gp-grid--empty { grid-template-columns: minmax(260px, 360px) 1fr; align-items: stretch; }
}
.gp-coming {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px;
    padding: clamp(34px, 6vw, 60px) clamp(20px, 4vw, 44px);
    border-radius: 18px;
    border: 1px dashed var(--border-main);
    background:
        repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--message-bubble) 5%, transparent) 14px 28px);
    color: var(--text-secondary);
}
.gp-coming-icon {
    display: inline-flex;
    width: 46px; height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: color-mix(in srgb, var(--message-bubble) 18%, transparent);
    color: var(--message-bubble);
    margin-bottom: 4px;
}
.gp-coming-icon svg { width: 24px; height: 24px; }
.gp-coming-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    color: var(--text-primary);
}
.gp-coming-sub { margin: 0; max-width: 44ch; font-size: 14px; line-height: 1.55; }

/* ---------- Toast -------------------------------------------------------- */
.gp-toast {
    position: fixed;
    left: 50%; bottom: 28px;
    transform: translate(-50%, 16px);
    z-index: 2000;
    max-width: min(90vw, 420px);
    padding: 13px 22px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--text-primary) 92%, #000);
    color: var(--bg-input);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 22px 50px -20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.gp-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive --------------------------------------------------- */
@media (max-width: 640px) {
    /* taller banner so the bottom avatar/identity never rides up into the
       top Roster / Online controls */
    .gp-banner { min-height: clamp(380px, 96vw, 480px); }
    .gp-banner-foot { flex-wrap: wrap; }
    .gp-banner-actions { width: 100%; }
    .gp-chat-btn { width: 100%; justify-content: center; }
    /* tuck the top controls tight into the corners on phones */
    .gp-back, .gp-live { top: 10px; }
    .gp-back { left: 10px; }
    .gp-live { right: 10px; }
}

/* ---------- Keyframes ---------------------------------------------------- */
@keyframes gpCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.gp-grid .gp-card:nth-child(1) { animation-delay: 0.02s; }
.gp-grid .gp-card:nth-child(2) { animation-delay: 0.06s; }
.gp-grid .gp-card:nth-child(3) { animation-delay: 0.10s; }
.gp-grid .gp-card:nth-child(4) { animation-delay: 0.14s; }
.gp-grid .gp-card:nth-child(5) { animation-delay: 0.18s; }
.gp-grid .gp-card:nth-child(n+6) { animation-delay: 0.22s; }

@keyframes gpPulse {
    0%   { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55); }
    70%  { box-shadow: 0 0 0 9px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

/* ---------- Generate button loading state -------------------------------- */
.gp-gen-btn.is-loading {
    color: transparent !important;
    pointer-events: none;
    position: relative;
}
.gp-gen-btn.is-loading .gp-price { visibility: hidden; }
.gp-gen-btn.is-loading::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 17px; height: 17px;
    margin: -9px 0 0 -9px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    animation: gpSpin 0.7s linear infinite;
}
.gp-gen-btn--video.is-loading::after { border-color: color-mix(in srgb, var(--text-primary) 35%, transparent); border-top-color: var(--text-primary); }
.gp-card--working .gp-card-media { animation: gpWork 1.2s ease-in-out infinite; }

@keyframes gpSpin { to { transform: rotate(360deg); } }
@keyframes gpWork { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

@media (prefers-reduced-motion: reduce) {
    .gp-card { animation: none; }
    .gp-card-media img { transition: none; }
    .gp-live-dot { animation: none; }
    .gp-card--working .gp-card-media { animation: none; }
}
