/*
========================================
TikTok Video Analyzer Pro
Professional Light Mode · Premium UI
Rank4T
========================================
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================
   MAIN CONTAINER
========================= */

.tva-box {
    width: 95%;
    max-width: 850px;
    margin: 40px auto;
    padding: 32px 30px 38px;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06), 0 2px 12px rgba(0, 0, 0, 0.04);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

/* =========================
   HEADINGS
========================= */

.tva-box h2 {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0a1a2f;
    margin-bottom: 4px;
    line-height: 1.2;
}

.tva-box h2::after {
    content: " Pro";
    background: linear-gradient(135deg, #1a5cff, #0a3bb5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tva-box .subhead,
.tva-box>p {
    text-align: center;
    color: #5e6f8d;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.2px;
    margin-bottom: 26px;
    padding: 0 4px;
}

/* =========================
   INPUT AREA — PROFESSIONAL
========================= */

.tva-input-area {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

#tva-url {
    flex: 1;
    height: 56px;
    border: 1.5px solid #dce0e9;
    outline: none;
    background: #fafcff;
    border-radius: 14px;
    padding: 0 20px;
    font-size: 15px;
    font-weight: 450;
    color: #0a1a2f;
    transition: border 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    font-family: inherit;
}

#tva-url::placeholder {
    color: #98a9c4;
    font-weight: 400;
}

#tva-url:focus {
    border-color: #1a5cff;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(26, 92, 255, 0.08);
}

#tva-btn {
    height: 56px;
    padding: 0 34px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #1a5cff, #0f47d6);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(26, 92, 255, 0.25);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

#tva-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(26, 92, 255, 0.32);
    background: linear-gradient(135deg, #2568ff, #1249e0);
}

#tva-btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 8px rgba(26, 92, 255, 0.20);
}

/* =========================
   LOADING
========================= */

#tva-loading {
    text-align: center;
    padding: 34px 10px 28px;
}

.tva-loader {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 4px solid #e8ecf4;
    border-top-color: #1a5cff;
    border-right-color: #1a5cff;
    margin: 0 auto 14px;
    animation: tvaSpin 0.85s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

@keyframes tvaSpin {
    100% {
        transform: rotate(360deg);
    }
}

#tva-loading p {
    color: #7a8aa8;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.4px;
}

/* =========================
   RESULT CARD
========================= */

#tva-result {
    margin-top: 28px;
}

.tva-card {
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 24px 28px;
    border: 1px solid #eef1f7;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    text-align: center;
    transition: all 0.3s ease;
}

/* =========================
   THUMBNAIL
========================= */

.tva-thumb {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 20px;
    border: 1px solid #eef1f7;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* =========================
   PROFILE AVATAR
========================= */

.tva-card img[style*="border-radius:50%"] {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #1a5cff, 0 8px 24px rgba(26, 92, 255, 0.12);
    margin: 0 auto 14px;
    display: block;
    transition: all 0.3s ease;
}

.tva-card img[style*="border-radius:50%"]:hover {
    transform: scale(1.04);
    box-shadow: 0 0 0 3px #1a5cff, 0 12px 32px rgba(26, 92, 255, 0.18);
}

/* =========================
   TITLE & TEXT
========================= */

.tva-title {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 700;
    color: #0a1a2f;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.tva-card p {
    text-align: center;
    color: #5e6f8d;
    font-size: 15px;
    line-height: 1.6;
    margin-top: 4px;
}

/* =========================
   STATS GRID — PROFESSIONAL
   🔥 ALL STATS NUMBERS BOLD (FOLLOWERS, VIEWS, LIKES, ETC.)
========================= */

.tva-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 26px;
}

.tva-item {
    background: #f8faff;
    border: 1px solid #e8edf7;
    border-radius: 18px;
    min-height: 88px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

.tva-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.06);
    border-color: #1a5cff;
    background: #ffffff;
}

/* — LABEL (followers, views, etc.) — BOLD */
.tva-item strong {
    color: #3a4a6a;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* — VALUE (numbers like 12.4M, 487K, etc.) — EXTRA BOLD */
.tva-item span,
.tva-item div {
    font-size: 20px;
    font-weight: 900;
    color: #0a1a2f;
    line-height: 1.2;
}

/* accent gradient for numbers (optional premium touch) */
.tva-item span {
    background: linear-gradient(135deg, #1a5cff, #0f47d6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================
   STATUS MESSAGES
========================= */

.tva-success {
    background: #eaf9f0;
    color: #0f7b4a;
    padding: 14px 20px;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #b8e6cf;
}

.tva-error {
    background: #fceeef;
    color: #b91c2e;
    padding: 14px 20px;
    border-radius: 14px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    border: 1px solid #f5c8cc;
}

/* =========================
   ANIMATION — STAGGER ENTRY
========================= */

.tva-item {
    opacity: 0;
    transform: translateY(14px);
    animation: tvaFadeUp 0.5s ease forwards;
}

.tva-item:nth-child(1) {
    animation-delay: 0.06s;
}
.tva-item:nth-child(2) {
    animation-delay: 0.12s;
}
.tva-item:nth-child(3) {
    animation-delay: 0.18s;
}
.tva-item:nth-child(4) {
    animation-delay: 0.24s;
}
.tva-item:nth-child(5) {
    animation-delay: 0.30s;
}
.tva-item:nth-child(6) {
    animation-delay: 0.36s;
}

@keyframes tvaFadeUp {
    0% {
        opacity: 0;
        transform: translateY(18px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================
   MOBILE — TABLET & BELOW
========================= */

@media (max-width: 768px) {
    .tva-box {
        width: 94%;
        margin: 24px auto;
        padding: 22px 18px 28px;
        border-radius: 22px;
    }

    .tva-box h2 {
        font-size: 26px;
    }

    .tva-box .subhead,
    .tva-box>p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .tva-input-area {
        flex-direction: column;
        gap: 10px;
        padding: 0;
        background: transparent;
        border-radius: 0;
    }

    #tva-url {
        width: 100%;
        height: 52px;
        border-radius: 12px;
        font-size: 14px;
        padding: 0 16px;
    }

    #tva-btn {
        width: 100%;
        height: 52px;
        border-radius: 12px;
        font-size: 14px;
        padding: 0 20px;
        white-space: normal;
    }

    .tva-card {
        padding: 18px 14px 22px;
        border-radius: 20px;
    }

    .tva-thumb {
        max-height: 300px;
        border-radius: 14px;
        margin-bottom: 16px;
    }

    .tva-card img[style*="border-radius:50%"] {
        width: 72px;
        height: 72px;
        border-width: 2px;
    }

    .tva-title {
        font-size: 20px;
    }

    .tva-card p {
        font-size: 14px;
    }

    .tva-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-top: 20px;
    }

    .tva-item {
        min-height: 76px;
        padding: 12px 8px;
        border-radius: 14px;
    }

    .tva-item strong {
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.3px;
    }

    .tva-item span,
    .tva-item div {
        font-size: 17px;
        font-weight: 900;
    }

    .tva-success,
    .tva-error {
        font-size: 13px;
        padding: 12px 16px;
        border-radius: 12px;
        font-weight: 700;
    }

    #tva-loading {
        padding: 28px 6px 20px;
    }

    .tva-loader {
        width: 44px;
        height: 44px;
        border-width: 3.5px;
    }

    #tva-loading p {
        font-size: 13px;
    }
}

/* =========================
   SMALL MOBILE (≤ 420px)
========================= */

@media (max-width: 420px) {
    .tva-box {
        width: 96%;
        margin: 16px auto;
        padding: 16px 12px 22px;
        border-radius: 18px;
    }

    .tva-box h2 {
        font-size: 22px;
    }

    .tva-box .subhead,
    .tva-box>p {
        font-size: 13px;
        margin-bottom: 16px;
    }

    #tva-url {
        height: 46px;
        font-size: 13px;
        padding: 0 14px;
        border-radius: 10px;
    }

    #tva-btn {
        height: 46px;
        font-size: 13px;
        border-radius: 10px;
        padding: 0 14px;
    }

    .tva-card {
        padding: 14px 10px 18px;
        border-radius: 16px;
    }

    .tva-thumb {
        max-height: 200px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .tva-card img[style*="border-radius:50%"] {
        width: 60px;
        height: 60px;
        border-width: 2px;
    }

    .tva-title {
        font-size: 18px;
    }

    .tva-card p {
        font-size: 13px;
    }

    .tva-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-top: 16px;
    }

    .tva-item {
        min-height: 66px;
        padding: 10px 6px;
        border-radius: 12px;
    }

    .tva-item strong {
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.2px;
        margin-bottom: 4px;
    }

    .tva-item span,
    .tva-item div {
        font-size: 15px;
        font-weight: 900;
    }

    .tva-success,
    .tva-error {
        font-size: 12px;
        padding: 10px 12px;
        border-radius: 10px;
        font-weight: 700;
    }

    .tva-loader {
        width: 38px;
        height: 38px;
        border-width: 3px;
    }

    #tva-loading p {
        font-size: 12px;
    }
}

/* =========================
   EXTRA SMALL (≤ 340px) — 1 COLUMN
========================= */

@media (max-width: 340px) {
    .tva-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tva-item {
        min-height: 56px;
        flex-direction: row;
        gap: 10px;
        padding: 10px 14px;
        justify-content: center;
        align-items: center;
    }

    .tva-item strong {
        margin-bottom: 0;
        font-size: 11px;
        font-weight: 700;
    }

    .tva-item span,
    .tva-item div {
        font-size: 15px;
        font-weight: 900;
    }

    .tva-box {
        padding: 14px 10px 18px;
        border-radius: 16px;
    }

    #tva-url {
        height: 42px;
        font-size: 12px;
        padding: 0 12px;
    }

    #tva-btn {
        height: 42px;
        font-size: 12px;
        padding: 0 12px;
    }

    .tva-thumb {
        max-height: 150px;
    }

    .tva-card img[style*="border-radius:50%"] {
        width: 52px;
        height: 52px;
    }

    .tva-title {
        font-size: 16px;
    }
}

/* =========================
   SCROLLBAR — POLISH
========================= */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f2f7;
    border-radius: 12px;
}

::-webkit-scrollbar-thumb {
    background: #c8d0e0;
    border-radius: 12px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8b2c8;
}

::selection {
    background: rgba(26, 92, 255, 0.15);
    color: #0a1a2f;
}

/* =========================
   PRINT — CLEAN
========================= */

@media print {
    .tva-box {
        background: #fff !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .tva-box h2,
    .tva-title {
        color: #111 !important;
        -webkit-text-fill-color: #111 !important;
        background: none !important;
    }

    .tva-item span,
    .tva-item div {
        -webkit-text-fill-color: #0a1a2f !important;
        background: none !important;
        color: #0a1a2f !important;
        font-weight: 900 !important;
    }

    .tva-item {
        background: #f5f7fa !important;
        border: 1px solid #d0d7e5 !important;
    }

    .tva-item strong {
        color: #2a3a5a !important;
        font-weight: 700 !important;
    }

    #tva-btn {
        background: #1a5cff !important;
        color: #fff !important;
    }

    .tva-card {
        background: #fafcff !important;
        border: 1px solid #dce0e9 !important;
    }

    .tva-thumb {
        border: 1px solid #dce0e9 !important;
    }

    .tva-success {
        background: #eaf9f0 !important;
        color: #0f7b4a !important;
        border: 1px solid #b8e6cf !important;
        font-weight: 700 !important;
    }

    .tva-error {
        background: #fceeef !important;
        color: #b91c2e !important;
        border: 1px solid #f5c8cc !important;
        font-weight: 700 !important;
    }
}