@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap');

.nouvil-analyzer {
    direction: rtl;
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    color: #fff;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.nv-hero {
    text-align: center;
    padding: 50px 20px;
    /*background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);*/
    border-radius: 24px;
    border: 1px solid #312e81;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}
.nv-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.nv-hero h1 {
    font-size: 2.8rem;
    margin: 0 0 15px;
    font-weight: 800;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}
.nv-hero p {
    color: #94a3b8;
    font-size: 1.15rem;
    margin: 0;
    position: relative;
}

.nv-search {
    display: flex;
    gap: 15px;
    max-width: 700px;
    margin: 0 auto 50px;
    background: #0f172a;
    padding: 10px;
    border-radius: 60px;
    border: 2px solid #334155;
    transition: all 0.3s ease;
}
.nv-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 30px rgba(99,102,241,0.15);
}
.nv-search input {
    flex: 1;
    background: transparent;
    border: none !important;
    color: #fff;
    padding: 14px 24px;
    font-size: 1.05rem;
    outline: none !important;
    font-family: inherit;
    text-align: right;
}

.nv-search input::placeholder { color: #64748b; }
.nv-search button {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    font-family: inherit;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.nv-search button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99,102,241,0.4);
}
.nv-search button:disabled {
    opacity: 0.6;
    transform: none;
    cursor: wait;
}

.nv-loader {
    text-align: center;
    padding: 60px;
    display: none;
}
.nv-loader.active { display: block; }
.nv-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #1e293b;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nv-loader p { color: #94a3b8; font-size: 1.1rem; }

.nv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 25px;
    margin-bottom: 35px;
}

.nv-box {
    background: linear-gradient(145deg, #0f172a, #1e1b4b);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #312e81;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.nv-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}
.nv-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    opacity: 0;
    transition: opacity 0.3s;
}
.nv-box:hover::after { opacity: 1; }

.nv-box-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #312e81;
}
.nv-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
    border: 1px solid #4338ca;
    flex-shrink: 0;
}
.nv-box-head h3 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.nv-box-head p { margin: 6px 0 0; color: #94a3b8; font-size: 0.9rem; }

.nv-scores {
    display: flex;
    justify-content: space-around;
    margin: 25px 0;
    text-align: center;
}
.nv-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 10px;
    border: 4px solid transparent;
    transition: all 0.3s;
}
.nv-badge.good { background: rgba(16,185,129,0.15); color: #10b981; border-color: #10b981; }
.nv-badge.avg  { background: rgba(59,130,246,0.15); color: #3b82f6; border-color: #3b82f6; }
.nv-badge.warn { background: rgba(245,158,11,0.15); color: #f59e0b; border-color: #f59e0b; }
.nv-badge.bad  { background: rgba(239,68,68,0.15); color: #ef4444; border-color: #ef4444; }

/* Chart fixes */
.nv-chart-wrap {
    position: relative;
    height: 280px;
    margin: 20px 0;
    width: 100%;
}

.nv-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 10px;
}
.nv-legend span { display: flex; align-items: center; gap: 6px; }
.nv-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Rank Big Number */
.nv-rank-big {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    direction: ltr;
    display: inline-block;
}

.nv-rows { margin-top: 10px; }
.nv-rows > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid rgba(49,46,129,0.5);
    font-size: 0.95rem;
}
.nv-rows > div:last-child { border-bottom: none; }
.nv-rows span { color: #94a3b8; }
.nv-rows b { font-weight: 700; direction: ltr; text-align: left; }

.nv-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}
.nv-tags span {
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.2));
    border: 1px solid #4338ca;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.nv-list { list-style: none; padding: 0; margin: 0; }
.nv-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border-right: 3px solid;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: background 0.2s;
}
.nv-list li:hover { background: rgba(255,255,255,0.06); }
.nv-list li.err { border-color: #ef4444; }
.nv-list li.warn { border-color: #f59e0b; }
.nv-list li.info { border-color: #3b82f6; }
.nv-list li strong { display: block; margin-bottom: 4px; color: #fff; font-size: 1rem; }
.nv-list li small { color: #10b981; display: block; margin-top: 6px; font-size: 0.85rem; }
.nv-list li .emoji { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

.nv-empty {
    color: #64748b;
    text-align: center;
    padding: 40px;
    border: none !important;
    background: transparent !important;
    justify-content: center;
}
#nv-url{
    border: none !important;
    outline: none !important;
}
@media (max-width: 768px) {
    .nv-grid { grid-template-columns: 1fr; }
    .nv-hero h1 { font-size: 1.9rem; }
    .nv-search { flex-direction: column; border-radius: 24px; }
    .nv-search button { width: 100%; justify-content: center; }
    .nv-rank-big { font-size: 2.5rem; }
    .nv-chart-wrap { height: 220px; }
}