:root {
    --primary: #4F46E5;
    --primary-hover: #4338CA;
    --secondary: #9333EA;
    --bg-color: #0F172A;
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --border: rgba(255, 255, 255, 0.1);

    --status-good: #10B981;
    --status-good-bg: rgba(16, 185, 129, 0.1);
    --status-bad: #EF4444;
    --status-bad-bg: rgba(239, 68, 68, 0.1);
    --status-warn: #F59E0B;
    --status-warn-bg: rgba(245, 158, 11, 0.1);

    --glass-blur: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

/* Background Shapes */
.bg-shape {
    position: absolute;
    filter: blur(150px);
    z-index: 0;
    border-radius: 50%;
    opacity: 0.5;
    pointer-events: none;
}

.shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    top: -200px;
    left: -200px;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    right: -100px;
    top: 300px;
}

.relative-z {
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.hero-header {
    text-align: center;
    margin-bottom: 3.5rem;
    animation: fadeInDown 0.8s ease-out;
}

/* Navigation Bar */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFFFFF 0%, #A5B4FC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    margin: 0;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    text-decoration: none;
}

.nav-link.active {
    color: #A5B4FC;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--text-main);
}

.hero-header p.tagline {
    color: var(--text-muted);
    font-size: 1.25rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* Search Section */
.search-section {
    max-width: 700px;
    margin: 0 auto 3rem;
    padding: 0.5rem;
    border-radius: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

#scan-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
}

input[type="text"] {
    width: 100%;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.1rem;
    outline: none;
    font-family: 'Inter', sans-serif;
}

input[type="text"]::placeholder {
    color: #475569;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    padding: 0 2rem;
    height: 3.5rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(79, 70, 229, 0.4);
    filter: brightness(110%);
}

.stop-btn {
    background: #DC2626;
    color: white;
    border: none;
    padding: 0 2rem;
    height: 3.5rem;
    border-radius: 3rem;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
}

.stop-btn:hover {
    background: #B91C1C;
    transform: translateY(-2px);
}

.error {
    color: #F87171;
    margin-top: 1rem;
    font-size: 0.95rem;
    text-align: center;
    padding: 0.5rem;
}

/* Progress Section */
#progress-section {
    max-width: 800px;
    margin: 0 auto 3rem;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    animation: fadeIn 0.5s ease-out;
}

.status-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.shimmer-text {
    background: linear-gradient(90deg, #94A3B8 0%, #FFFFFF 50%, #94A3B8 100%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    animation: shimmer 2s linear infinite;
}

.pulse-indicator {
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.progress-bar-container {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 9999px;
    box-shadow: 0 0 10px rgba(147, 51, 234, 0.5);
}

.status-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.badge-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 600;
    color: #E2E8F0;
}

.backend-msg {
    color: var(--status-warn);
    font-style: italic;
    animation: pulse 2s infinite;
}

/* Results */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--card-border);
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: transparent;
    transition: background 0.3s ease;
}

/* Hover effect ONLY when they have data */
.card.has-data {
    cursor: pointer;
}

.card.has-data:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.card.total.has-data:hover::before {
    background: var(--primary);
}

.card.noindex.has-data:hover::before {
    background: var(--status-bad);
}

.card.blocked.has-data:hover::before {
    background: var(--status-warn);
}

.card.indexable.has-data:hover::before {
    background: var(--status-good);
}

.card.active-filter {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(40, 50, 70, 0.8);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.card.total.active-filter::before {
    background: var(--primary);
}

.card.noindex.active-filter::before {
    background: var(--status-bad);
}

.card.blocked.active-filter::before {
    background: var(--status-warn);
}

.card.indexable.active-filter::before {
    background: var(--status-good);
}

.card-icon {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.card.total .card-icon {
    color: #818CF8;
}

.card.noindex .card-icon {
    color: #F87171;
}

.card.blocked .card-icon {
    color: #FBBF24;
}

.card.indexable .card-icon {
    color: #34D399;
}

.card h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card .value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.action-btn {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.table-container {
    border-radius: 1rem;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

table {
    width: 100%;
    min-width: 650px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

thead th {
    position: sticky;
    top: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10;
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    text-align: left;
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

tr:last-child td {
    border-bottom: none;
}

a {
    color: #818CF8;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #A5B4FC;
    text-decoration: underline;
}

.break-all {
    word-break: break-all;
    min-width: 250px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-indexable {
    background-color: var(--status-good-bg);
    color: var(--status-good);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-noindex {
    background-color: var(--status-bad-bg);
    color: var(--status-bad);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-blocked {
    background-color: var(--status-warn-bg);
    color: var(--status-warn);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-error {
    background: rgba(100, 116, 139, 0.2);
    color: #CBD5E1;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Content Section */
.content-section {
    margin-top: 5rem;
    padding: 3rem;
}

.content-section h2,
.content-section h3 {
    color: var(--text-main);
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.content-section p {
    color: #CBD5E1;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-section ul,
.content-section ol {
    color: #CBD5E1;
    font-size: 1.05rem;
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.content-section li {
    margin-bottom: 0.75rem;
}

.content-section code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #A5B4FC;
}

/* Completion Modal Popup */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: #1E293B;
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 1.5rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: scaleUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.modal-content h2 {
    margin: 0 0 1rem;
    font-size: 2rem;
    color: #fff;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(79, 70, 229, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        backdrop-filter: blur(var(--glass-blur));
        padding: 1.5rem;
        border-top: 1px solid var(--card-border);
        border-bottom: 1px solid var(--card-border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    }
    .nav-links.active {
        display: flex;
    }
    .hero-header p.tagline {
        font-size: 1.1rem;
    }

    .search-section {
        border-radius: 2rem;
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    #scan-form {
        flex-direction: column;
        background: transparent;
        padding: 0;
        gap: 1rem;
    }

    .input-wrapper {
        width: 100%;
        background: rgba(30, 41, 59, 0.7);
        border-radius: 3rem;
        border: 1px solid var(--border);
    }

    .primary-btn,
    .stop-btn {
        width: 100%;
        justify-content: center;
    }

    .content-section {
        padding: 2rem;
    }
}