/* =============================================================================
   UNIFIED CYBERSECURITY THEME - unified-theme.css
   Consolidated styles for ransomware.abrandao.net
   ============================================================================= */

/* -----------------------------------------------------------------------------
   FONTS
   ----------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* -----------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES (for use outside Tailwind)
   ----------------------------------------------------------------------------- */
:root {
    --cyber-dark: #0a0a0f;
    --cyber-darker: #050508;
    --cyber-card: #111118;
    --cyber-border: #1a1a25;
    --cyber-hover: #1f1f2e;
    --cyber-cyan: #00d4ff;
    --cyber-purple: #8b5cf6;
    --cyber-pink: #ec4899;
    --cyber-green: #10b981;
    --cyber-orange: #f59e0b;
    --cyber-red: #ef4444;
    --cyber-yellow: #eab308;
    --cyber-blue: #3b82f6;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;
}

/* -----------------------------------------------------------------------------
   BASE STYLES
   ----------------------------------------------------------------------------- */
* {
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background: linear-gradient(135deg, #0a0a0f, #0d0d15, #0a0a0f);
    min-height: 100vh;
    color: var(--text-primary);
}

/* -----------------------------------------------------------------------------
   SCROLLBARS
   ----------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--cyber-card);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--cyber-cyan), var(--cyber-purple));
    border-radius: 4px;
}

.scrollbar-dark::-webkit-scrollbar {
    width: 8px;
}

.scrollbar-dark::-webkit-scrollbar-track {
    background: var(--cyber-card);
}

.scrollbar-dark::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--cyber-cyan), var(--cyber-purple));
    border-radius: 4px;
}

/* -----------------------------------------------------------------------------
   CARDS
   ----------------------------------------------------------------------------- */
.cyber-card {
    background: linear-gradient(145deg, rgba(17, 17, 24, 0.9), rgba(10, 10, 15, 0.95));
    border: 1px solid rgba(0, 212, 255, 0.1);
    transition: all 0.3s ease;
}

.cyber-card:hover {
    border-color: rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.card-glow {
    position: relative;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), transparent 50%, rgba(139, 92, 246, 0.2));
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-glow:hover::before {
    opacity: 1;
}

.metric-card {
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.dashboard-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.chart-container {
    background: linear-gradient(145deg, rgba(17, 17, 24, 0.9), rgba(10, 10, 15, 0.95));
    border: 1px solid var(--cyber-border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* -----------------------------------------------------------------------------
   STAT GRADIENT CARDS (numbered variants)
   ----------------------------------------------------------------------------- */
.stat-gradient-1 {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-left: 3px solid var(--cyber-red);
}

.stat-gradient-2 {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(0, 212, 255, 0.05));
    border-left: 3px solid var(--cyber-cyan);
}

.stat-gradient-3 {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
    border-left: 3px solid var(--cyber-purple);
}

.stat-gradient-4 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border-left: 3px solid var(--cyber-green);
}

.stat-gradient-5 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.05));
    border-left: 3px solid var(--cyber-orange);
}

.stat-gradient-6 {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.05));
    border-left: 3px solid var(--cyber-pink);
}

.stat-gradient-7 {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.15), rgba(234, 179, 8, 0.05));
    border-left: 3px solid var(--cyber-yellow);
}

/* -----------------------------------------------------------------------------
   BORDERS & DECORATIVE ELEMENTS
   ----------------------------------------------------------------------------- */
.cyber-border {
    position: relative;
}

.cyber-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-purple), var(--cyber-pink));
}

.gradient-border {
    background: linear-gradient(135deg, #0a0a0f, #111118);
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.5), rgba(139, 92, 246, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    border-radius: inherit;
}

.icon-container {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(139, 92, 246, 0.1));
}

.hero-glow {
    background: radial-gradient(ellipse at center, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
}

.grid-bg {
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* -----------------------------------------------------------------------------
   TABS
   ----------------------------------------------------------------------------- */
/* Style 1: Gradient background on active (default) */
.tab-btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--cyber-cyan) 0%, var(--cyber-purple) 100%);
    color: white;
}

.tab-btn:not(.active):hover {
    background: var(--cyber-hover);
}

/* Style 2: Underline animation (use .tab-btn-underline) */
.tab-btn-underline {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.tab-btn-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-purple));
    transition: all 0.3s;
    transform: translateX(-50%);
}

.tab-btn-underline:hover::after,
.tab-btn-underline.active::after {
    width: 100%;
}

.tab-btn-underline.active {
    color: var(--cyber-cyan);
    background: rgba(0, 212, 255, 0.1);
}

/* Style 3: Border highlight (use .tab-active class) */
.tab-active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-color: var(--cyber-cyan);
}

/* -----------------------------------------------------------------------------
   TABLES
   ----------------------------------------------------------------------------- */
.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.05)) !important;
    color: var(--text-primary) !important;
    border-color: var(--cyber-border) !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2);
}

.data-table td {
    background: var(--cyber-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--cyber-border) !important;
}

.data-table tr:hover td,
.data-table tbody tr:hover {
    background: var(--cyber-hover) !important;
}

.data-row:hover {
    background: rgba(0, 212, 255, 0.05);
}

/* Simple-DataTables styling */
.dataTable-wrapper .dataTable-search input,
.dataTable-wrapper .dataTable-selector {
    background: var(--cyber-dark);
    border: 1px solid var(--cyber-border);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 8px 12px;
}

.dataTable-wrapper .dataTable-pagination a {
    background: var(--cyber-card);
    border: 1px solid var(--cyber-border);
    color: var(--text-secondary);
}

.dataTable-wrapper .dataTable-pagination a.active,
.dataTable-wrapper .dataTable-pagination a:hover {
    background: linear-gradient(135deg, var(--cyber-cyan), var(--cyber-purple));
    border-color: var(--cyber-cyan);
    color: white;
}

/* -----------------------------------------------------------------------------
   FORMS & INPUTS
   ----------------------------------------------------------------------------- */
.search-input {
    background: rgba(17, 17, 24, 0.8);
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.3s;
}

.search-input:focus {
    border-color: var(--cyber-cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
    outline: none;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2300d4ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* -----------------------------------------------------------------------------
   MODALS
   ----------------------------------------------------------------------------- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, var(--cyber-card), var(--cyber-dark));
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* -----------------------------------------------------------------------------
   ALERTS & BANNERS
   ----------------------------------------------------------------------------- */
.alert-banner {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* -----------------------------------------------------------------------------
   BADGES
   ----------------------------------------------------------------------------- */
.badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-transform: uppercase;
}

/* -----------------------------------------------------------------------------
   NAVIGATION
   ----------------------------------------------------------------------------- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyber-cyan), var(--cyber-purple));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* -----------------------------------------------------------------------------
   MITRE ATT&CK SPECIFIC
   ----------------------------------------------------------------------------- */
.tactic-header {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.2), rgba(139, 92, 246, 0.05));
    border-bottom: 2px solid var(--cyber-purple);
}

.technique-pill {
    background: linear-gradient(135deg, rgba(17, 17, 24, 0.95), rgba(26, 26, 37, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.15);
    transition: all 0.2s;
    cursor: pointer;
}

.technique-pill:hover {
    border-color: rgba(0, 212, 255, 0.4);
}

.technique-pill.has-atomic {
    border-color: rgba(16, 185, 129, 0.3);
}

.technique-pill.has-atomic:hover {
    border-color: rgba(16, 185, 129, 0.6);
}

.matrix-cell {
    transition: all 0.2s;
}

.matrix-cell:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* -----------------------------------------------------------------------------
   ANIMATIONS
   ----------------------------------------------------------------------------- */
/* Blink / Live indicator */
.live-indicator {
    animation: blink 1.5s ease-in-out infinite;
}

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

/* Pulse dot */
.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--cyber-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1); 
    }
    50% { 
        opacity: 0.5; 
        transform: scale(1.2); 
    }
}

/* Float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Scan line */
@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

.scan-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.5), transparent);
    animation: scan 3s linear infinite;
}

/* Glow animation */
@keyframes glow {
    from {
        box-shadow: 0 0 5px rgba(0, 212, 255, 0.2),
                    0 0 10px rgba(0, 212, 255, 0.1);
    }
    to {
        box-shadow: 0 0 10px rgba(0, 212, 255, 0.4),
                    0 0 20px rgba(0, 212, 255, 0.2);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

/* -----------------------------------------------------------------------------
   UTILITY CLASSES
   ----------------------------------------------------------------------------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Responsive grid for stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------------------------------------
   CHART.JS DARK THEME OVERRIDES
   ----------------------------------------------------------------------------- */
.chart-container canvas {
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.1));
}