@import url('fonts.css');

:root {
    --webcore-bg: #0B0F19;
    --webcore-bg-alt: #0F172A;
    --webcore-surface: #111827;
    --webcore-surface-card: #151D30;
    --webcore-surface-glass: rgba(17, 24, 39, 0.78);
    
    --webcore-blue: #2563EB;
    --webcore-blue-light: #3B82F6;
    --webcore-blue-glow: rgba(37, 99, 235, 0.35);
    
    --webcore-cyan: #06B6D4;
    --webcore-cyan-glow: rgba(6, 182, 212, 0.3);
    
    --webcore-purple: #8B5CF6;
    --webcore-emerald: #10B981;
    --webcore-amber: #F59E0B;
    --webcore-rose: #F43F5E;

    --webcore-gradient: linear-gradient(135deg, #2563EB 0%, #3B82F6 50%, #06B6D4 100%);
    --webcore-gradient-subtle: linear-gradient(180deg, rgba(37, 99, 235, 0.12) 0%, rgba(15, 23, 42, 0) 100%);
    --webcore-border: rgba(255, 255, 255, 0.1);
    --webcore-border-hover: rgba(59, 130, 246, 0.45);
}

body {
    background-color: var(--webcore-bg) !important;
    color: #F8FAFC !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif !important;
    letter-spacing: -0.02em;
    line-height: 1.35 !important;
    margin-top: 0;
}

p, span, div, label {
    box-sizing: border-box;
}

/* ==========================================================================
   Navigation Links & Drawer (No Overlaps, Clean Ellipsis & Padding)
   ========================================================================== */
.mud-nav-link {
    border-radius: 10px !important;
    padding: 10px 14px !important;
    margin-bottom: 3px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: #94A3B8 !important;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1) !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: flex !important;
    align-items: center !important;
}

.mud-nav-link .mud-nav-link-text {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-left: 10px !important;
    font-size: 0.88rem !important;
    line-height: 1.4 !important;
}

.mud-nav-link.active {
    background: rgba(37, 99, 235, 0.2) !important;
    color: #60A5FA !important;
    font-weight: 700 !important;
    border-left: 3px solid #38BDF8 !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15) !important;
}

.mud-nav-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #F8FAFC !important;
}

/* ==========================================================================
   Glassmorphism Cards & Panels (Spacious & Safe)
   ========================================================================== */
.glass-card {
    background: var(--webcore-surface-glass) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--webcore-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.45) !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box !important;
}

.glass-card:hover {
    border-color: var(--webcore-border-hover) !important;
    box-shadow: 0 14px 40px 0 rgba(37, 99, 235, 0.2) !important;
}

.glass-panel {
    background: rgba(13, 19, 34, 0.92) !important;
    backdrop-filter: blur(18px) !important;
    border: 1px solid var(--webcore-border) !important;
    border-radius: 14px !important;
}

/* Generous Card Padding Helper Classes */
.card-pad {
    padding: 24px 28px !important;
}

.card-pad-lg {
    padding: 28px 36px !important;
}

/* ==========================================================================
   Chips, Badges & Tags (No clipping on borders)
   ========================================================================== */
.mud-chip {
    height: auto !important;
    min-height: 28px !important;
    padding: 4px 14px !important;
    border-radius: 9999px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    margin: 3px 4px !important;
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.mud-chip .mud-chip-content {
    padding: 0 4px !important;
    overflow: visible !important;
}

.gradient-badge {
    background: linear-gradient(135deg, #2563EB 0%, #06B6D4 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    padding: 4px 12px !important;
    border-radius: 8px !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px;
    display: inline-flex !important;
    align-items: center !important;
}

.eyebrow-tag {
    color: #38BDF8;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    padding: 2px 8px;
    display: inline-block;
}

/* ==========================================================================
   Tables & Data Grid (Spacious cells, generous edge padding)
   ========================================================================== */
.mud-table-container {
    border-radius: 14px !important;
    overflow-x: auto !important;
}

.mud-table-root {
    background: transparent !important;
    width: 100% !important;
}

.mud-table-head {
    background: rgba(17, 24, 39, 0.85) !important;
    backdrop-filter: blur(10px);
}

.mud-table-head .mud-table-cell {
    padding: 16px 20px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase;
    color: #94A3B8 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.mud-table-cell {
    padding: 16px 20px !important;
    vertical-align: middle !important;
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

/* Ensure first and last columns never touch the card borders */
.mud-table-cell:first-child,
.mud-table-head .mud-table-cell:first-child {
    padding-left: 28px !important;
}

.mud-table-cell:last-child,
.mud-table-head .mud-table-cell:last-child {
    padding-right: 28px !important;
}

.mud-table-row:hover {
    background: rgba(37, 99, 235, 0.08) !important;
}

/* ==========================================================================
   Buttons (Pills with generous inner space)
   ========================================================================== */
.webcore-btn-primary {
    background: #2563EB !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    min-height: 42px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 18px rgba(37, 99, 235, 0.4) !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

.webcore-btn-primary:hover {
    background: #1D4ED8 !important;
    transform: translateY(-1.5px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6) !important;
}

.webcore-btn-secondary {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #F8FAFC !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    min-height: 42px !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
}

.webcore-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1.5px);
}

.gradient-btn {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #06B6D4 100%) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    border: none !important;
    border-radius: 9999px !important;
    padding: 10px 24px !important;
    min-height: 42px !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35) !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.gradient-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 28px rgba(37, 99, 235, 0.55) !important;
}

.outline-neon-btn {
    border: 1px solid rgba(59, 130, 246, 0.5) !important;
    color: #60A5FA !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border-radius: 9999px !important;
    padding: 8px 20px !important;
    min-height: 38px !important;
    transition: all 0.2s ease !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.outline-neon-btn:hover {
    background: rgba(37, 99, 235, 0.2) !important;
    border-color: #3B82F6 !important;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.3) !important;
}

/* ==========================================================================
   Form Controls & Inputs (Labels & Outlines with proper clearance)
   ========================================================================== */
.mud-input-control {
    margin-bottom: 16px !important;
}

.mud-input.mud-input-outlined {
    border-radius: 12px !important;
}

.mud-input-outlined .mud-input-slot {
    padding: 12px 18px !important;
    font-size: 0.9rem !important;
}

.mud-input-label-outlined {
    padding: 0 6px !important;
}

/* ==========================================================================
   Dialogs (Wide, spacious, beautifully aligned)
   ========================================================================== */
.mud-dialog {
    border-radius: 20px !important;
    background: #0F172A !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(37, 99, 235, 0.2) !important;
}

.mud-dialog-title {
    padding: 24px 32px 16px 32px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mud-dialog-content {
    padding: 24px 32px !important;
}

.mud-dialog-actions {
    padding: 16px 32px 24px 32px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    gap: 12px !important;
}

/* ==========================================================================
   Tabs & Panels
   ========================================================================== */
.mud-tabs-tabbar {
    background: rgba(13, 19, 34, 0.75) !important;
    border-bottom: 1px solid var(--webcore-border) !important;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    padding: 8px 12px !important;
}

.mud-tab {
    padding: 12px 20px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    margin-right: 4px !important;
    transition: all 0.2s ease;
}

.mud-tab-active {
    color: #38BDF8 !important;
    background: rgba(56, 189, 248, 0.1) !important;
    font-weight: 700 !important;
}

.mud-tabs-panels {
    padding: 24px 28px !important;
}

/* ==========================================================================
   Typography & Gradients
   ========================================================================== */
.gradient-text {
    background: linear-gradient(135deg, #60A5FA 0%, #38BDF8 50%, #FFFFFF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* macOS / VSCode Code Editor Mockup Card */
.ide-window {
    background: #0D1117;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.7), 0 0 40px rgba(37, 99, 235, 0.15);
    overflow: hidden;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s ease;
}

.ide-window:hover {
    border-color: rgba(59, 130, 246, 0.35);
    box-shadow: 0 30px 70px -10px rgba(0, 0, 0, 0.8), 0 0 50px rgba(37, 99, 235, 0.25);
}

.ide-header {
    background: #161B22;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ide-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    margin-right: 7px;
    display: inline-block;
}

.ide-dot.red { background-color: #EF4444; }
.ide-dot.yellow { background-color: #F59E0B; }
.ide-dot.green { background-color: #10B981; }

.ide-tab {
    background: #0D1117;
    color: #94A3B8;
    font-size: 0.78rem;
    padding: 4px 14px;
    border-radius: 6px;
    margin-left: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 6px;
}

.ide-tab.active {
    color: #F8FAFC;
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(37, 99, 235, 0.1);
}

.ide-body {
    padding: 24px 28px;
    font-size: 0.92rem;
    line-height: 1.8;
    color: #E2E8F0;
    overflow-x: auto;
}

/* Syntax Highlighting */
.syn-kw { color: #F43F5E; font-weight: 600; }
.syn-var { color: #60A5FA; }
.syn-prop { color: #94A3B8; }
.syn-val { color: #34D399; font-weight: 600; }
.syn-str { color: #FBBF24; }
.syn-sym { color: #64748B; }

/* Status Pulse Indicators */
.pulse-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 6px;
    position: relative;
}

.pulse-dot.online {
    background-color: #10B981;
    box-shadow: 0 0 10px #10B981;
}

.pulse-dot.online::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 1px solid #10B981;
    animation: pulse-ring 2s infinite;
}

.pulse-dot.warning {
    background-color: #F59E0B;
    box-shadow: 0 0 10px #F59E0B;
}

.pulse-dot.danger {
    background-color: #EF4444;
    box-shadow: 0 0 10px #EF4444;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.8); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* Port Matrix Grid */
.port-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 12px;
    max-height: 480px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(11, 15, 25, 0.6);
    border-radius: 12px;
    border: 1px solid var(--webcore-border);
}

.port-matrix-cell {
    padding: 10px 12px;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: all 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.port-matrix-cell.free {
    background: rgba(16, 185, 129, 0.08);
    color: #34D399;
    border-color: rgba(16, 185, 129, 0.2);
}

.port-matrix-cell.free:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10B981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.3);
}

.port-matrix-cell.assigned {
    background: rgba(37, 99, 235, 0.15);
    color: #93C5FD;
    border-color: rgba(37, 99, 235, 0.35);
}

.port-matrix-cell.assigned:hover {
    background: rgba(37, 99, 235, 0.3);
    border-color: #3B82F6;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.4);
}

.port-matrix-cell.host-active {
    background: rgba(6, 182, 212, 0.15);
    color: #67E8F9;
    border-color: rgba(6, 182, 212, 0.35);
}

.port-matrix-cell.conflict {
    background: rgba(239, 68, 68, 0.2);
    color: #FCA5A5;
    border-color: rgba(239, 68, 68, 0.5);
}

/* Terminal / Log Viewer Style */
.terminal-viewer {
    background-color: #090D16 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 22px 24px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: #E2E8F0;
    line-height: 1.7;
    max-height: 480px;
    overflow-y: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0B0F19;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(37, 99, 235, 0.6);
}

/* Brand Logo Hexagon */
.webcore-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

/* ==========================================================================
   DSGVO Cookie Consent Banner & Floating Badge
   ========================================================================== */
.cookie-banner-overlay {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 980px;
    margin: auto 0;
    z-index: 99999;
    animation: cookieSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cookieSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cookie-banner-card {
    background: rgba(15, 23, 42, 0.94) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(59, 130, 246, 0.35) !important;
    border-radius: 20px !important;
    padding: 24px 28px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(37, 99, 235, 0.2) !important;
}

.cookie-floating-badge {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9990;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9999px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #94A3B8;
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cookie-floating-badge:hover {
    color: #38BDF8;
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(17, 24, 39, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 189, 248, 0.25);
}

.consent-category-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s ease;
}

.consent-category-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

