/* BAGGO Diagnosis — Medical X-Ray Aesthetic */

.diag-hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.diag-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

/* Connect Card */
.diag-connect-section {
    padding: 0 0 80px;
    position: relative;
    z-index: 1;
}

.connect-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 48px;
}

.connect-methods {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 32px;
    align-items: center;
}

.connect-method {
    text-align: center;
}

.method-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green-dim);
    border: 2px solid rgba(0, 255, 136, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--green);
    margin: 0 auto 16px;
}

.connect-method h3 {
    font-family: var(--font-h);
    font-weight: 700;
    margin-bottom: 6px;
}

.connect-method p {
    color: var(--text-2);
    font-size: 0.82rem;
    margin-bottom: 16px;
}

.connect-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.connect-divider span {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 100px;
    color: var(--text-3);
    font-size: 0.8rem;
    font-weight: 700;
}

.address-input-group {
    display: flex;
    gap: 8px;
}

.address-input-group input {
    flex: 1;
    padding: 12px 16px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-1);
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    outline: none;
    transition: var(--transition);
    min-width: 0;
}

.address-input-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1);
}

.address-input-group input::placeholder {
    color: var(--text-3);
}

.connect-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-glass);
    color: var(--text-3);
    font-size: 0.78rem;
}

.connect-security i {
    color: var(--green);
}

/* Scanning Animation */
.diag-scanning {
    padding: 60px 0;
    position: relative;
    z-index: 1;
}

.scan-card {
    max-width: 500px;
    margin: 0 auto;
    padding: 48px;
    text-align: center;
}

.scan-animation {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
}

.scan-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid var(--green);
    opacity: 0.3;
    animation: scan-pulse 2s ease-in-out infinite;
}

.scan-ring.ring-2 {
    inset: -10px;
    border-color: var(--purple);
    animation-delay: 0.5s;
}

@keyframes scan-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.15);
        opacity: 0.6;
    }
}

.scan-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--green);
    animation: float 2s ease-in-out infinite;
}

.scan-card h3 {
    font-family: var(--font-h);
    font-weight: 700;
    margin-bottom: 16px;
}

.scan-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 12px;
}

.scan-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.scan-substatus {
    color: var(--text-3);
    font-size: 0.8rem;
}

/* Report */
.diag-report {
    padding: 40px 0 80px;
    position: relative;
    z-index: 1;
}

/* Score Gauge */
.score-card {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 48px;
    text-align: center;
}

.score-header {
    margin-bottom: 32px;
}

.score-gauge-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.score-gauge {
    position: relative;
    width: 220px;
    height: 220px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-number {
    font-family: var(--font-h);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-1);
}

.score-label {
    display: block;
    color: var(--text-3);
    font-size: 0.9rem;
}

.score-diagnosis h3 {
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.score-diagnosis p {
    color: var(--text-2);
    font-size: 0.9rem;
}

/* Stats Grid */
.report-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-width: 800px;
    margin: 0 auto 40px;
}

.report-stat-card {
    padding: 24px;
    text-align: center;
}

.rsc-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 12px;
}

.rsc-icon.red {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
}

.rsc-icon.orange {
    background: rgba(251, 146, 60, 0.12);
    color: #fb923c;
}

.rsc-icon.purple {
    background: var(--purple-dim);
    color: var(--purple);
}

.rsc-icon.cyan {
    background: var(--cyan-dim);
    color: var(--cyan);
}

.rsc-icon.green {
    background: var(--green-dim);
    color: var(--green);
}

.rsc-icon.gold {
    background: var(--gold-dim);
    color: var(--gold);
}

.rsc-value {
    font-family: var(--font-h);
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 4px;
}

.rsc-label {
    font-family: var(--font-h);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.rsc-desc {
    color: var(--text-3);
    font-size: 0.72rem;
}

/* Report Text */
.report-text-card {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 32px;
}

.report-text-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-glass);
}

.report-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--green);
}

.report-text-header h4 {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.95rem;
}

.report-text-header span {
    color: var(--text-2);
    font-size: 0.75rem;
}

.report-text-body p {
    color: var(--text-2);
    font-size: 0.92rem;
    line-height: 1.9;
    margin-bottom: 12px;
}

.report-text-body .report-label {
    color: var(--green);
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

/* Certificate */
.certificate-card {
    max-width: 650px;
    margin: 0 auto 40px;
    padding: 4px;
    background: linear-gradient(135deg, var(--green), var(--gold), var(--purple));
    border-radius: var(--radius-xl);
}

.cert-border {
    background: var(--bg-secondary);
    border-radius: calc(var(--radius-xl) - 3px);
    padding: 48px;
    text-align: center;
}

.cert-header i {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 12px;
    display: block;
}

.cert-header h3 {
    font-family: var(--font-h);
    font-size: 1.6rem;
    font-weight: 800;
}

.cert-header p {
    color: var(--text-2);
    font-size: 0.82rem;
    margin-bottom: 32px;
}

.cert-text {
    color: var(--text-2);
    font-size: 0.88rem;
    margin: 8px 0;
}

.cert-address {
    font-family: 'Courier New', monospace;
    color: var(--green);
    font-size: 1rem;
    margin: 4px 0 16px;
    word-break: break-all;
}

.cert-title {
    font-family: var(--font-h);
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--green), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 8px 0 16px;
}

.cert-score {
    font-family: var(--font-h);
    font-size: 3rem;
    font-weight: 900;
    color: var(--gold);
}

.cert-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-glass);
}

.cert-sig {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.cert-sig img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.cert-sig span {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.82rem;
}

.cert-sig small {
    color: var(--text-3);
    font-size: 0.68rem;
}

.cert-date {
    color: var(--text-3);
    font-size: 0.78rem;
}

/* Action Buttons */
.report-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Leaderboard */
.leaderboard {
    padding: 80px 0;
    position: relative;
    z-index: 1;
}

.leaderboard-table-wrapper {
    padding: 24px;
    overflow-x: auto;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.85rem;
}

.leaderboard-table th {
    font-family: var(--font-h);
    font-weight: 700;
    color: var(--green);
    background: var(--bg-card);
    white-space: nowrap;
}

.leaderboard-table td {
    color: var(--text-2);
}

.leaderboard-table tr:hover td {
    background: rgba(0, 255, 136, 0.02);
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 0.8rem;
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffaa00);
    color: #000;
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a0a0a0);
    color: #000;
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a0522d);
    color: #fff;
}

.rank-default {
    background: var(--bg-card);
    color: var(--text-2);
}

.wallet-address {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
}

.score-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.8rem;
}

.score-high {
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
}

.score-mid {
    background: rgba(255, 215, 0, 0.12);
    color: #ffd700;
}

.score-low {
    background: rgba(244, 63, 94, 0.12);
    color: #f43f5e;
}

.empty-state {
    text-align: center;
    padding: 40px;
}

.empty-state i {
    font-size: 2rem;
    color: var(--text-3);
    margin-bottom: 8px;
    display: block;
}

.empty-state p {
    color: var(--text-3);
}

.degen-title {
    font-size: 0.75rem;
    padding: 3px 10px;
    background: var(--purple-dim);
    color: var(--purple);
    border-radius: 100px;
    font-weight: 600;
    display: inline-block;
}

/* Responsive */
@media(max-width:768px) {
    .connect-methods {
        grid-template-columns: 1fr;
    }

    .connect-divider {
        padding: 8px 0;
    }

    .report-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .address-input-group {
        flex-direction: column;
    }

    .cert-footer {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .report-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media(max-width:480px) {
    .report-stats {
        grid-template-columns: 1fr;
    }

    .score-gauge {
        width: 180px;
        height: 180px;
    }

    .score-number {
        font-size: 2.5rem;
    }
}

/* WALLET MODAL */
.wallet-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.wallet-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.wallet-modal {
    width: 100%;
    max-width: 400px;
    padding: 32px;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wallet-modal-overlay.active .wallet-modal {
    transform: translateY(0);
}

.wallet-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.wallet-modal-header h3 {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.25rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-3);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-1);
    transform: rotate(90deg);
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    color: var(--text-1);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    position: relative;
}

.wallet-option:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--green);
    transform: scale(1.02);
}

.wallet-icon-wrapper {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.wallet-icon-wrapper img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.wallet-option span {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 0.95rem;
}

.wallet-tag {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 2px 8px;
    background: var(--green-dim);
    color: var(--green);
    border-radius: 100px;
    font-weight: 800;
    text-transform: uppercase;
}

.wallet-modal-footer {
    margin-top: 24px;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-glass);
}

.wallet-modal-footer p {
    color: var(--text-3);
    font-size: 0.8rem;
}

.wallet-modal-footer a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
}

.wallet-modal-footer a:hover {
    text-decoration: underline;
}