/* Reset Styles - Optimized Specific Selectors instead of (*) */
html,
body,
header,
footer,
main,
section,
div,
h1,
h2,
h3,
h4,
form,
input,
button,
p,
span,
i,
svg,
circle {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: #0d0d12;
    color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
    transition: 0.4s;
}

/* Background Floating Orbs */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    animation: float 25s infinite alternate ease-in-out;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: rgba(167, 134, 255, 0.25);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.25);
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: rgba(236, 72, 153, 0.25);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(20px, 30px) scale(1.1);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* Header */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    color: #a786ff;
    filter: drop-shadow(0 0 10px rgba(167, 134, 255, 0.4));
}

.main-title {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
}

.main-title span {
    background: linear-gradient(135deg, #a786ff 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.25rem;
    color: #94a3b8;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Glass Search Bar */
.search-container {
    display: flex;
    background: rgba(22, 22, 28, 0.7);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem;
    border-radius: 100px;
    max-width: 850px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    gap: 1rem;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: #f8fafc;
    font-size: 1.1rem;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #a786ff 0%, #3b82f6 100%);
    border: none;
    padding: 1.1rem 2.5rem;
    border-radius: 100px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    transform: translateX(5px);
    filter: brightness(1.1);
}

/* Loader */
.loader-section {
    text-align: center;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #a786ff;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dashboard Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.glass-card {
    background: rgba(22, 22, 28, 0.7);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 2.2rem;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
}

.glass-card:hover {
    transform: translateY(-8px);
    border-color: #a786ff;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    color: #94a3b8;
}

.chart-container {
    width: 140px;
    height: 140px;
    position: relative;
    margin: 0 auto;
}

.chart-container svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.bg-circle {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.progress-circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 282.7;
    stroke-dashoffset: 282.7;
    transition: stroke-dashoffset 2s;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
}

/* Helpers */
.hidden {
    display: none !important;
}

.error-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem 1.5rem;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0 auto;
}

.history-section {
    background: rgba(22, 22, 28, 0.7);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

.history-item:hover {
    transform: translateX(4px);
    background: rgba(255, 255, 255, 0.06);
}

.footer {
    text-align: center;
    padding: 2rem;
    color: #94a3b8;
}

.tooltip {
    position: fixed;
    padding: 0.75rem 1.2rem;
    background: #1e293b;
    color: #f8fafc;
    border-radius: 12px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: 0.3s;
}

.tooltip.show {
    opacity: 1;
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .search-container {
        flex-direction: column;
        border-radius: 30px;
    }

    .btn-primary {
        width: 100%;
    }
}