@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bbs-primary: #6366f1;
    --bbs-primary-hover: #4f46e5;
    --bbs-card-bg: #0f172a;
    --bbs-border: rgba(255, 255, 255, 0.1);
    --bbs-text: #f8fafc;
    --bbs-muted: #94a3b8;
    --bbs-high: #10b981;
    --bbs-med: #f59e0b;
    --bbs-low: #ef4444;
}

.bbs-wrapper {
    font-family: 'Outfit', sans-serif;
    color: var(--bbs-text);
    margin: 2rem 0;
}

.bbs-container {
    background: var(--bbs-card-bg);
    border: 1px solid var(--bbs-border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.bbs-header {
    text-align: center;
    margin-bottom: 2rem;
}

.bbs-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #fff 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bbs-subtitle {
    color: var(--bbs-muted);
    font-size: 0.9rem;
}

.bbs-tabs {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.3rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.bbs-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--bbs-muted);
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bbs-tab.active {
    background: var(--bbs-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.bbs-field-group {
    margin-bottom: 1.25rem;
}

.bbs-field-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--bbs-muted);
    font-weight: 500;
}

.bbs-field-group input,
.bbs-field-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bbs-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.bbs-field-group input:focus {
    border-color: var(--bbs-primary);
}

.bbs-button {
    width: 100%;
    background: var(--bbs-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1.1rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: transform 0.2s;
}

.bbs-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.bbs-loader {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: white;
    animation: bbs-spin 1s linear infinite;
}

@keyframes bbs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Results CSS */
.bbs-result {
    margin-top: 2rem;
    border-top: 1px solid var(--bbs-border);
    padding-top: 2rem;
    animation: bbs-slide-up 0.5s ease-out;
}

@keyframes bbs-slide-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bbs-score-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.bbs-score-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 5px solid var(--bbs-primary);
}

.bbs-score-value {
    font-size: 2rem;
    font-weight: 800;
}

.bbs-score-label {
    font-size: 0.65rem;
    color: var(--bbs-muted);
    text-transform: uppercase;
}

.bbs-confidence-badge {
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    display: inline-block;
}

.conf-high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--bbs-high);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.conf-medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--bbs-med);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.conf-low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--bbs-low);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.bbs-version {
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--bbs-muted);
    font-weight: 500;
}

.bbs-warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--bbs-med);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.bbs-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.bbs-breakdown-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border: 1px solid var(--bbs-border);
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bbs-breakdown-label {
    font-size: 0.8rem;
    color: var(--bbs-muted);
}

.bbs-breakdown-value {
    font-weight: 700;
    font-size: 0.9rem;
}

.bbs-summary-box {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 16px;
    border-left: 5px solid var(--bbs-primary);
}

.bbs-summary-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.bbs-summary-box p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
    color: #ccd6f6;
}

.bbs-footer {
    margin-top: 2rem;
    border-top: 1px solid var(--bbs-border);
    padding-top: 1.5rem;
}

.bbs-disclaimer {
    font-size: 0.75rem;
    color: var(--bbs-muted);
    text-align: justify;
    line-height: 1.4;
}

.bbs-error-msg {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--bbs-low);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
}

@media (max-width: 500px) {
    .bbs-container {
        padding: 1.5rem;
    }

    .bbs-breakdown {
        grid-template-columns: 1fr;
    }

    .bbs-score-header {
        flex-direction: column;
        text-align: center;
    }
}