/* ===== Modern SaaS Dark Components & Design System ===== */

/* Base SaaS Cards */
.saas-card {
    background: #111215;
    border: 1px solid #1c1e24;
    border-radius: 16px;
    padding: 28px 32px;
}

/* Autocomplete Suggestions Items */
.empty-hub-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    user-select: none;
}

.empty-hub-suggestion-item:hover {
    background: #1c1e24;
}

.empty-hub-suggestion-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: #000;
    flex-shrink: 0;
}

.suggestion-name {
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
}

.suggestion-add-tag {
    font-size: 11px;
    font-weight: 600;
    background: #232630;
    border: 1px solid #333640;
    color: #f3f4f6;
    padding: 3px 10px;
    border-radius: 10px;
    margin-left: auto;
    transition: all 0.15s ease;
}

.suggestion-add-tag.added {
    background: #22c55e !important;
    border-color: #22c55e !important;
    color: #ffffff !important;
}

/* Search Suggestions Skeleton Shimmer Placeholders */
@keyframes searchShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.search-skeleton-box {
    background: linear-gradient(90deg, #181a20 25%, #262933 50%, #181a20 75%);
    background-size: 200% 100%;
    animation: searchShimmer 1.8s linear infinite;
}

.search-skeleton-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    pointer-events: none;
    user-select: none;
}

.search-sk-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.search-sk-name {
    width: 140px;
    height: 14px;
    border-radius: 4px;
}

.search-sk-tag {
    width: 54px;
    height: 22px;
    border-radius: 10px;
    margin-left: auto;
}

/* ===== Viral Feed Card Skeleton Shimmer Placeholders ===== */
.outlier-card.skeleton-card {
    pointer-events: none;
    cursor: default;
}

.outlier-card.skeleton-card:hover {
    transform: none;
    border-color: #1c1e24;
}

.skeleton-box {
    background: linear-gradient(90deg, #181a20 25%, #262933 50%, #181a20 75%);
    background-size: 200% 100%;
    animation: searchShimmer 1.8s linear infinite;
    border-radius: 8px;
}

.sk-thumb {
    grid-column: span 3;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.sk-thumb.sk-thumb-short {
    aspect-ratio: 9 / 16;
}

.sk-info {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.sk-line {
    height: 14px;
    border-radius: 4px;
}

.sk-metric {
    height: 34px;
}

.sk-actions {
    grid-column: span 3;
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.sk-btn {
    flex: 1;
    height: 31px;
}

/* ===== Empty State Card ===== */
.empty-competitors-card {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 24px;
    background: #111215;
    border-radius: 14px;
    border: 1px solid #1c1e24;
    box-sizing: border-box;
}

.empty-center-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #1a1c22;
    border: 1px solid #282a32;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #9ca3af;
    position: relative;
    margin-bottom: 12px;
}

.empty-circle-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #111215;
}

.empty-center-heading {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.empty-center-sub {
    font-size: 13px;
    color: #9ca3af;
    max-width: 420px;
    line-height: 1.4;
    margin-bottom: 18px;
}

.saas-cta-red-btn {
    background: #ef4444;
    color: #ffffff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    font-family: inherit;
}

.saas-cta-red-btn:hover {
    background: #dc2626;
}

.go-to-feed-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #facc15;
    border: 1px solid #eab308;
    color: #09090b;
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.go-to-feed-btn i {
    color: #09090b;
}

.go-to-feed-btn:hover {
    background: #eab308;
    color: #09090b;
    border-color: #ca8a04;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
}

/* ===== Viral Feed Headers & Outlier Leaderboard ===== */
.format-switcher-capsules {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #111215;
    border: 1px solid #1c1e24;
    border-radius: 10px;
    padding: 3px;
}

.format-capsule-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: #9ca3af;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.format-capsule-btn:hover {
    color: #ffffff;
}

.format-capsule-btn.active {
    background: #232630;
    border-color: #383c4a;
    color: #ffffff;
}

.feed-refresh-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111215;
    border: 1px solid #1c1e24;
    color: #9ca3af;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

.feed-refresh-action-btn:hover {
    background: #16181d;
    color: #ffffff;
}

/* Leaderboard List Container & Saved Ideas Leaderboard */
.leaderboard-list-container, .saved-ideas-leaderboard {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    width: 100%;
}

.saved-ideas-leaderboard {
    align-items: start;
}

/* Outlier Card Component */
.outlier-card {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    background: #111215;
    border: 1px solid #1c1e24;
    border-radius: 12px;
    padding: 16px;
    transition: transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    position: relative;
    user-select: none;
    align-items: stretch;
    box-sizing: border-box;
    width: 100%;
}

.outlier-card:hover {
    transform: translateY(-2px);
    border-color: #2b2e38;
}

/* Rank 1 Champion Palette */
.outlier-card.rank-one-champion {
    background: linear-gradient(135deg, #f59e0b 0%, #eab308 50%, #fbbf24 100%) !important;
    border: 1px solid #fef08a !important;
}

.outlier-card.rank-one-champion .rank-trophy-gold {
    color: #451a03 !important;
}

.outlier-card.rank-one-champion .rank-num-gold {
    color: #451a03 !important;
    font-weight: 900;
}

.outlier-card.rank-one-champion .outlier-video-title {
    color: #09090b !important;
    font-weight: 800;
}

.outlier-card.rank-one-champion .outlier-author-name {
    color: #18181b !important;
    font-weight: 700;
}

.outlier-card.rank-one-champion .verified-badge {
    color: #451a03 !important;
}

.outlier-card.rank-one-champion .outlier-channel-meta {
    color: #27272a !important;
    font-weight: 500;
}

.outlier-card.rank-one-champion .outlier-vph-highlight {
    color: #09090b !important;
    font-weight: 900;
}

.outlier-card.rank-one-champion .outlier-vph-label {
    color: #451a03 !important;
    font-weight: 700;
}

.outlier-card.rank-one-champion .outlier-views-val {
    color: #09090b !important;
    font-weight: 900;
}

.outlier-card.rank-one-champion .outlier-views-label {
    color: #451a03 !important;
    font-weight: 700;
}

.outlier-card.rank-one-champion .outlier-published-val {
    color: #09090b !important;
    font-weight: 900;
}

.outlier-card.rank-one-champion .outlier-published-label {
    color: #451a03 !important;
    font-weight: 700;
}

.outlier-card.rank-one-champion .card-action-btn {
    background: #09090b !important;
    color: #f8fafc !important;
    border-color: #18181b !important;
    font-weight: 600;
}

.outlier-card.rank-one-champion .card-action-btn:hover {
    background: #18181b !important;
    color: #ffffff !important;
}

.outlier-card.rank-one-champion .card-action-btn.saved {
    background: #f0f0f0 !important;
    color: #1a1c24 !important;
    border-color: #e0e0e0 !important;
}

.outlier-card.rank-one-champion .card-action-btn.saved i {
    color: #1a1c24 !important;
}

.outlier-card.rank-one-champion .card-action-btn.saved:hover {
    background: #ffffff !important;
    color: #0d0e12 !important;
}

.rank-badge-wrap {
    display: none;
}

.outlier-card.rank-one-champion .rank-badge-wrap {
    position: absolute !important;
    top: -14px !important;
    left: -12px !important;
    background: transparent !important;
    border: none !important;
    transform: rotate(-22deg) !important;
    z-index: 50 !important;
    padding: 0 !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    filter: none !important;
    box-shadow: none !important;
    pointer-events: none;
}

.outlier-card.rank-one-champion .rank-badge-wrap .rank-crown-icon {
    font-size: 26px !important;
    color: #fbbf24 !important;
    filter: none !important;
    box-shadow: none !important;
    border: none !important;
}

.rank-num-gold {
    display: none !important;
}

/* Thumbnail Column */
.outlier-thumb-wrap {
    grid-column: span 3 !important;
    position: relative;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    flex-shrink: 0;
    border: 1px solid #22242c;
}

.outlier-thumb-wrap.shorts-thumb {
    grid-column: span 3 !important;
    width: 100% !important;
    aspect-ratio: 9 / 16;
}

.outlier-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.outlier-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 4px;
}

/* Details Column */
.outlier-info-col {
    grid-column: span 3 !important;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 4px !important;
}

.outlier-video-title {
    font-size: 14px;
    font-weight: 700;
    color: #f9fafb;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
}

.outlier-card:hover .outlier-video-title {
    color: #ffffff;
}

.outlier-divider-barrier {
    display: none !important;
}

.outlier-channel-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
}

.outlier-author-name {
    font-weight: 500;
    color: #d1d5db;
}

.verified-badge {
    color: #9ca3af;
    font-size: 11px;
}

/* Metrics Columns */
.outlier-score-col {
    grid-column: 1 !important;
    width: auto !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center !important;
    text-align: center !important;
}

.outlier-published-col {
    grid-column: 2 !important;
    width: auto !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center !important;
    text-align: center !important;
}

.outlier-views-col {
    grid-column: 3 !important;
    width: auto !important;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center !important;
    text-align: center !important;
}

.outlier-views-val,
.outlier-published-val,
.outlier-vph-highlight {
    font-size: 15.5px !important;
    font-weight: 800 !important;
    color: #f9fafb !important;
    letter-spacing: -0.2px;
}

.outlier-vph-highlight {
    color: #22c55e !important;
}

.outlier-views-label,
.outlier-published-label,
.outlier-vph-label {
    font-size: 10.5px !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Action Buttons Column */
.outlier-actions-col {
    grid-column: span 3 !important;
    display: flex;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 6px !important;
}

.card-action-btn {
    flex: 1 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #16181d;
    border: 1px solid #262932;
    color: #d1d5db;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

.card-action-btn:hover {
    background: #20232a;
    border-color: #383c48;
    color: #ffffff;
}

.card-action-btn.saved {
    background: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
    font-weight: 600;
}

.card-action-btn.saved i {
    color: #000000 !important;
}

.card-action-btn.remove-btn {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    font-weight: 600;
}

.card-action-btn.remove-btn i {
    color: #f87171 !important;
}

.card-action-btn.remove-btn:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.card-action-btn.remove-btn:hover i {
    color: #ffffff !important;
}

/* Feed Footer Count */
.feed-footer-count {
    display: none;
}

/* Saved Ideas Buttons */
.saas-outline-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #111215;
    border: 1px solid #232630;
    color: #e5e7eb;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.saas-outline-btn:hover {
    background: #181a20;
    border-color: #383c48;
}

.saas-outline-btn.danger {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.saas-outline-btn.danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: #ef4444;
}

/* ===== Toast Notification Cards Container & Animation Engine ===== */
.toast-notifications-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Right align toast cards so they fit content */
    gap: 10px;
    z-index: 99999;
    pointer-events: none;
    max-width: calc(100vw - 32px);
}

.toast-card {
    pointer-events: auto;
    background: #15171d;
    border: 1px solid #282b36;
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 1px rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(12px);
    width: auto;
    max-width: 380px;
}

.toast-card.success {
    padding: 8px 12px;
    border-color: rgba(34, 197, 94, 0.3);
    background: #101915;
}

.toast-card.success .toast-body {
    flex: 0 0 auto;
}

.toast-undo-btn {
    background: rgba(245, 158, 11, 0.18);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #f59e0b;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 4px;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.toast-undo-btn:hover {
    background: #f59e0b;
    color: #000000;
}

.toast-card.toast-exiting {
    animation: toastSlideOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(12px) scale(0.88);
    }
}

.toast-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.toast-icon.info { color: #3b82f6; }
.toast-icon.success { color: #22c55e; }
.toast-icon.warning { color: #f59e0b; }
.toast-icon.danger { color: #ef4444; }

.toast-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-message {
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1.4;
    word-break: break-word;
}

.toast-close-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 12px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    color: #ffffff;
}

/* Animated 5s countdown progress bar at bottom of toast card */
.toast-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    width: 100%;
}

.toast-progress-fill {
    height: 100%;
    width: 100%;
    transition: width 0.05s linear;
}

.toast-card.success .toast-progress-fill { background: #22c55e; }
.toast-card.info .toast-progress-fill { background: #3b82f6; }
.toast-card.warning .toast-progress-fill { background: #f59e0b; }
.toast-card.danger .toast-progress-fill { background: #ef4444; }
