/* ==========================================
   SHKETT SCREEN VISION — PREMIUM UI
========================================== */

.sv-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(0, 102, 255, 0.12),
            transparent 55%
        ),
        rgba(1, 5, 14, 0.96);

    backdrop-filter: blur(20px);
}

.sv-overlay[hidden] {
    display: none !important;
}

.sv-phone {
    position: relative;
    width: min(100%, 390px);
    height: min(100dvh, 820px);

    overflow: hidden;

    background:
        radial-gradient(
            circle at 50% 0%,
            #0a203b,
            transparent 45%
        ),
        #030a15;

    color: #eef7ff;
    font-family: Inter, Arial, sans-serif;

    border: 1px solid rgba(40, 136, 255, 0.22);
    border-radius: 30px;

    box-shadow:
        0 0 45px rgba(0, 110, 255, 0.12),
        inset 0 0 30px rgba(0, 75, 160, 0.08);
}

/* HEADER */

.sv-header {
    position: absolute;
    z-index: 5;

    top: 0;
    left: 0;
    right: 0;

    height: 78px;
    padding: 18px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sv-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sv-brand strong {
    display: block;
    font-size: 13px;
    letter-spacing: 1px;
}

.sv-brand small {
    display: block;
    margin-top: 4px;

    color: #88a7c7;
    font-size: 10px;
}

.sv-brand-orb,
.sv-result-orb {
    width: 35px;
    height: 35px;
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            #a6f4ff 0%,
            #00b7ff 12%,
            #005dce 35%,
            #001c42 60%,
            transparent 70%
        );

    border: 1px solid #149bff;

    box-shadow:
        0 0 12px #008cff,
        0 0 28px rgba(0, 140, 255, 0.4),
        inset 0 0 10px #00aeff;
}

.sv-close {
    width: 34px;
    height: 34px;

    border: 1px solid #19385b;
    border-radius: 11px;

    color: #b9dfff;
    background: #07172b;

    font-size: 24px;
    cursor: pointer;
}

/* VIEWS */

.sv-view {
    display: none;
    height: 100%;
}

.sv-view.active {
    display: block;
}

/* SCANNER */

.sv-scanner {
    position: absolute;
    inset: 90px 12px 12px;

    border: 1px solid #087bfa;
    border-radius: 22px;

    box-shadow:
        0 0 8px #007aff,
        0 0 28px rgba(0, 119, 255, 0.42),
        inset 0 0 24px rgba(0, 110, 255, 0.15);

    overflow: hidden;
}

.sv-scanner-top {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    align-items: center;
    gap: 10px;

    white-space: nowrap;

    padding: 9px 14px;

    background: #07192f;
    border: 1px solid #16416d;
    border-radius: 24px;

    color: #a4d8ff;
    font-size: 10px;
    letter-spacing: 0.6px;
}

.sv-live {
    padding: 3px 6px;

    background: rgba(0, 255, 148, 0.13);
    color: #5dffb3;

    border-radius: 5px;
    font-size: 8px;
}

.sv-scan-area {
    position: absolute;
    inset: 70px 10px 155px;

    overflow: hidden;
    border-radius: 15px;
}

.sv-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;

    padding: 28px 16px;

    filter: blur(2px);
    opacity: 0.35;
}

.sv-app-grid div {
    display: grid;
    place-items: center;

    aspect-ratio: 1;

    border-radius: 16px;

    background: linear-gradient(
        145deg,
        #244467,
        #0a1c35
    );

    font-size: 27px;
}

.sv-scan-line {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 0;

    height: 2px;

    background: #2ccaff;

    box-shadow:
        0 0 12px #00aaff,
        0 0 30px #008cff;

    animation: sv-scan 3s ease-in-out infinite alternate;
}

@keyframes sv-scan {
    from { top: 5%; }
    to { top: 90%; }
}

.sv-center-orb {
    position: absolute;
    left: 50%;
    top: 52%;

    transform: translate(-50%, -50%);

    width: 65px;
    height: 65px;

    display: grid;
    place-items: center;

    border: 1px solid #20b5ff;
    border-radius: 50%;

    background: rgba(0, 100, 255, 0.13);

    box-shadow:
        0 0 18px #008cff,
        0 0 45px rgba(0, 136, 255, 0.55);

    animation: sv-pulse 2s ease-in-out infinite;
}

.sv-center-orb span {
    width: 21px;
    height: 21px;

    border-radius: 50%;

    background: #79efff;

    box-shadow:
        0 0 14px #00c8ff,
        0 0 30px #008cff;
}

@keyframes sv-pulse {
    50% {
        box-shadow:
            0 0 30px #00aaff,
            0 0 65px rgba(0, 136, 255, 0.7);
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* ANALYSIS PANEL */

.sv-analysis-card {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 12px;

    padding: 19px 17px 15px;

    background: rgba(5, 19, 40, 0.92);

    border: 1px solid #148fff;
    border-radius: 19px;

    backdrop-filter: blur(24px);

    box-shadow:
        0 0 15px rgba(0, 119, 255, 0.6),
        inset 0 0 20px rgba(0, 85, 200, 0.15);
}

.sv-analysis-card h2 {
    text-align: center;
    margin: 0 0 20px;

    font-size: 15px;
    font-weight: 600;
}

.sv-stage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sv-stage {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 12px;
    color: #b2c9e5;
}

.sv-stage-icon {
    width: 17px;
    height: 17px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #008dff;
    color: white;

    font-size: 10px;

    box-shadow: 0 0 10px #008cff;
}

/* BUTTONS */

.sv-secondary-button,
.sv-primary-button {
    width: 100%;
    min-height: 43px;

    border-radius: 11px;

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: transform 0.2s, box-shadow 0.2s;
}

.sv-secondary-button {
    color: #d6ebff;

    background: linear-gradient(
        180deg,
        #0b2747,
        #07182d
    );

    border: 1px solid #164b80;
}

.sv-primary-button {
    color: white;

    background: linear-gradient(
        180deg,
        #179aff,
        #0063db
    );

    border: 1px solid #42b8ff;

    box-shadow: 0 0 15px rgba(0, 136, 255, 0.3);
}

.sv-secondary-button:active,
.sv-primary-button:active {
    transform: scale(0.98);
}

#sv-cancel {
    margin-top: 22px;
}

/* RESULT */

#sv-result {
    padding: 98px 20px 24px;
    overflow-y: auto;
}

.sv-result-heading {
    display: flex;
    align-items: center;
    gap: 13px;

    margin-bottom: 25px;
}

.sv-result-heading h2 {
    margin: 0;
    font-size: 17px;
}

.sv-result-heading p {
    margin: 5px 0 0;

    color: #7fa8d4;
    font-size: 11px;
}

.sv-result-card,
.sv-findings-card {
    padding: 15px;

    background: linear-gradient(
        145deg,
        #0a213d,
        #061529
    );

    border: 1px solid #163d69;
    border-radius: 14px;

    margin-bottom: 14px;
}

.sv-result-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.sv-screen-thumbnail {
    width: 115px;
    min-width: 115px;
    height: 83px;

    border-radius: 10px;

    background: linear-gradient(
        135deg,
        #1b4872,
        #06162c
    );

    overflow: hidden;
}

.sv-mini-apps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;

    padding: 10px;
}

.sv-mini-apps span {
    text-align: center;
    font-size: 18px;
}

.sv-screen-info strong {
    display: block;
    font-size: 12px;
}

.sv-screen-info small {
    display: block;
    margin: 8px 0;

    color: #7f9dbb;
    font-size: 10px;
}

.sv-screen-tag {
    color: #4daeff;
    font-size: 10px;
}

.sv-findings-card h3 {
    margin: 0 0 14px;

    font-size: 13px;
    font-weight: 600;
}

.sv-findings-card p {
    color: #b7d1eb;
    font-size: 12px;
    line-height: 1.8;

    white-space: pre-wrap;
}

.sv-result-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-top: 20px;
}

/* MOBILE */

@media (max-width: 480px) {
    .sv-phone {
        width: 100%;
        height: 100dvh;
        border: none;
        border-radius: 0;
    }
}

@media (max-height: 650px) {
    .sv-scanner {
        top: 70px;
    }

    .sv-analysis-card {
        padding: 12px;
    }

    .sv-stage-list {
        gap: 7px;
    }
}

/* ==========================================
   SHKETT SCREEN VISION
   Real Android screenshot preview
========================================== */

.sv-scan-area {
    position: relative;
    overflow: hidden;
}

.sv-screen-preview {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 12px;
}

.sv-screen-preview[hidden] {
    display: none !important;
}

.sv-scan-line,
.sv-scan-corners,
.sv-center-orb {
    pointer-events: none;
}
/* Portfolio Screen Vision fixes */

#sv-overlay[hidden] {
    display: none !important;
}

#sv-overlay .sv-view:not(.active) {
    display: none !important;
}

#sv-overlay .sv-result-heading {
    display: none !important;
}

#sv-overlay .sv-header {
    position: relative !important;
    flex-shrink: 0;
}

#sv-overlay .sv-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

#sv-overlay .sv-brand > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#sv-overlay .sv-brand strong,
#sv-overlay .sv-brand small {
    position: static !important;
    line-height: 1.3;
}

#sv-overlay .sv-phone {
    max-height: 100dvh;
    overflow-y: auto;
}

#sv-analysis-text {
    overflow-wrap: anywhere;
}

