/* ========================================
   Public Creator Support Page - Light Theme
   ======================================== */

.public-page-body {
    background: #f8fafc;
    color: #1e293b;
    font-family: 'Inter', sans-serif;
}

.public-page-body .glass-card {
    background: #ffffff;
    backdrop-filter: none;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    padding: 1.5rem;
}
.public-page-body .glass-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: none;
}

.creator-header {
    position: relative;
    margin-bottom: 2rem;
}
.creator-cover {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    opacity: 1;
}
.creator-avatar-wrap {
    position: relative;
    margin-top: -60px;
    text-align: center;
}
.creator-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    object-fit: cover;
    background: rgba(37,99,235,0.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.support-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 24px;
    color: #1e293b;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.support-btn:hover, .support-btn.active {
    border-color: var(--primary);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary);
}
.public-support-disabled {
    cursor: not-allowed;
    opacity: 0.72;
}
.public-support-unavailable {
    border-style: dashed;
    background: #f8fafc;
}

/* Gift grid - 5 per row desktop, 3 per row mobile */
.gift-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
}
.gift-grid-item { min-width: 0; }

.sticker-item, .gift-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    height: 100%;
}
.sticker-item:hover, .sticker-item.selected,
.gift-item:hover, .gift-item.selected {
    border-color: var(--secondary);
    background: rgba(124, 58, 237, 0.05);
}
.sticker-item img, .gift-item img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.gift-media {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

/* Exclusive Member Card */
.exclusive-member-card {
    display: inline-block;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(245,158,11,0.3);
    letter-spacing: 0.03em;
}

.goal-bar {
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.goal-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.5s ease;
}
.public-goal-logo-bar {
    position: relative;
    min-height: 28px;
}
.public-goal-logo {
    position: absolute;
    left: 8px;
    top: 50%;
    z-index: 3;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
.public-goal-logo img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: block;
}

.qr-image {
    max-width: 220px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Recent/Top supporters */
.supporter-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}
.supporter-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

/* Light theme form overrides */
.public-page-body .form-control {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}
.public-page-body .form-control:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    color: #1e293b;
}
.public-page-body .form-label {
    color: #475569;
}
.public-page-body .text-muted {
    color: #64748b !important;
}

/* QR Payment section */
.public-page-body .qr-payment-section {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 1.5rem;
}

/* Terms Modal - keep dark for contrast */
.public-page-body .modal-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
}
.public-page-body .modal-header {
    border-bottom: 1px solid #e2e8f0;
}
.public-page-body .modal-footer {
    border-top: 1px solid #e2e8f0;
}
.public-page-body .btn-close-white {
    filter: none;
}

/* Footer */
.public-page-body footer {
    border-color: #e2e8f0 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .public-page-body .container { padding-left: 12px; padding-right: 12px; }
    .creator-cover { height: 140px; border-radius: 12px; }
    .creator-avatar { width: 90px; height: 90px; }
    .creator-avatar-wrap { margin-top: -45px; }
    .public-page-body .glass-card { padding: 1rem; border-radius: 12px; }
    .qr-image { max-width: 180px; }
    .support-btn { padding: 8px 16px; font-size: 0.85rem; }
    .gift-grid { grid-template-columns: repeat(3, 1fr); }
    .sticker-item, .gift-item { padding: 0.5rem; }
    .sticker-item img, .gift-item img { width: 48px; height: 48px; }
    .gift-media { width: 48px; height: 48px; }
    h3 { font-size: 1.3rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 0.95rem; }
}

@media (max-width: 575px) {
    .creator-cover { height: 120px; }
    .creator-avatar { width: 80px; height: 80px; }
    .row.g-4 > .col-lg-7, .row.g-4 > .col-lg-5 { padding-left: 0; padding-right: 0; }
}

/* Terms modal mobile */
@media (max-width: 768px) {
    .modal-dialog { margin: 0.5rem; }
    .modal-body { max-height: 50vh !important; }
    .modal-content { border-radius: 12px; }
}

/* Color picker */
.form-control-color {
    width: 40px;
    height: 40px;
    padding: 2px;
    border-radius: 8px;
    cursor: pointer;
}

/* Goal bar animations */
.goal-pulse .goal-progress { animation: goalPulse 2s ease-in-out infinite; }
.goal-glow .goal-progress { box-shadow: 0 0 10px currentColor; animation: goalGlow 2s ease-in-out infinite; }
.goal-stripe .goal-progress { background-image: linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent); background-size: 20px 20px; animation: stripeMove 1s linear infinite; }
@keyframes goalPulse { 0%,100%{opacity:1;} 50%{opacity:0.7;} }
@keyframes goalGlow { 0%,100%{box-shadow:0 0 5px currentColor;} 50%{box-shadow:0 0 15px currentColor;} }
@keyframes stripeMove { 0%{background-position:0 0;} 100%{background-position:20px 0;} }

/* ========================================
   Public Creator Page Themes
   ======================================== */

body.public-page-body:has(.public-theme) {
    background: #070b18;
    color: #f8fafc;
}

body.public-page-body:has(.public-theme-minimal) {
    background: #f8fafc;
    color: #0f172a;
}

.public-theme {
    --pt-bg: #070b18;
    --pt-card: rgba(15, 23, 42, 0.76);
    --pt-card-strong: rgba(30, 27, 75, 0.82);
    --pt-border: rgba(124, 108, 255, 0.28);
    --pt-text: #f8fafc;
    --pt-muted: #aab4c8;
    --pt-primary: #6c4eff;
    --pt-secondary: #2563eb;
    --pt-accent: #8b5cf6;
    --pt-danger: #ef4444;
    --pt-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    min-height: calc(100vh - 86px);
    color: var(--pt-text);
    background:
        radial-gradient(circle at 18% 8%, rgba(108, 78, 255, 0.22), transparent 34%),
        radial-gradient(circle at 88% 20%, rgba(37, 99, 235, 0.18), transparent 30%),
        linear-gradient(180deg, #080c1d 0%, var(--pt-bg) 58%, #050713 100%);
}

.public-theme .public-theme-container {
    position: relative;
    z-index: 1;
}

.public-theme .glass-card {
    color: var(--pt-text);
    background: var(--pt-card);
    border: 1px solid var(--pt-border);
    border-radius: 24px;
    box-shadow: var(--pt-shadow);
    backdrop-filter: blur(22px);
}

.public-theme .glass-card:hover {
    box-shadow: 0 24px 90px rgba(108, 78, 255, 0.18);
}

.public-theme .public-related-card {
    background: var(--pt-card);
    border-color: var(--pt-border);
}

.public-theme .public-related-creator {
    color: var(--pt-text);
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--pt-border);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.public-theme .public-related-creator:hover {
    color: var(--pt-text);
    background: rgba(255, 255, 255, 0.09);
    border-color: var(--pt-accent);
    transform: translateY(-2px);
}

.public-theme .public-related-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    color: var(--pt-primary);
    background: color-mix(in srgb, var(--pt-primary) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--pt-primary) 24%, transparent);
}

.public-theme .creator-cover {
    height: 220px;
    border-radius: 28px;
    border: 1px solid var(--pt-border);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.public-theme .creator-avatar {
    border-color: rgba(255, 255, 255, 0.75);
    box-shadow: 0 0 0 6px rgba(108, 78, 255, 0.16), 0 0 36px rgba(108, 78, 255, 0.34);
}

.public-theme h3,
.public-theme h5,
.public-theme h6,
.public-theme .fw-semibold,
.public-theme .fw-bold {
    color: var(--pt-text);
}

.public-theme .text-muted,
.public-theme .form-label,
.public-theme small {
    color: var(--pt-muted) !important;
}

.public-theme a.text-muted {
    color: rgba(248, 250, 252, 0.72) !important;
}

.public-theme a.text-muted:hover {
    color: var(--pt-accent) !important;
}

.public-theme .support-btn,
.public-theme .gift-item,
.public-theme .sticker-item {
    color: var(--pt-text);
    background: rgba(255, 255, 255, 0.065);
    border-color: rgba(255, 255, 255, 0.14);
    border-radius: 18px;
}

.public-theme .support-btn:hover,
.public-theme .support-btn.active,
.public-theme .gift-item:hover,
.public-theme .gift-item.selected,
.public-theme .sticker-item:hover,
.public-theme .sticker-item.selected {
    color: #fff;
    background: linear-gradient(135deg, rgba(108, 78, 255, 0.24), rgba(37, 99, 235, 0.18));
    border-color: var(--pt-accent);
    box-shadow: 0 0 24px rgba(108, 78, 255, 0.18);
}

.public-theme .form-control,
.public-theme .form-select {
    color: var(--pt-text);
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
}

.public-theme .form-control:focus,
.public-theme .form-select:focus {
    color: var(--pt-text);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--pt-primary);
    box-shadow: 0 0 0 3px rgba(108, 78, 255, 0.18);
}

.public-theme .form-control::placeholder {
    color: rgba(226, 232, 240, 0.52);
}

.public-theme .btn-gradient,
.public-theme .btn-primary {
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--pt-primary), var(--pt-secondary));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.24);
}

.public-theme .btn-outline-primary {
    color: var(--pt-accent);
    border-color: var(--pt-accent);
    border-radius: 999px;
}

.public-theme .btn-outline-primary:hover {
    color: #fff;
    background: var(--pt-primary);
}

.public-theme .qr-payment-section,
.public-theme .public-member-card {
    background: var(--pt-card-strong);
    border: 1px solid var(--pt-border);
}

.public-theme .goal-bar {
    background: rgba(255, 255, 255, 0.12);
}

.public-theme .supporter-row {
    border-color: rgba(255, 255, 255, 0.1);
}

.public-theme .supporter-rank {
    background: linear-gradient(135deg, var(--pt-primary), var(--pt-secondary));
}

.public-theme .nav-pills .nav-link {
    color: var(--pt-muted);
    border-radius: 999px;
}

.public-theme .nav-pills .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--pt-primary), var(--pt-secondary));
}

.public-live-card {
    border-color: rgba(239, 68, 68, 0.3) !important;
    background: rgba(127, 29, 29, 0.18) !important;
}

.live-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #ef4444;
    box-shadow: 0 0 14px #ef4444;
}

.public-theme-dark-neon {
    --pt-bg: #040715;
    --pt-card: rgba(8, 13, 32, 0.78);
    --pt-card-strong: rgba(17, 24, 52, 0.86);
    --pt-border: rgba(139, 92, 246, 0.34);
    --pt-primary: #6c4eff;
    --pt-secondary: #2563eb;
    --pt-accent: #8b5cf6;
    background:
        radial-gradient(circle at 14% 14%, rgba(139, 92, 246, 0.34), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(37, 99, 235, 0.24), transparent 36%),
        linear-gradient(180deg, #050816, #030613);
}

.public-theme-dark-neon .glass-card,
.public-theme-dark-neon .creator-cover {
    box-shadow: 0 0 38px rgba(108, 78, 255, 0.15), var(--pt-shadow);
}

.public-theme-gaming {
    --pt-bg: #080311;
    --pt-card: rgba(10, 8, 24, 0.82);
    --pt-card-strong: rgba(20, 12, 38, 0.9);
    --pt-border: rgba(236, 72, 153, 0.34);
    --pt-primary: #8b5cf6;
    --pt-secondary: #2563eb;
    --pt-accent: #ec4899;
    background:
        linear-gradient(135deg, rgba(236, 72, 153, 0.18), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(34, 211, 238, 0.26), transparent 34%),
        linear-gradient(180deg, #0a0618, #03030a);
}

.public-theme-gaming .glass-card,
.public-theme-gaming .support-btn,
.public-theme-gaming .gift-item,
.public-theme-gaming .sticker-item {
    border-color: rgba(236, 72, 153, 0.32);
    box-shadow: 0 0 28px rgba(236, 72, 153, 0.11), var(--pt-shadow);
}

.public-theme-gaming .creator-cover {
    border-color: rgba(34, 211, 238, 0.42);
}

.public-theme-streamer {
    --pt-bg: #070a18;
    --pt-card: rgba(12, 18, 38, 0.82);
    --pt-card-strong: rgba(17, 24, 52, 0.9);
    --pt-border: rgba(99, 102, 241, 0.3);
    --pt-primary: #6c4eff;
    --pt-secondary: #22d3ee;
    --pt-accent: #ef4444;
    background:
        radial-gradient(circle at 76% 10%, rgba(239, 68, 68, 0.27), transparent 30%),
        radial-gradient(circle at 18% 18%, rgba(108, 78, 255, 0.24), transparent 34%),
        linear-gradient(180deg, #121831, #050713);
}

.public-theme-streamer .creator-cover {
    height: 280px;
}

.public-theme-streamer .public-live-card {
    transform: scale(1.02);
    box-shadow: 0 0 34px rgba(239, 68, 68, 0.18);
}

.public-theme-minimal {
    --pt-bg: #f8fafc;
    --pt-card: rgba(255, 255, 255, 0.96);
    --pt-card-strong: rgba(255, 255, 255, 0.98);
    --pt-border: #dbe3ef;
    --pt-text: #0f172a;
    --pt-muted: #64748b;
    --pt-primary: #2563eb;
    --pt-secondary: #3b82f6;
    --pt-accent: #2563eb;
    --pt-shadow: 0 18px 46px rgba(15, 23, 42, 0.09);
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

.public-theme-minimal .creator-cover,
.public-theme-minimal .creator-avatar {
    box-shadow: var(--pt-shadow);
}

.public-theme-minimal .support-btn,
.public-theme-minimal .gift-item,
.public-theme-minimal .sticker-item,
.public-theme-minimal .form-control,
.public-theme-minimal .form-select {
    color: #0f172a;
    background: #f8fafc;
    border-color: #cbd5e1;
}

.public-theme-minimal .form-control:focus,
.public-theme-minimal .form-select:focus {
    color: #0f172a;
    background: #fff;
}

.public-theme-minimal a.text-muted {
    color: #64748b !important;
}

.public-theme-minimal .text-primary {
    color: #2563eb !important;
}

.public-theme-minimal .public-related-creator {
    background: #f8fafc;
}

@media (max-width: 768px) {
    .public-theme .creator-cover {
        height: 160px;
        border-radius: 20px;
    }

    .public-theme-streamer .creator-cover {
        height: 190px;
    }

    .public-theme .glass-card {
        border-radius: 20px;
    }
}

@media (max-width: 575px) {
    .public-theme {
        min-height: calc(100vh - 76px);
    }

    .public-theme .creator-cover {
        height: 140px;
    }

    .public-theme-streamer .creator-cover {
        height: 160px;
    }
}
