:root {
    --bg-dark: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --primary-cyan: #06b6d4;
    --primary-cyan-glow: rgba(6, 182, 212, 0.5);
    --secondary-purple: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.1);
    --red-glow: rgba(239, 68, 68, 0.5);
    --red: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.15), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(139, 92, 246, 0.15), transparent 25%);
}

.hud-container {
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Header & Tabs */
.hud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2);
}

.logo { display: flex; align-items: center; gap: 15px; }
.logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(90deg, var(--primary-cyan), var(--secondary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pulse-ring {
    width: 12px; height: 12px;
    background: var(--primary-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-cyan-glow), 0 0 20px var(--primary-cyan-glow);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 var(--primary-cyan-glow); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

.tabs {
    display: flex;
    gap: 10px;
    background: rgba(0,0,0,0.4);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    transition: 0.3s;
}
.tab-btn.active {
    background: rgba(255,255,255,0.1);
    color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.status-indicator { font-size: 0.9rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.dot.online { width: 8px; height: 8px; border-radius: 50%; background-color: #22c55e; box-shadow: 0 0 8px #22c55e; }

/* Views */
.view-section { display: none; flex: 1; overflow: hidden; }
.view-section.active { display: flex; }

.dashboard { flex: 1; overflow: hidden; }
.panel { flex: 1; padding: 40px; display: flex; flex-direction: column; min-height: 0; }
.full-panel { flex: 1; padding: 40px; overflow-y: auto; }
.simulator-panel { border-right: 1px solid var(--border-color); max-width: 400px; }

.panel h2 { font-size: 1.8rem; font-weight: 600; margin-bottom: 5px; }
.subtitle { color: var(--text-muted); margin-bottom: 30px; font-size: 0.95rem; }

/* Forms */
.form-group { margin-bottom: 25px; }
.form-group label { display: block; margin-bottom: 10px; font-weight: 500; font-size: 1rem; color: var(--primary-cyan); }
input[type="text"] { width: 100%; padding: 12px 15px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-color); border-radius: 8px; color: white; font-size: 1rem; font-family: 'Outfit', sans-serif; outline: none; transition: 0.3s; }
input[type="text"]:focus { border-color: var(--primary-cyan); box-shadow: 0 0 10px var(--primary-cyan-glow); }

/* Toggle */
.toggle-container { display: flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.2); padding: 10px 15px; border-radius: 12px; border: 1px solid var(--border-color); }
.toggle-label { font-weight: 600; color: var(--text-muted); transition: color 0.3s; }
.true-label.active { color: var(--primary-cyan); text-shadow: 0 0 8px var(--primary-cyan-glow); }
.false-label.active { color: var(--red); text-shadow: 0 0 8px var(--red-glow); }

.switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: var(--red); transition: .4s; box-shadow: 0 0 10px var(--red-glow); border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--primary-cyan); box-shadow: 0 0 10px var(--primary-cyan-glow); }
input:checked + .slider:before { transform: translateX(26px); }

/* Button */
.glow-on-hover {
    width: 100%; padding: 15px; border: none; color: #fff;
    background: linear-gradient(45deg, var(--primary-cyan), var(--secondary-purple));
    cursor: pointer; border-radius: 10px; font-size: 1.1rem; font-weight: 600; font-family: 'Outfit', sans-serif;
    text-transform: uppercase; box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4); transition: 0.2s;
}
.glow-on-hover:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5); }
.mt-20 { margin-top: 20px; }

/* Output Area */
.output-container {
    flex: 1; background: rgba(0, 0, 0, 0.4); border: 1px dashed var(--border-color); border-radius: 16px;
    display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding: 20px;
    min-height: 0;
}
.scrollable { overflow-y: auto; }
.output-container.empty { justify-content: center; }
.output-container.empty .placeholder-text { display: block; color: var(--text-muted); font-style: italic; }
.placeholder-text { display: none; }

/* Ad Card */
.ad-card {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(6, 182, 212, 0.3); border-radius: 16px;
    padding: 25px; width: 100%; max-width: 600px; margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 0 20px rgba(6, 182, 212, 0.1);
    animation: slideUp 0.5s forwards;
    position: relative; overflow: hidden; flex-shrink: 0;
}
.ad-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--primary-cyan), var(--secondary-purple)); }
.ad-headline { color: var(--primary-cyan); font-size: 1.2rem; font-weight: 800; text-transform: uppercase; }
.ad-product-container { display: flex; gap: 20px; align-items: center; margin-top: 10px; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; }
.ad-image { width: 80px; height: 80px; border-radius: 10px; object-fit: contain; background: #fff; border: 2px solid var(--border-color); }
.ad-details { flex: 1; }
.ad-product-name { 
    font-size: 1.1rem; 
    font-weight: 600; 
    margin-bottom: 5px; 
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ad-price { font-size: 1.4rem; font-weight: 800; color: #10b981; }
.ad-reason { font-size: 0.9rem; color: var(--text-muted); font-style: italic; border-left: 3px solid var(--secondary-purple); padding-left: 10px; margin-top: 10px; }
.ad-action { display: inline-block; width: 100%; text-align: center; padding: 12px; background: var(--primary-cyan); color: #fff; text-decoration: none; border-radius: 8px; font-weight: 600; margin-top: 10px; transition: 0.3s; }
.ad-action:hover { background: #0891b2; }

/* Comparison Table */
.comparison-section {
    width: 100%; max-width: 600px;
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 15px; animation: slideUp 0.6s forwards; flex-shrink: 0;
}
.comparison-section h3 { margin-bottom: 10px; font-size: 1.1rem; color: var(--secondary-purple); }
.comp-table { width: 100%; border-collapse: collapse; }
.comp-table th, .comp-table td { padding: 10px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.05); }
.comp-table th { color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.comp-table tr.winner { background: rgba(6, 182, 212, 0.1); border-left: 3px solid var(--primary-cyan); }
.comp-table tr:last-child td { border-bottom: none; }
.platform-link { color: inherit; text-decoration: none; display: flex; align-items: center; transition: color 0.2s; }
.platform-link:hover { color: var(--primary-cyan); }
.platform-img { width: 24px; height: 24px; vertical-align: middle; margin-right: 8px; border-radius: 4px; }
.winner-badge { background: var(--primary-cyan); color: #000; font-size: 0.7rem; font-weight: 800; padding: 2px 6px; border-radius: 4px; margin-left: 10px; text-transform: uppercase; }
.offer-badge { background: rgba(139, 92, 246, 0.2); color: #d8b4fe; font-size: 0.8rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; border: 1px solid rgba(139, 92, 246, 0.4); display: inline-block; margin-top: 4px; }

/* Suppressed Card */
.suppressed-card { text-align: center; padding: 30px; border: 1px solid rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.05); border-radius: 16px; animation: fadeIn 0.5s forwards; }
.suppressed-icon { font-size: 3rem; margin-bottom: 15px; display: block; }
.suppressed-title { color: var(--red); font-size: 1.5rem; margin-bottom: 10px; }

/* Analytics Grid */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat-card {
    background: rgba(0,0,0,0.3); border: 1px solid var(--border-color); border-radius: 16px;
    padding: 20px; position: relative; overflow: hidden;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: rgba(255,255,255,0.1); }
.stat-card:hover { border-color: var(--primary-cyan); box-shadow: 0 5px 15px rgba(0,0,0,0.3); transform: translateY(-2px); transition: 0.3s; }
.stat-title { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.stat-value { font-size: 2.2rem; font-weight: 800; color: #fff; }
.stat-desc { font-size: 0.8rem; color: var(--text-muted); margin-top: 5px; }

.text-cyan { color: var(--primary-cyan) !important; }
.text-green { color: #10b981 !important; }
.text-red { color: #ef4444 !important; }

@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.loader { width: 48px; height: 48px; border: 5px solid rgba(255,255,255,0.1); border-bottom-color: var(--primary-cyan); border-radius: 50%; display: inline-block; animation: rotation 1s linear infinite; display: none; margin: 50px auto; }
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
