/* ===== VulnX - Future Tech UI Theme ===== */
:root {
    --cyber-cyan: #00f5ff;
    --cyber-blue: #00a8ff;
    --cyber-purple: #a855f7;
    --cyber-magenta: #e040fb;
    --cyber-green: #00ff88;
    --cyber-orange: #ff6b35;
    --cyber-red: #ff3366;
    --bg-dark: #050508;
    --bg-panel: rgba(5, 10, 20, 0.85);
    --border-glow: rgba(0, 245, 255, 0.4);
    --text-primary: #e0f7ff;
    --text-secondary: #88d4ff;
}

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

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Rajdhani', 'Monaco', monospace;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
}

/* Futuristic grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(0, 245, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 245, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
}

/* Gradient + scanline overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.06) 2px, rgba(0, 0, 0, 0.06) 4px),
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 168, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(168, 85, 247, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* ===== GLASS CONTAINER - HUD Panel ===== */
.glass {
    width: 95%;
    max-width: 1100px;
    margin: 30px auto;
    padding: 35px;
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glow);
    border-radius: 4px;
    box-shadow: 
        0 0 40px rgba(0, 245, 255, 0.15),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    flex: 1;
    clip-path: polygon(
        0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px)
    );
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyber-cyan), var(--cyber-purple), transparent);
    opacity: 0.8;
}

.glass:hover {
    box-shadow: 
        0 0 60px rgba(0, 245, 255, 0.25),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 245, 255, 0.6);
}

/* ===== HEADER - Tech Title ===== */
h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    font-size: clamp(2em, 5vw, 3.5em);
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 245, 255, 0.5);
    margin-bottom: 10px;
    animation: titleGlow 3s ease-in-out infinite alternate;
}

h1::after {
    content: '▌';
    -webkit-text-fill-color: var(--cyber-cyan);
    animation: cursorBlink 1s infinite;
    margin-left: 5px;
}

@keyframes titleGlow {
    0% { filter: drop-shadow(0 0 20px rgba(0, 245, 255, 0.4)); }
    100% { filter: drop-shadow(0 0 40px rgba(168, 85, 247, 0.6)); }
}

@keyframes cursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ===== FORM - Futuristic Inputs ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    form {
        flex-direction: row;
        justify-content: center;
    }
}

.input-group {
    flex: 1;
    min-width: 0;
}

input {
    background: rgba(0, 20, 40, 0.8);
    border: 2px solid rgba(0, 245, 255, 0.3);
    color: var(--cyber-cyan);
    padding: 16px 20px;
    border-radius: 2px;
    width: 100%;
    font-family: 'Rajdhani', monospace;
    font-size: 1.1em;
    font-weight: 500;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(0, 245, 255, 0.4);
}

input:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.3);
}

button {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2), rgba(168, 85, 247, 0.2));
    border: 2px solid var(--cyber-cyan);
    color: var(--cyber-cyan);
    padding: 16px 30px;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover::before {
    left: 100%;
}

button:hover {
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.3), rgba(168, 85, 247, 0.3));
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.4);
    transform: translateY(-2px);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== CARDS - HUD Panels ===== */
.card {
    margin-top: 20px;
    padding: 25px;
    background: rgba(5, 15, 30, 0.7);
    border: 1px solid rgba(0, 245, 255, 0.25);
    border-radius: 2px;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    border-left: 3px solid var(--cyber-cyan);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 245, 255, 0.05) 100%);
    border-radius: 0 0 0 100%;
}

.card:hover {
    border-color: rgba(0, 245, 255, 0.5);
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
}

.main-result {
    border-left-color: var(--cyber-purple);
    border-width: 2px;
}

/* ===== TABLES ===== */
.result-table, .summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.result-table td, .summary-table td {
    padding: 14px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.1);
    transition: all 0.3s ease;
}

.result-table td:first-child,
.summary-table td:first-child {
    font-weight: 600;
    color: var(--cyber-cyan);
    width: 35%;
    font-family: 'Orbitron', monospace;
    font-size: 0.85em;
}

.result-table td:last-child,
.summary-table td:last-child {
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 2px;
    font-weight: 600;
    font-family: 'Orbitron', monospace;
    font-size: 0.8em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-badge.safe {
    background: rgba(0, 255, 136, 0.15);
    color: var(--cyber-green);
    border: 1px solid var(--cyber-green);
}

.status-badge.danger, .status-badge.critical, .status-badge.phishing {
    background: rgba(255, 51, 102, 0.15);
    color: var(--cyber-red);
    border: 1px solid var(--cyber-red);
}

.status-badge.medium, .status-badge.high {
    background: rgba(255, 107, 53, 0.15);
    color: var(--cyber-orange);
    border: 1px solid var(--cyber-orange);
}

.status-badge.low {
    background: rgba(0, 245, 255, 0.15);
    color: var(--cyber-cyan);
    border: 1px solid var(--cyber-cyan);
}

.status-badge.info {
    background: rgba(0, 168, 255, 0.15);
    color: var(--cyber-blue);
    border: 1px solid var(--cyber-blue);
}

/* ===== TOGGLE BUTTONS ===== */
.toggle-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.toggle-btn {
    background: rgba(0, 30, 60, 0.6);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--cyber-cyan);
    padding: 12px 18px;
    border-radius: 2px;
    cursor: pointer;
    font-family: 'Rajdhani', monospace;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: rgba(0, 245, 255, 0.15);
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}

.toggle-btn:hover {
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.2);
}

/* ===== MODE TABS ===== */
.mode-tabs {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.mode-tab {
    padding: 14px 28px;
    border-radius: 2px;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    letter-spacing: 0.1em;
    border: 1px solid rgba(0, 245, 255, 0.3);
    background: rgba(0, 30, 60, 0.5);
    color: var(--cyber-cyan);
}

.mode-tab.active {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.3);
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
}

.section-header i {
    color: var(--cyber-cyan);
    font-size: 1.2em;
}

.section-header h2, .section-header h3 {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: var(--cyber-cyan);
    letter-spacing: 0.1em;
}

/* ===== DETAIL SECTIONS ===== */
.detail-section {
    margin-top: 15px;
    animation: slideIn 0.5s ease-out;
}

.detail-section.hidden {
    display: none !important;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* ===== SCROLL CONTAINER ===== */
.scroll-container {
    max-height: 400px;
    overflow-y: auto;
    background: rgba(0, 10, 25, 0.5);
    padding: 15px;
    border-radius: 2px;
    margin-top: 10px;
    border: 1px solid rgba(0, 245, 255, 0.1);
}

.scroll-container::-webkit-scrollbar {
    width: 6px;
}

.scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.5);
}

.scroll-container::-webkit-scrollbar-thumb {
    background: rgba(0, 245, 255, 0.3);
    border-radius: 3px;
}

/* ===== PRE & CODE ===== */
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    background: rgba(0, 15, 35, 0.8);
    padding: 15px;
    border-radius: 2px;
    border: 1px solid rgba(0, 245, 255, 0.2);
    font-size: 0.9em;
    line-height: 1.5;
    color: var(--cyber-cyan);
    font-family: 'Rajdhani', monospace;
}

/* ===== DATA ITEMS ===== */
.data-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(0, 245, 255, 0.08);
}

.data-label {
    font-weight: 600;
    color: var(--cyber-cyan);
    margin-right: 10px;
}

.data-value {
    color: var(--text-secondary);
    font-family: 'Rajdhani', monospace;
}

/* ===== ERROR & SUCCESS ===== */
.error {
    color: var(--cyber-red);
    background: rgba(255, 51, 102, 0.1);
    border: 1px solid rgba(255, 51, 102, 0.3);
    padding: 15px;
    border-radius: 2px;
    margin: 10px 0;
}

.success {
    color: var(--cyber-green);
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid rgba(0, 255, 136, 0.3);
    padding: 15px;
    border-radius: 2px;
    margin: 10px 0;
}

/* ===== LOADING OVERLAY (inline styles in index) ===== */
.loading-content {
    border-color: var(--cyber-cyan) !important;
}

.progress-fill {
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-purple)) !important;
}

/* ===== FOOTER ===== */
footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    color: var(--cyber-cyan);
    font-family: 'Rajdhani', monospace;
    font-size: 0.85em;
    border-top: 1px solid rgba(0, 245, 255, 0.2);
    background: rgba(5, 15, 30, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    gap: 15px;
    flex-wrap: wrap;
}

footer i {
    color: var(--cyber-cyan);
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mb-20 { margin-bottom: 20px; }
.mode-panel.hidden { display: none !important; }

/* ===== TABLE RESPONSIVE ===== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.result-table thead th {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    color: var(--cyber-cyan);
    padding: 12px;
    border-bottom: 1px solid rgba(0, 245, 255, 0.3);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .glass { padding: 20px; width: 98%; }
    .toggle-btn { min-width: calc(50% - 10px); }
    .mode-tab { padding: 12px 20px; font-size: 0.85em; }
}

@media (max-width: 480px) {
    .toggle-btn { min-width: 100%; }
    h1 { letter-spacing: 0.1em; }
}

/* ===== AI Side Panel ===== */
.ai-side-panel {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 900;
    transition: right 0.3s ease;
}
.ai-side-panel.open { right: 0; }
.ai-panel-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: 2px solid var(--cyber-cyan);
    background: linear-gradient(135deg, rgba(0, 168, 255, 0.2), rgba(168, 85, 247, 0.2));
    color: var(--cyber-cyan);
    cursor: pointer;
    border-radius: 12px 0 0 12px;
    font-size: 1.2em;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-panel-toggle:hover {
    background: linear-gradient(135deg, rgba(0, 245, 255, 0.3), rgba(168, 85, 247, 0.3));
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.5);
    transform: scale(1.05);
}
.ai-panel-content {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    width: 350px;
    max-height: 85vh;
    padding: 25px;
    background: linear-gradient(135deg, rgba(5, 15, 30, 0.98), rgba(0, 20, 50, 0.95));
    border: 2px solid rgba(0, 245, 255, 0.3);
    border-right: none;
    border-radius: 12px 0 0 12px;
    display: none;
    flex-direction: column;
    gap: 15px;
    box-shadow: -5px 0 30px rgba(0, 245, 255, 0.2);
    backdrop-filter: blur(15px);
}
.ai-side-panel.open .ai-panel-content { display: flex; }
.ai-panel-desc { font-size: 0.85em; color: var(--text-secondary); }
.ai-panel-content textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}
.ai-response {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 10, 25, 0.6);
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 4px;
    font-size: 0.9em;
    white-space: pre-wrap;
}
.ai-response.loading { color: var(--cyber-cyan); }

.ai-panel-content .section-header {
    margin-bottom: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 245, 255, 0.2);
}

.cyber-text {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
}

.ai-text {
    font-family: 'Rajdhani', monospace;
    font-weight: 600;
    color: var(--cyber-green);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.ai-panel-desc {
    font-size: 0.85em;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.8;
}

.ai-input-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ai-input-container textarea {
    min-height: 90px;
    resize: vertical;
    font-family: 'Rajdhani', monospace;
    font-size: 0.9em;
    padding: 12px 15px;
    border: 1px solid rgba(0, 245, 255, 0.3);
    border-radius: 6px;
    background: rgba(0, 30, 60, 0.6);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.ai-input-container textarea:focus {
    outline: none;
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
    background: rgba(0, 30, 60, 0.8);
}

.ai-ask-btn {
    background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
    border: none;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.85em;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.3);
}

.ai-ask-btn:hover {
    background: linear-gradient(135deg, var(--cyber-blue), var(--cyber-magenta));
    box-shadow: 0 0 25px rgba(0, 245, 255, 0.5);
    transform: translateY(-2px);
}

.ai-ask-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ai-response {
    max-height: 350px;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(0, 15, 35, 0.8), rgba(0, 25, 55, 0.6));
    border: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px;
    font-size: 0.9em;
    white-space: pre-wrap;
    animation: slideIn 0.4s ease-out;
}

.ai-response.loading {
    position: relative;
    color: var(--cyber-cyan);
}

.ai-response.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 245, 255, 0.05);
    animation: pulse 2s infinite;
}

.ai-response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    background: rgba(0, 245, 255, 0.1);
    border-bottom: 1px solid rgba(0, 245, 255, 0.2);
    border-radius: 8px 8px 0 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--cyber-cyan);
}

.ai-response-content {
    padding: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-footer {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 245, 255, 0.1);
    margin-top: 10px;
}

.ai-footer small {
    font-size: 0.75em;
    color: var(--text-secondary);
    opacity: 0.7;
    font-family: 'Rajdhani', monospace;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* ===== Exploit-DB Button ===== */
.exploit-db-btn {
    padding: 6px 12px !important;
    font-size: 0.8em !important;
    min-width: auto !important;
}
.exploit-code-container {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0, 10, 25, 0.8);
    border: 1px solid rgba(255, 51, 102, 0.3);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8em;
    white-space: pre-wrap;
    max-height: 400px;
    overflow-y: auto;
}
