/* Bug Bounty Page Styles */

.bounty-page {
    --bounty-primary: #10b981;
    --bounty-light: #34d399;
    --bounty-dark: #059669;
    --bounty-glow: rgba(16, 185, 129, 0.18);
    --bounty-card-bg: rgba(16, 185, 129, 0.08);
    --bounty-border: rgba(16, 185, 129, 0.2);

    --tier-critical: #ef4444;
    --tier-critical-bg: rgba(239, 68, 68, 0.08);
    --tier-critical-border: rgba(239, 68, 68, 0.25);

    --tier-high: #f7931a;
    --tier-high-bg: rgba(247, 147, 26, 0.08);
    --tier-high-border: rgba(247, 147, 26, 0.25);

    --tier-medium: #eab308;
    --tier-medium-bg: rgba(234, 179, 8, 0.08);
    --tier-medium-border: rgba(234, 179, 8, 0.25);

    --tier-low: #10b981;
    --tier-low-bg: rgba(16, 185, 129, 0.08);
    --tier-low-border: rgba(16, 185, 129, 0.25);

    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 4rem;
}

/* ===== Hero ===== */

.bounty-hero {
    text-align: center;
    padding: 3rem 1.5rem 2.5rem;
    background: radial-gradient(ellipse at 50% 0%, var(--bounty-glow), transparent 70%);
    margin-bottom: 2rem;
}

.bounty-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--bounty-primary);
    background: var(--bounty-card-bg);
    border: 1px solid var(--bounty-border);
    padding: 0.35rem 0.85rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.bounty-hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    text-wrap: balance;
}

.bounty-hero-title .highlight {
    color: var(--bounty-primary);
}

.bounty-hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.5;
    text-wrap: balance;
}

/* Stats row */
.bounty-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.bounty-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.bounty-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.bounty-stat-label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

/* ===== Sections ===== */

.bounty-section {
    margin-bottom: 2.5rem;
}

.bounty-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1.25rem;
}

/* ===== Reward Tiers ===== */

.bounty-tiers {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bounty-tier {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    border: 1px solid;
    transition: transform 0.15s ease;
}

.bounty-tier:hover {
    transform: translateY(-1px);
}

.tier-critical { background: var(--tier-critical-bg); border-color: var(--tier-critical-border); }
.tier-high { background: var(--tier-high-bg); border-color: var(--tier-high-border); }
.tier-medium { background: var(--tier-medium-bg); border-color: var(--tier-medium-border); }
.tier-low { background: var(--tier-low-bg); border-color: var(--tier-low-border); }

.tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
}

.tier-badge--critical { color: var(--tier-critical); background: rgba(239, 68, 68, 0.15); }
.tier-badge--high { color: var(--tier-high); background: rgba(247, 147, 26, 0.15); }
.tier-badge--medium { color: var(--tier-medium); background: rgba(234, 179, 8, 0.15); }
.tier-badge--low { color: var(--tier-low); background: rgba(16, 185, 129, 0.15); }

.tier-range {
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    font-variant-numeric: tabular-nums;
}

.tier-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin: 0;
}

/* ===== Form ===== */

.bounty-form {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
}

.form-row--two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.35rem;
}

.form-group .required {
    color: var(--tier-critical);
}

.form-group .optional {
    color: rgba(255, 255, 255, 0.35);
    font-weight: 400;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--bounty-primary);
    box-shadow: 0 0 0 2px var(--bounty-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='rgba(255,255,255,0.4)'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2rem;
}

.form-group select option {
    background: #1a1a1a;
    color: #fff;
}

.form-readonly {
    opacity: 0.5;
    cursor: default;
}

/* Screenshot drop zone */
.screenshot-drop {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.screenshot-drop:hover,
.screenshot-drop.dragover {
    border-color: var(--bounty-primary);
    background: var(--bounty-card-bg);
}

.screenshot-drop-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
}

.screenshot-drop-text svg {
    opacity: 0.5;
}

.screenshot-browse {
    background: none;
    border: none;
    color: var(--bounty-primary);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    text-decoration: underline;
    padding: 0;
}

.screenshot-previews {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.screenshot-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.screenshot-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.screenshot-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Submit button */
.form-actions {
    margin-top: 0.5rem;
}

.btn-bounty-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, var(--bounty-primary), var(--bounty-dark));
    color: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn-bounty-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-bounty-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ===== History Table ===== */

.bounty-loading {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    padding: 1rem 0;
}

.bounty-empty {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    padding: 1.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
}

.bounty-history-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bounty-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.bounty-history-table th {
    text-align: left;
    padding: 0.6rem 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bounty-history-table td {
    padding: 0.65rem 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.bounty-history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge--pending { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.status-badge--reviewing { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.status-badge--accepted { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status-badge--rejected { background: rgba(239, 68, 68, 0.1); color: rgba(239, 68, 68, 0.6); }
.status-badge--rewarded { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.status-badge--duplicate { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.4); }

.reward-sats {
    color: var(--bounty-primary);
    font-weight: 600;
}

/* ===== Guest CTA ===== */

.bounty-guest-cta {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bounty-card-bg);
    border: 1px solid var(--bounty-border);
    border-radius: 12px;
}

.bounty-guest-cta svg {
    color: var(--bounty-primary);
    opacity: 0.6;
    margin-bottom: 0.75rem;
}

.bounty-guest-cta h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.5rem;
}

.bounty-guest-cta p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 1.25rem;
}

.btn-bounty-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--bounty-primary), var(--bounty-dark));
    color: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.btn-bounty-cta:hover {
    opacity: 0.9;
}

/* ===== Auth visibility ===== */

.is-guest .bounty-auth-only { display: none !important; }
.is-authed .bounty-guest-only { display: none !important; }

/* ===== Toast ===== */

.bounty-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 90vw;
    text-align: center;
}

.bounty-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.bounty-toast--success {
    background: var(--bounty-dark);
    color: #fff;
    border: 1px solid var(--bounty-primary);
}

.bounty-toast--error {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: 1px solid var(--tier-critical);
}

/* ===== Mobile ===== */

@media (max-width: 600px) {
    .bounty-page {
        padding: 0 0.75rem 3rem;
    }

    .bounty-hero {
        padding: 2rem 1rem 2rem;
    }

    .bounty-hero-title {
        font-size: 2rem;
    }

    .bounty-stats {
        gap: 1.25rem;
    }

    .bounty-stat-value {
        font-size: 1.4rem;
    }

    .form-row--two {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .bounty-form {
        padding: 1rem;
    }

    .tier-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .bounty-history-table th,
    .bounty-history-table td {
        padding: 0.5rem;
        font-size: 0.78rem;
    }
}
