/* Site-wide additions on top of styles.css */

/* Clickable WebStories title */
.title-link {
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.15s ease;
}
.title-link:hover { transform: translateY(-1px); filter: brightness(1.15); }
.title-link:active { transform: translateY(0); }
.title-link .title { margin: 0; }

/* Make every image keep its aspect ratio on small screens */
img { max-width: 100%; height: auto; }

/* Empty-state line for genre filter */
.muted-line { font-style: italic; padding: 24px; }

/* Upcoming shop product (greyed out, not clickable) */
.upcoming-product {
    background: rgba(13, 18, 34, 0.85);
    border: 1px dashed rgba(107, 247, 255, 0.25);
    border-radius: 16px; padding: 22px;
    text-align: center; color: #9aa6c0;
    position: relative; overflow: hidden;
    opacity: 0.85;
}
.upcoming-product img {
    width: 100%; max-width: 200px; height: auto; aspect-ratio: 3/4; object-fit: cover;
    border-radius: 12px; filter: grayscale(0.75) brightness(0.7);
    margin: 0 auto 14px; display: block;
}
.upcoming-product h4 { color: #c5d4ee; margin: 6px 0 4px; font-family: 'Montserrat',sans-serif; }
.upcoming-product .upcoming-format { color: #ffd700; font-weight: 700; letter-spacing: 0.05em; font-size: 0.85em; text-transform: uppercase; margin-bottom: 8px; }
.upcoming-product .upcoming-price { color: #c5d4ee; font-size: 1.1em; margin: 4px 0 14px; }
.upcoming-product .upcoming-pill {
    display: inline-block; padding: 7px 16px; border-radius: 999px;
    background: rgba(122, 138, 170, 0.18); border: 1px solid rgba(122, 138, 170, 0.4);
    color: #9aa6c0; font-weight: 800; letter-spacing: 0.08em; font-size: 0.85em;
    cursor: not-allowed; user-select: none;
}
.upcoming-banner {
    position: absolute; top: 14px; right: -36px; transform: rotate(35deg);
    background: linear-gradient(135deg, #ffd700, #ff79f2);
    color: #1a0a30; font-weight: 800; font-size: 0.75em; letter-spacing: 0.1em;
    padding: 4px 36px; box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.section-divider {
    text-align: center; color: #6bf7ff; font-family: 'Montserrat',sans-serif;
    letter-spacing: 0.1em; margin: 36px 0 18px;
    position: relative; padding: 0 20px;
}
.section-divider::before, .section-divider::after {
    content: ''; position: absolute; top: 50%; width: 30%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(107, 247, 255, 0.4), transparent);
}
.section-divider::before { left: 0; }
.section-divider::after { right: 0; }

.upcoming-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

/* ================= Accessible text on dark background =================== */
/* Use the same blue→purple gradient as the buttons for readable accent text */
.gradient-text {
    background: linear-gradient(135deg, #6bf7ff 0%, #ff79f2 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    font-weight: 600;
}
.bright-text { color: #d7e5ff; }

/* ================= Generic in-page modal =================== */
.ws-modal-overlay {
    position: fixed; inset: 0; background: rgba(2, 4, 12, 0.75);
    display: none; align-items: center; justify-content: center; z-index: 200;
    padding: 20px; backdrop-filter: blur(4px);
}
.ws-modal-overlay.is-open { display: flex; }
.ws-modal {
    background: linear-gradient(180deg, rgba(15,18,38,0.98), rgba(17,10,32,0.98));
    border: 1px solid rgba(107,247,255,0.3); border-radius: 18px;
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    padding: 28px; color: #e9f2ff;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 30px rgba(107,247,255,0.08);
    position: relative;
}
.ws-modal h3 {
    margin: 0 0 6px; font-family: 'Montserrat',sans-serif; font-weight: 800;
    color: #6bf7ff; letter-spacing: 0.06em; font-size: 1.35rem;
}
.ws-modal .ws-modal-sub { color: #b8c4dc; margin: 0 0 18px; font-size: 0.95em; }
.ws-modal label { display: block; color: #c5d4ee; margin: 12px 0 6px; font-weight: 600; font-size: 0.9em; }
.ws-modal input[type=text], .ws-modal input[type=url], .ws-modal input[type=file], .ws-modal textarea {
    width: 100%; background: rgba(13, 18, 34, 0.85);
    border: 1px solid rgba(107, 247, 255, 0.25); color: #fff;
    padding: 11px 14px; border-radius: 10px; font-family: inherit; font-size: 0.95em;
    box-sizing: border-box;
}
.ws-modal textarea { min-height: 110px; resize: vertical; }
.ws-modal .ws-modal-actions {
    display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap;
}
.ws-modal .btn-primary {
    background: linear-gradient(135deg, #6bf7ff 0%, #ff79f2 100%);
    color: #1a0a30; border: none; padding: 10px 22px; border-radius: 999px;
    font-weight: 800; cursor: pointer; font-family: 'Montserrat',sans-serif; letter-spacing: 0.04em;
    transition: filter 0.15s ease, transform 0.05s ease;
}
.ws-modal .btn-primary:hover { filter: brightness(1.08); }
.ws-modal .btn-primary:active { transform: translateY(1px); }
.ws-modal .btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.ws-modal .btn-ghost {
    background: transparent; color: #c5d4ee; border: 1px solid rgba(107, 247, 255, 0.3);
    padding: 10px 20px; border-radius: 999px; font-weight: 700; cursor: pointer;
}
.ws-modal .btn-ghost:hover { background: rgba(255, 121, 242, 0.12); color: #ff79f2; }
.ws-modal .close-x {
    position: absolute; top: 14px; right: 16px; background: transparent; border: none;
    color: #9aa6c0; font-size: 1.4rem; cursor: pointer; line-height: 1; padding: 0;
}
.ws-modal .close-x:hover { color: #ff79f2; }
.ws-modal .help-text { color: #8a98b8; font-size: 0.85em; margin-top: 6px; }
.ws-modal .error-text { color: #ff8b9a; margin: 8px 0 0; min-height: 1.2em; font-size: 0.9em; }
.ws-modal .pfp-options {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 14px;
}
.ws-modal .pfp-option {
    background: rgba(13, 18, 34, 0.85); border: 2px solid rgba(107, 247, 255, 0.2);
    border-radius: 12px; padding: 12px; text-align: center; cursor: pointer;
    transition: border-color 0.15s ease;
}
.ws-modal .pfp-option:hover { border-color: rgba(255, 121, 242, 0.5); }
.ws-modal .pfp-option.is-selected { border-color: #ff79f2; box-shadow: 0 0 14px rgba(255,121,242,0.35); }
.ws-modal .pfp-option img {
    width: 100%; max-width: 120px; aspect-ratio: 1; object-fit: cover;
    border-radius: 10px; margin: 0 auto 6px; display: block;
}
.ws-modal .pfp-option-label { color: #c5d4ee; font-weight: 600; font-size: 0.85em; }

/* ================= Creator + Supporter pills =================== */
.creator-pill, .supporter-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 12px; border-radius: 999px;
    font-family: 'Montserrat',sans-serif; font-weight: 800;
    font-size: 0.72em; letter-spacing: 0.12em; text-transform: uppercase;
    margin-left: 10px; vertical-align: middle; user-select: none;
    position: relative; overflow: hidden;
}
/* Creator: rainbow shimmer */
.creator-pill {
    background: linear-gradient(120deg, #ff79f2, #ffd700, #6bf7ff, #ff79f2);
    background-size: 200% 200%; color: #1a0a30;
    box-shadow: 0 0 18px rgba(255, 121, 242, 0.45), 0 0 24px rgba(107, 247, 255, 0.25);
    animation: creator-shimmer 4s linear infinite, creator-pulse 3s ease-in-out infinite;
}
@keyframes creator-shimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
@keyframes creator-pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(255, 121, 242, 0.45), 0 0 24px rgba(107, 247, 255, 0.25); }
    50% { box-shadow: 0 0 24px rgba(255, 215, 0, 0.55), 0 0 30px rgba(107, 247, 255, 0.4); }
}
.creator-pill::before { content: '★'; font-size: 0.9em; }
/* Supporter: cute bouncing heart pill */
.supporter-pill {
    background: linear-gradient(135deg, #ffb1d8 0%, #ff79f2 100%);
    color: #4a0a3a; box-shadow: 0 4px 14px rgba(255, 121, 242, 0.3);
    animation: supporter-bounce 2.4s ease-in-out infinite;
}
.supporter-pill::before {
    content: '♥'; font-size: 1em;
    animation: heart-pop 1.6s ease-in-out infinite;
}
@keyframes supporter-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
@keyframes heart-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); color: #ff2266; }
}

/* ================= Donations section on profile =================== */
.donations-card {
    background: linear-gradient(135deg, rgba(255, 121, 242, 0.14) 0%, rgba(107, 247, 255, 0.14) 100%);
    border: 1px solid rgba(255, 121, 242, 0.3);
    border-radius: 16px; padding: 18px 22px; margin-top: 16px;
    color: #fff; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.donations-card .donations-label {
    text-transform: uppercase; letter-spacing: 0.12em;
    background: linear-gradient(135deg, #6bf7ff 0%, #ff79f2 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    font-weight: 800; font-size: 0.85em;
}
.donations-card .donations-amount {
    font-family: 'Montserrat',sans-serif; font-weight: 800; font-size: 1.6rem;
    color: #ffd966;
    text-shadow: 0 0 18px rgba(255, 217, 102, 0.35);
}
.donations-card .donations-meta { color: #c5d4ee; font-size: 0.9em; }

/* Profile reading-area panels keep aspect ratio (no squish) */
.reading-area .panel img,
.reading-area img { width: 100%; height: auto; display: block; object-fit: contain; }

/* Admin badge anchor in the nav */
.admin-link {
    background: linear-gradient(135deg, #ffd700, #ff79f2) !important;
    color: #1a0a30 !important; font-weight: 800 !important;
    border-color: transparent !important;
}

/* Building Mode banner */
.building-banner {
    position: sticky; top: 0; z-index: 50;
    background: linear-gradient(90deg, #ffd700, #ff79f2);
    color: #1a0a30; text-align: center; padding: 8px 14px;
    font-family: 'Montserrat',sans-serif; font-weight: 800; letter-spacing: 0.08em;
    box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}
.building-banner a { color: #1a0a30; text-decoration: underline; margin-left: 10px; }

/* ===== Responsive overrides — fix image squish at small viewports ===== */
.comic-card { align-items: flex-start; flex-wrap: wrap; }
.comic-cover {
    width: 40%;
    max-width: 240px;
    aspect-ratio: 3 / 4;
    height: auto !important;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    flex-grow: 0;
    display: block;
}
@media (max-width: 720px) {
    .comic-card { width: 92%; flex-direction: column; align-items: center; }
    .comic-cover { width: 80%; max-width: 280px; aspect-ratio: 3 / 4; height: auto !important; }
    .comic-info { padding-left: 0 !important; padding-top: 14px; width: 100%; }
}

/* ===== First-time animated intro overlay ===== */
.intro-overlay {
    position: fixed; inset: 0; z-index: 999;
    background: radial-gradient(circle at 50% 40%, rgba(255,121,242,0.18), transparent 50%),
                radial-gradient(circle at 50% 60%, rgba(107,247,255,0.18), transparent 50%),
                linear-gradient(160deg, #050614 0%, #0e0a22 55%, #050308 100%);
    display: flex; align-items: center; justify-content: center;
    animation: intro-bg-pulse 4s ease-in-out infinite;
}
.intro-overlay.is-fading-out {
    animation: intro-fade-out 1s ease-out forwards;
    pointer-events: none;
}
.intro-stack {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    text-align: center; padding: 24px;
}
.intro-line {
    opacity: 0; font-family: 'Montserrat',sans-serif; font-weight: 800;
    letter-spacing: 0.06em; color: #e9f2ff;
    text-shadow: 0 0 28px rgba(107,247,255,0.35);
}
.intro-l1 { font-size: clamp(1.6rem, 4vw, 2.6rem); animation: intro-line 1.1s ease-out 0.15s forwards; }
.intro-l2 { font-size: clamp(1.1rem, 2.6vw, 1.6rem); color: #c5d4ee; animation: intro-line 1.1s ease-out 1.0s forwards; font-weight: 600; }
.intro-l3 {
    font-family: 'Fredoka One', cursive; font-size: clamp(2.4rem, 8vw, 5.4rem);
    letter-spacing: 0.12em; line-height: 1.1; animation: intro-brand 1.4s cubic-bezier(0.2,0.7,0.3,1.2) 1.9s forwards;
    color: transparent;
    background: linear-gradient(135deg, #6bf7ff 0%, #ff79f2 50%, #ffd700 100%);
    background-size: 220% 220%;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 24px rgba(255,121,242,0.4));
}
@keyframes intro-line {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes intro-brand {
    0% { opacity: 0; transform: scale(0.7); background-position: 0% 50%; }
    60% { opacity: 1; transform: scale(1.06); background-position: 80% 50%; }
    100% { opacity: 1; transform: scale(1); background-position: 200% 50%; }
}
@keyframes intro-bg-pulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.15); }
}
@keyframes intro-fade-out {
    from { opacity: 1; }
    to { opacity: 0; visibility: hidden; }
}

.intro-press {
    opacity: 0;
    margin-top: 36px;
    font-family: 'Open Sans', sans-serif;
    color: #9aa6c0;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: clamp(0.78rem, 1.4vw, 0.95rem);
    font-weight: 600;
    transition: opacity 0.6s ease;
    animation: intro-press-pulse 2s ease-in-out infinite;
    cursor: pointer;
    text-shadow: 0 0 12px rgba(107, 247, 255, 0.4);
}
.intro-press.is-visible { opacity: 1; }
@keyframes intro-press-pulse {
    0%, 100% { color: #9aa6c0; text-shadow: 0 0 8px rgba(107, 247, 255, 0.25); }
    50% { color: #6bf7ff; text-shadow: 0 0 18px rgba(107, 247, 255, 0.7); }
}

/* ===== Ad slots ===== */
.ad-slot {
    display: none;
    max-width: 1200px;
    margin: 18px auto;
    padding: 0 16px;
}
.ad-slot.is-active { display: block; }
.ad-slot a {
    display: block; position: relative;
    border-radius: 14px; overflow: hidden;
    border: 1px solid rgba(107,247,255,0.18);
    box-shadow: 0 10px 30px rgba(0,0,0,0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ad-slot a:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(255,121,242,0.25); }
.ad-slot img { display: block; width: 100%; height: auto; }
.ad-slot::before {
    content: 'AD'; display: inline-block; font-size: 0.65em; font-weight: 800;
    letter-spacing: 0.18em; color: #9aa6c0;
    padding: 3px 10px; border-radius: 999px;
    background: rgba(15, 24, 60, 0.7); border: 1px solid rgba(107,247,255,0.18);
    margin-bottom: 6px;
}
.ad-slot-footer { margin-top: 36px; }

/* ===== Site-wide footer ===== */
.site-foot,
body > footer,
.reader-foot {
    text-align: center;
    padding: 22px 16px 36px;
    margin-top: 36px;
    color: #c5d4ee;
    font-size: 0.92em;
    border-top: 1px solid rgba(107, 247, 255, 0.12);
    background: linear-gradient(180deg, transparent, rgba(13, 18, 34, 0.45));
}
.site-foot p, body > footer p, .reader-foot p { margin: 4px 0; }
.foot-link {
    color: #6bf7ff;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.15s ease;
}
.foot-link:hover { color: #ff79f2; text-decoration: underline; }
.foot-sep { color: #5b6680; margin: 0 8px; }

/* ===== Donation page — PayPal + CashApp buttons ===== */
.checkout-button.paypal-btn,
.checkout-button.cashapp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 800;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
    border: none;
}
.checkout-button.paypal-btn {
    background: linear-gradient(135deg, #003087 0%, #009cde 100%);
    color: #fff;
}
.checkout-button.paypal-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.checkout-button.paypal-btn::before { content: 'P'; background: #fff; color: #003087; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.85em; }
.checkout-button.cashapp-btn {
    background: linear-gradient(135deg, #00d54b, #00b13e);
    color: #fff;
}
.checkout-button.cashapp-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.checkout-button.cashapp-btn::before { content: '$'; background: #fff; color: #00b13e; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 0.95em; }

/* ===== Languages picker (footer) ===== */
.lang-picker {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    padding: 2px 12px;
    border: 1px solid rgba(107, 247, 255, 0.25);
    border-radius: 999px;
    color: #6bf7ff;
    font-weight: 700;
    font-size: 0.92em;
    cursor: pointer;
    background: rgba(13, 18, 34, 0.45);
    transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-picker:hover, .lang-picker:focus-within {
    border-color: #ff79f2;
    color: #ff79f2;
    outline: none;
}
.lang-picker-cur {
    background: linear-gradient(135deg, #6bf7ff, #ff79f2);
    color: #1a0a30;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 0.74em;
    font-weight: 800;
    letter-spacing: 0.08em;
}
.lang-picker-caret { font-size: 0.7em; opacity: 0.7; }
.lang-picker-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(13, 18, 34, 0.97);
    border: 1px solid rgba(107, 247, 255, 0.35);
    border-radius: 12px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1200;
}
.lang-picker:hover .lang-picker-menu,
.lang-picker:focus-within .lang-picker-menu,
.lang-picker .lang-picker-menu:hover { display: flex; }
.lang-opt {
    background: transparent;
    border: none;
    color: #c5d4ee;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9em;
    transition: background 0.12s ease, color 0.12s ease;
    width: 100%;
}
.lang-opt:hover { background: rgba(255, 121, 242, 0.16); color: #ff79f2; }
.lang-opt.is-active {
    background: linear-gradient(135deg, rgba(107,247,255,0.22), rgba(255,121,242,0.22));
    color: #6bf7ff;
    font-weight: 700;
}

/* ===== Report button on comments ===== */
.report-btn {
    background: transparent; border: none; color: #ff8b9a;
    cursor: pointer; font-weight: 700; padding: 0; margin-left: 8px;
    font-size: 0.82em; opacity: 0.7;
}
.report-btn:hover { opacity: 1; color: #ff5a7a; text-decoration: underline; }
