:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.6);
    --accent-primary: #3b82f6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background: radial-gradient(circle at top right, #1e293b, #0f172a);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.modal-open {
    overflow: hidden;
}

/* Premium Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: background 0.3s;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

h1, h2, h3 { font-family: 'Outfit', sans-serif; font-weight: 700; }

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.25rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4);
    word-break: break-word;
    overflow-wrap: anywhere;
}

.hero-section { padding: 3rem 0; }

.form-control {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.8rem 1.25rem;
    border-radius: 0.75rem;
}

.form-control:focus {
    background: rgba(15, 23, 42, 0.6);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    color: white;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
}

.btn-outline-primary {
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
    border-radius: 0.75rem;
    font-weight: 600;
}
.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

/* Sidebar History */
.history-item {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0.5rem;
}
.history-item:hover { background: rgba(255, 255, 255, 0.05); }
.history-url { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scanning Animation */
.status-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    min-height: 90px;
}
/* Premium Cookie Modal */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10001;
    opacity: 0; visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.cookie-modal-overlay.active { opacity: 1; visibility: visible; }
.cookie-modal-content {
    background: #1e293b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1.5rem;
    width: 90%; max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.6);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Hide scrollbar but keep functionality */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.cookie-modal-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.cookie-modal-overlay.active .cookie-modal-content { transform: scale(1); }
.cookie-detail-row {
    display: flex; flex-direction: column;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.cookie-detail-label { color: #64748b; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 4px; }
.cookie-detail-value { color: #f1f5f9; font-size: 0.85rem; word-break: break-all; font-family: 'Inter', sans-serif; }
.cookie-modal-close {
    margin-top: 1.5rem;
    width: 100%;
}
.banner-text-container {
    flex: 1;
}
.status-banner.is-secure-banner {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
}
.status-banner.is-secure-banner #banner-title { color: #34d399; }
.status-banner.is-secure-banner #banner-sub { color: rgba(209,250,229,0.8); }
.status-banner.is-danger-banner {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
}
.status-banner.is-danger-banner #banner-title { color: #f87171; }
.status-banner.is-danger-banner #banner-sub { color: rgba(254,202,202,0.8); }
.status-banner.is-suspicious-banner {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.4);
}
.status-banner.is-suspicious-banner #banner-title { color: #fbbf24; }
.status-banner.is-suspicious-banner #banner-sub { color: rgba(253, 230, 138, 0.8); }

.pulse-ring {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-blue 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stop-pulse {
    animation: none !important;
}

.pulse-ring.is-secure { background: var(--accent-success) !important; }
.pulse-ring.is-danger { background: var(--accent-danger) !important; }
.pulse-ring.is-suspicious { background: #f59e0b !important; }

@keyframes pulse-blue {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.table td { vertical-align: middle; border-bottom: 1px solid rgba(255, 255, 255, 0.03); padding: 1rem; }
.badge-safe { background: rgba(16, 185, 129, 0.15); color: #34d399; font-size: 0.75rem; padding: 0.25rem 0.5rem; border-radius: 0.35rem; }
.url-link { color: var(--accent-primary); cursor: pointer; text-decoration: none; transition: color 0.2s; }
.url-link:hover { color: #60a5fa; text-decoration: underline; }

/* Ad Modal */
.ad-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}
.ad-overlay.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.ad-box {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    width: 90%;
    max-width: 520px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.6);
    animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity:0; } to { transform: translateY(0); opacity:1; } }
.ad-header {
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ad-content {
    padding: 2rem 2rem 1.5rem;
}
.ad-destination {
    background: rgba(255,255,255,0.04);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    word-break: break-all;
    margin-bottom: 1.5rem;
    border: 1px solid var(--glass-border);
}
.ad-banner-placeholder {
    background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.08));
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 0.75rem;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    gap: 0.5rem;
}
.ad-countdown-ring {
    width: 48px;
    height: 48px;
    position: relative;
    flex-shrink: 0;
}
.ad-countdown-ring svg { transform: rotate(-90deg); }
.ad-countdown-ring .ring-bg { fill: none; stroke: rgba(255,255,255,0.08); stroke-width: 4; }
.ad-countdown-ring .ring-fill { fill: none; stroke: var(--accent-primary); stroke-width: 4; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ad-countdown-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.progress-container {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.5rem;
    display: none;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--accent-primary);
    transition: width 0.3s ease;
}

.hide { display: none !important; }

/* Marquee Styles */
.marquee-content { 
    display: inline-block; 
    white-space: nowrap; 
    animation: marquee 35s linear infinite; 
    line-height: 35px; 
    font-size: 0.8rem; 
    color: #cbd5e1; 
}
.marquee-content:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* Consent Banner */
#consent-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    z-index: 10000;
    display: none;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
#consent-banner.active {
    opacity: 1;
    transform: translateY(0);
}
.consent-header { display: flex; align-items: center; gap: 0.75rem; color: #3b82f6; }
.consent-header h5 { margin: 0; font-family: 'Outfit', sans-serif; font-size: 1.1rem; }
.consent-body p { margin: 0; font-size: 0.85rem; color: #94a3b8; line-height: 1.5; }
.consent-body a { color: #3b82f6; text-decoration: none; }
.consent-body a:hover { text-decoration: underline; }
.consent-actions { display: flex; gap: 0.75rem; }
.btn-consent {
    flex: 1;
    padding: 0.6rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}
.btn-consent-accept { background: #3b82f6; color: white; }
.btn-consent-accept:hover { background: #2563eb; transform: translateY(-1px); }
.btn-consent-decline { background: rgba(255, 255, 255, 0.05); color: #94a3b8; border: 1px solid rgba(255, 255, 255, 0.1); }
.btn-consent-decline:hover { background: rgba(255, 255, 255, 0.1); color: #f8fafc; }

/* Dynamic Link Classes (for SEO/Live Scans) */
.marquee-link {
    color: #a78bfa;
    text-decoration: none;
    margin-right: 45px;
    opacity: 0.8;
    transition: 0.2s;
}
.marquee-link:hover {
    opacity: 1;
}

.grid-link {
    text-decoration: none;
    font-size: 0.8rem;
    transition: 0.2s;
    opacity: 0.9;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: bottom;
}
.grid-link:hover {
    opacity: 1;
}
