/**
 * missions.css
 * High-end, ultra-realistic white & glass theme for Frynzy Missions, Daily Quests & Rewards Hub
 */

/* ── Top Bar & Header Buttons ─────────────────────────────────────────────── */
.btn-missions-nav {
    border-radius: 12px;
    font-weight: 800;
    padding: 11px 22px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    box-shadow: 0 4px 18px rgba(255, 0, 127, 0.35);
    background: linear-gradient(135deg, #ff007f 0%, #d946ef 50%, #8b5cf6 100%);
    color: #ffffff !important;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-decoration: none;
}

.btn-missions-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 0, 127, 0.48);
    filter: brightness(1.05);
}

.mission-nav-chip {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.mobile-topbar-btn.mission-mobile-btn {
    position: relative;
    background: rgba(255, 0, 127, 0.08);
    border-color: rgba(255, 0, 127, 0.2);
}

.mission-dot-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 9px;
    height: 9px;
    background: #ff007f;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 0, 127, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(255, 0, 127, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 0, 127, 0); }
}

/* ── Missions Modal Backdrop & Container ──────────────────────────────────── */
.missions-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.missions-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.missions-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    border-radius: 24px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.98);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.missions-modal-backdrop.active .missions-modal-dialog {
    transform: translateY(0) scale(1);
}

/* ── Modal Header ─────────────────────────────────────────────────────────── */
.missions-modal-header {
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 22px 28px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.missions-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.missions-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.12) 0%, rgba(127, 0, 255, 0.12) 100%);
    border: 1.5px solid rgba(255, 0, 127, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #ff007f;
}

.missions-header-title h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -0.3px;
    margin: 0;
}

.missions-header-title p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 3px 0 0;
}

.missions-btn-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}

.missions-btn-close:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    transform: rotate(90deg);
}

/* ── Live User Stats Banner ───────────────────────────────────────────────── */
.missions-stats-banner {
    background: linear-gradient(135deg, #faf5ff 0%, #fff1f2 100%);
    border-bottom: 1px solid #f1f5f9;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-banner-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-banner-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #7c3aed;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.stats-banner-info span {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #64748b;
    display: block;
}

.stats-banner-info strong {
    font-size: 1rem;
    font-weight: 900;
    color: #0f172a;
}

.stats-timer-badge {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    color: #ff007f;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

/* ── Navigation Tabs ──────────────────────────────────────────────────────── */
.missions-nav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    overflow-x: auto;
    scrollbar-width: none;
}

.missions-nav-tabs::-webkit-scrollbar {
    display: none;
}

.missions-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    transition: all 0.2s;
}

.missions-tab-btn:hover {
    color: #ff007f;
}

.missions-tab-btn.active {
    color: #ff007f;
    border-bottom-color: #ff007f;
}

.missions-tab-badge {
    background: rgba(255, 0, 127, 0.1);
    color: #ff007f;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 12px;
}

/* ── Modal Scrollable Content ─────────────────────────────────────────────── */
.missions-modal-body {
    padding: 24px 28px;
    overflow-y: auto;
    max-height: calc(90vh - 200px);
    background: #f8fafc;
}

.missions-tab-pane {
    display: none;
    animation: fadeInTab 0.25s ease;
}

.missions-tab-pane.active {
    display: block;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Quest Cards ──────────────────────────────────────────────────────────── */
.quest-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.quest-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.quest-card.completed {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
}

.quest-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.quest-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.quest-type-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 0, 127, 0.1) 0%, rgba(127, 0, 255, 0.1) 100%);
    color: #ff007f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.quest-type-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.quest-type-icon.gold {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.quest-type-icon.purple {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.quest-title-info h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 4px;
}

.quest-title-info p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.45;
}

.quest-reward-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 0, 127, 0.25);
    white-space: nowrap;
}

.quest-reward-pill.gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.quest-reward-pill.purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* ── Progress Bar ─────────────────────────────────────────────────────────── */
.quest-progress-section {
    margin: 18px 0;
}

.quest-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.88rem;
}

.quest-progress-label {
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quest-progress-counts {
    font-weight: 800;
    color: #0f172a;
}

.quest-progress-track {
    width: 100%;
    height: 12px;
    background: #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff007f 0%, #7f00ff 100%);
    border-radius: 20px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quest-progress-fill.completed {
    background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

/* ── Share & Action Section ───────────────────────────────────────────────── */
.quest-actions-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.quest-link-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.quest-link-input {
    flex: 1;
    background: none;
    border: none;
    font-size: 0.88rem;
    color: #0f172a;
    font-weight: 600;
    outline: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quest-btn-copy {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.quest-btn-copy:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.quest-share-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.share-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s;
}

.share-pill:hover {
    transform: translateY(-2px);
}

.share-pill.whatsapp { background: #25d366; }
.share-pill.telegram { background: #0088cc; }
.share-pill.twitter  { background: #000000; }
.share-pill.facebook { background: #1877f2; }
.share-pill.qr       { background: #475569; }

/* ── Buttons (Start / Claim) ──────────────────────────────────────────────── */
.btn-quest-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(255, 0, 127, 0.25);
    width: fit-content;
}

.btn-quest-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 127, 0.35);
}

.btn-quest-claim {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    animation: pulseClaim 2s infinite;
    width: 100%;
}

@keyframes pulseClaim {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── Video Picker Section (Mission 2) ─────────────────────────────────────── */
.video-picker-form {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    padding: 20px;
    margin-top: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    position: relative;
}

.video-picker-top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.video-picker-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.picker-title-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 0, 127, 0.1);
    color: #ff007f;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.picker-hint-badge {
    font-size: 0.76rem;
    font-weight: 800;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(124, 58, 237, 0.18);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.2px;
}

.video-picker-row {
    display: flex;
    gap: 10px;
    align-items: center;
    position: relative;
}

/* ── Luxury Custom Platform Selector ─────────────────────────────────────── */
.custom-platform-picker {
    position: relative;
    width: 220px;
    flex-shrink: 0;
}

.platform-picker-trigger {
    width: 100%;
    height: 48px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    user-select: none;
}

.platform-picker-trigger:hover,
.platform-picker-trigger.active {
    background: #ffffff;
    border-color: #ff007f;
    box-shadow: 0 4px 16px rgba(255, 0, 127, 0.12);
}

.platform-picker-current {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-align: left;
}

.platform-brand-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.platform-svg-icon {
    width: 100%;
    height: 100%;
    display: block;
}

.platform-current-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.15;
}

.platform-current-text strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.platform-current-text small {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.picker-chevron {
    font-size: 0.78rem;
    color: #94a3b8;
    transition: transform 0.25s ease;
    margin-left: 6px;
    flex-shrink: 0;
}

.picker-chevron.rotate {
    transform: rotate(180deg);
    color: #ff007f;
}

/* ── Custom Platform Dropdown (Floating / Sheet) ─────────────────────────── */
.custom-platform-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 340px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0,0,0,0.03);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-platform-dropdown.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.platform-dropdown-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 800;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.platform-dropdown-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.15s;
    display: none;
}

.platform-dropdown-close:hover {
    color: #ef4444;
}

.platform-dropdown-search-wrap {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
}

.platform-dropdown-search-wrap .search-icon {
    position: absolute;
    left: 24px;
    color: #94a3b8;
    font-size: 0.82rem;
}

.platform-dropdown-search {
    width: 100%;
    padding: 8px 12px 8px 30px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.84rem;
    color: #0f172a;
    outline: none;
    font-family: inherit;
    transition: all 0.15s;
}

.platform-dropdown-search:focus {
    background: #ffffff;
    border-color: #ff007f;
    box-shadow: 0 0 0 3px rgba(255, 0, 127, 0.1);
}

.platform-dropdown-grid {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.platform-card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.platform-card-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(3px);
}

.platform-card-item.active {
    background: rgba(255, 0, 127, 0.06);
    border-color: rgba(255, 0, 127, 0.25);
}

.platform-card-badge {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.platform-card-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.platform-card-text strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #0f172a;
}

.platform-card-text small {
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

.platform-card-tag {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
}

.platform-card-item.active .platform-card-tag {
    color: #ff007f;
    background: rgba(255, 0, 127, 0.12);
}

/* ── Video URL Input & Wrapper ────────────────────────────────────────────── */
.video-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.video-url-input {
    width: 100%;
    height: 48px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    background: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.video-url-input:focus {
    border-color: #ff007f;
    box-shadow: 0 0 0 3.5px rgba(255, 0, 127, 0.14);
    background: #ffffff;
}

.video-url-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* ── Analyze Button ───────────────────────────────────────────────────────── */
.quest-btn-analyze {
    height: 48px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 0 22px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
}

.quest-btn-analyze:hover {
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 0, 127, 0.35);
}

.quest-btn-analyze:active {
    transform: scale(0.97);
}

/* ── High-End Video Preview Card ──────────────────────────────────────────── */
.video-preview-card {
    display: flex;
    gap: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin-top: 14px;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    animation: fadeInTab 0.3s ease;
}

.preview-thumb-container {
    position: relative;
    width: 120px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #0f172a;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.video-preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.preview-quality-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 6px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.3px;
}

.video-preview-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.video-preview-info h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-preview-tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.preview-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #475569;
}

.preview-meta-pill.plat {
    background: rgba(255, 0, 127, 0.08);
    border-color: rgba(255, 0, 127, 0.2);
    color: #ff007f;
}

.preview-pill-svg {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.preview-meta-pill.format {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0284c7;
    font-weight: 800;
}

.video-preview-action {
    flex-shrink: 0;
}

.btn-generate-link {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
    white-space: nowrap;
    padding: 10px 18px !important;
    font-size: 0.88rem !important;
}

.btn-generate-link:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.45) !important;
}

/* ── Rules & FAQ Section ──────────────────────────────────────────────────── */
.rules-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rule-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
}

.rule-block h4 {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.rule-block p {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.6;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 10px;
}

.faq-question {
    padding: 16px 20px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 20px 16px;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

/* ── Claims History Table ─────────────────────────────────────────────────── */
.claims-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.claims-table th {
    background: #f8fafc;
    padding: 14px 18px;
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #64748b;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.claims-table td {
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
}

/* ── 3D Celebration Gift Box Modal ────────────────────────────────────────── */
.celebration-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.celebration-modal-backdrop.active {
    display: flex;
}

.celebration-card {
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    padding: 44px 32px 36px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: zoomCelebrate 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomCelebrate {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.gift-box-3d {
    font-size: 5.5rem;
    color: #ff007f;
    margin-bottom: 20px;
    animation: giftShake 1.2s ease-in-out infinite;
    display: inline-block;
    filter: drop-shadow(0 10px 20px rgba(255, 0, 127, 0.35));
}

@keyframes giftShake {
    0%, 100% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-8deg) scale(1.05); }
    40% { transform: rotate(8deg) scale(1.05); }
    60% { transform: rotate(-4deg) scale(1.02); }
    80% { transform: rotate(4deg) scale(1.02); }
}

.celebrate-title {
    font-size: 1.8rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 10px;
}

.celebrate-reward-amount {
    font-size: 2.1rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 14px;
}

.celebrate-desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 28px;
}

.btn-celebrate-close {
    background: linear-gradient(135deg, #ff007f 0%, #7f00ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 14px;
    padding: 14px 36px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(255, 0, 127, 0.35);
    transition: transform 0.2s;
}

.btn-celebrate-close:hover {
    transform: translateY(-2px);
}

/* ── Shimmer Animation Loader ────────────────────────────────────────────── */
@keyframes missionShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer-loading {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%) !important;
    background-size: 200% 100% !important;
    animation: missionShimmer 1.5s infinite !important;
}

/* ── Platform Mention Autocomplete Popup (@) ────────────────────────────── */
.platform-mention-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.04);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.platform-mention-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.platform-mention-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 800;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.platform-mention-header small {
    font-size: 0.72rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: none;
}

.platform-mention-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.platform-mention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.platform-mention-item:hover,
.platform-mention-item.active {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(3px);
}

.mention-item-badge {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.mention-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.mention-item-info strong {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ff007f;
}

.mention-item-info span {
    font-size: 0.74rem;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mention-item-tag {
    font-size: 0.68rem;
    font-weight: 800;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
}

.platform-mention-item:hover .mention-item-tag {
    color: #ff007f;
    background: rgba(255, 0, 127, 0.12);
}

/* ── Mobile Responsive Architecture ──────────────────────────────────────── */
@media (max-width: 860px) {
    .missions-modal-dialog {
        max-width: 96vw;
    }
    .custom-platform-picker {
        width: 190px;
    }
}

@media (max-width: 768px) {
    .missions-modal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .missions-modal-dialog {
        max-width: 100vw;
        max-height: 94vh;
        border-radius: 24px 24px 0 0;
        margin-top: auto;
    }

    .missions-modal-header {
        padding: 16px 20px 14px;
    }

    .missions-header-left {
        gap: 12px;
    }

    .missions-header-icon {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
        border-radius: 12px;
    }

    .missions-header-title h2 {
        font-size: 1.2rem;
    }

    .missions-header-title p {
        font-size: 0.8rem;
    }

    .missions-stats-banner {
        padding: 10px 16px;
        gap: 10px;
    }

    .stats-banner-item {
        gap: 8px;
    }

    .stats-banner-icon {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .missions-nav-tabs {
        padding: 8px 16px 0;
        gap: 4px;
    }

    .missions-tab-btn {
        padding: 10px 12px;
        font-size: 0.84rem;
    }

    .missions-modal-body {
        padding: 16px;
        max-height: calc(94vh - 185px);
    }

    .quest-card {
        padding: 16px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .quest-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .quest-reward-pill {
        align-self: flex-start;
        padding: 4px 10px;
        font-size: 0.78rem;
    }

    .quest-title-wrap {
        gap: 10px;
    }

    .quest-type-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        border-radius: 11px;
    }

    .quest-title-info h3 {
        font-size: 1rem;
    }

    .quest-title-info p {
        font-size: 0.82rem;
    }

    /* Video Picker Responsive Rows */
    .video-picker-form {
        padding: 14px;
        border-radius: 16px;
    }

    .video-picker-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .custom-platform-picker {
        width: 100%;
    }

    .custom-platform-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 75vh;
        border-radius: 24px 24px 0 0;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
        border: none;
        border-top: 1.5px solid #e2e8f0;
        z-index: 100000;
    }

    .platform-dropdown-header {
        padding: 14px 18px;
    }

    .platform-dropdown-close {
        display: block;
    }

    .platform-dropdown-grid {
        max-height: 55vh;
    }

    .video-input-wrapper {
        width: 100%;
    }

    .quest-btn-analyze {
        width: 100%;
        justify-content: center;
    }

    /* Video Preview Card Mobile Grid */
    .video-preview-card {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }

    .preview-thumb-container {
        width: 100%;
        height: 160px;
        border-radius: 12px;
    }

    .video-preview-info h4 {
        font-size: 0.92rem;
    }

    .video-preview-action {
        width: 100%;
    }

    .btn-generate-link {
        width: 100% !important;
        justify-content: center;
    }

    .quest-share-pills {
        gap: 6px;
    }

    .share-pill {
        padding: 6px 12px;
        font-size: 0.78rem;
    }

    .quest-link-box {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .quest-btn-copy {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .preview-thumb-container {
        height: 135px;
    }

    .stats-banner-info strong {
        font-size: 0.88rem;
    }

    .stats-timer-badge {
        width: 100%;
        justify-content: center;
    }
}
