:root {
    /* Color Palette */
    --bg-dark: #0b0d10;
    --bg-card: rgba(20, 24, 30, 0.6);
    --bg-terminal: #07090b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(0, 229, 255, 0.25);
    
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary: #d500f9;
    --secondary-glow: rgba(213, 0, 249, 0.4);
    
    --text-main: #e2e8f0;
    --text-muted: #8a99ad;
    --text-warning: #ffd600;
    --text-danger: #ff1744;
    --text-success: #00e676;
    
    --font-header: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Cyber Grid & Orbs */
.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -2;
    pointer-events: none;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    opacity: 0.45;
    pointer-events: none;
}

.orb-1 {
    top: 15%;
    left: 20%;
    width: 350px;
    height: 350px;
    background: var(--primary-glow);
}

.orb-2 {
    bottom: 15%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: var(--secondary-glow);
}

/* App Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Navigation */
.sidebar {
    width: 300px;
    min-width: 300px;
    flex-shrink: 0;
    background: rgba(10, 12, 16, 0.85);
    border-right: 1px solid var(--border-color);
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 50px;
}

.logo-icon {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text {
    font-family: var(--font-header);
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 1px;
}

.logo-text small {
    font-weight: 400;
    font-size: 11px;
    color: var(--text-muted);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 15px;
    text-align: left;
    padding: 16px 20px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
    color: var(--primary);
    background: rgba(0, 229, 255, 0.06);
    border-color: var(--border-highlight);
    box-shadow: 0 4px 20px rgba(0, 229, 255, 0.1);
}

.btn-num {
    font-size: 12px;
    opacity: 0.6;
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    text-decoration: none;
    margin-top: 8px;
    font-weight: 600;
    transition: color 0.2s;
}

.github-link:hover {
    color: var(--text-main);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    padding: 60px;
    overflow-y: auto;
    max-width: 1200px;
    margin: 0 auto;
}

/* Slide structures */
.slide {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.slide.active {
    display: block;
}

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

/* Hero Section */
.hero {
    margin-bottom: 40px;
}

.badge {
    background: rgba(0, 229, 255, 0.1);
    color: var(--primary);
    border: 1px solid var(--border-highlight);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 16px;
}

h1 {
    font-family: var(--font-header);
    font-size: 44px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff, #8892b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 800px;
}

.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-family: var(--font-header);
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* Grid Layouts */
.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.glass-card h3 {
    font-family: var(--font-header);
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.card-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Lists and Details inside cards */
.icon-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.icon-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.item-icon {
    font-size: 24px;
    line-height: 1;
}

.icon-item strong {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 4px;
}

.icon-item p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.4;
}

/* Terminal Styling */
.terminal-card {
    background: var(--bg-terminal);
    border-color: var(--border-color);
    padding: 0;
    overflow: hidden;
}

.terminal-header {
    background: #11151c;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.terminal-title {
    font-family: monospace;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.terminal-body {
    padding: 24px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
}

.t-comment { color: #5c6370; }
.t-cmd { color: var(--primary); }
.t-output { color: #abb2bf; }
.t-output-highlight {
    color: var(--text-success);
    background: rgba(0, 230, 118, 0.05);
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--text-success);
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-wrapper {
    display: flex;
    gap: 12px;
}

#pwd-input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 12px;
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

#pwd-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.15);
}

/* Button Styles */
.btn-primary, .btn-secondary {
    font-family: var(--font-header);
    font-weight: 600;
    font-size: 14px;
    padding: 14px 24px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(213, 0, 249, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(213, 0, 249, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Metrics Dashboard Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.metric-box.highlight {
    border-color: var(--border-highlight);
    background: rgba(0, 229, 255, 0.02);
}

.metric-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-val {
    font-family: var(--font-header);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.metric-box.highlight .metric-val {
    color: var(--primary);
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Entropy Progress Bar */
.entropy-bar-container {
    margin-top: 10px;
}

.entropy-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

#entropy-desc {
    font-weight: 600;
}

.progress-bar-bg {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Crack Time Displays */
.time-estimate-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.time-icon {
    font-size: 24px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    align-items: center;
    justify-content: center;
}

.time-details {
    flex-grow: 1;
}

.time-details strong {
    display: block;
    font-size: 14px;
    color: #fff;
    margin-bottom: 2px;
}

.time-desc {
    font-size: 11px;
    color: var(--text-muted);
}

.time-val {
    font-family: var(--font-header);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-success);
}

.fast-hash .time-val { color: var(--text-danger); }
.slow-hash .time-val { color: var(--text-warning); }

/* Comparison Widget */
.comparison-widget {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comparison-widget h4 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 16px;
}

.comp-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comp-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.comp-label {
    font-size: 13px;
    color: var(--text-muted);
}

.comp-label strong {
    color: #fff;
}

.comp-bar-bg {
    height: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.comp-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
}

.comp-bar-fill.val-short {
    background: linear-gradient(90deg, var(--text-danger), var(--secondary));
}

.comp-bar-fill.val-long {
    background: linear-gradient(90deg, var(--primary), var(--text-success));
}

.comp-time {
    font-size: 11px;
    color: var(--text-muted);
    align-self: flex-end;
}

/* Credential Stuffing Simulator Diagram */
.simulator-container {
    padding: 40px;
}

.sim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.attack-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.flow-node {
    background: rgba(20, 24, 30, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    width: 320px;
    text-align: center;
    transition: all 0.5s ease;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.flow-node.active {
    border-color: var(--secondary);
    box-shadow: 0 0 20px rgba(213, 0, 249, 0.25);
    transform: scale(1.03);
}

.flow-node.compromised {
    border-color: var(--text-danger);
    box-shadow: 0 0 25px rgba(255, 23, 68, 0.35);
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.node-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.flow-node h4 {
    font-family: var(--font-header);
    color: #fff;
    margin-bottom: 6px;
}

.node-site {
    font-size: 11px;
    color: var(--text-muted);
    font-family: monospace;
    margin-bottom: 10px;
}

.node-status {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.node-details {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Connectors */
.flow-connector {
    height: 40px;
    width: 2px;
    background: var(--border-color);
    position: relative;
}

.flow-connector.active .connector-line {
    height: 100%;
    width: 100%;
    background: var(--secondary);
    animation: flowDown 1.5s infinite linear;
}

@keyframes flowDown {
    0% { transform: scaleY(0); transform-origin: top; }
    100% { transform: scaleY(1); transform-origin: top; }
}

/* Branch connector row */
.flow-branch-container {
    height: 40px;
    width: 550px;
    position: relative;
}

.branch-line {
    position: absolute;
    background: var(--border-color);
}

.branch-line.left {
    height: 2px;
    width: 50%;
    left: 0;
    top: 0;
}

.branch-line.center {
    height: 40px;
    width: 2px;
    left: 50%;
    top: 0;
}

.branch-line.right {
    height: 2px;
    width: 50%;
    right: 0;
    top: 0;
}

.flow-branch-container.active .branch-line {
    background: var(--text-danger);
}

.targets-row {
    display: flex;
    gap: 40px;
    margin-top: 10px;
}

.target-node {
    width: 220px;
}

/* Console logs */
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.text-left { text-align: left; }
.text-center { text-align: center; }

.console-body {
    height: 150px;
    overflow-y: auto;
    background: #040507;
    border-radius: 0 0 12px 12px;
}

/* Mitigation slides styling */
.action-card {
    text-align: center;
}

.action-icon {
    font-size: 40px;
    margin-bottom: 20px;
    display: inline-block;
    padding: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.action-card h3 {
    margin-bottom: 12px;
}

.action-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 16px;
}

.action-card ul {
    text-align: left;
    color: var(--text-muted);
    font-size: 13px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-box {
    background: linear-gradient(135deg, rgba(20, 24, 30, 0.8), rgba(0, 229, 255, 0.03));
    border-color: var(--border-highlight);
    padding: 40px;
}

.cta-box h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.cta-box p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 24px;
        position: relative;
    }
    
    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        margin-bottom: 20px;
    }
    
    .main-content {
        padding: 30px;
    }
    
    .grid-2col {
        grid-template-columns: 1fr;
    }
    
    .grid-3col {
        grid-template-columns: 1fr;
    }
}

/* HIBP Alert Container */
.hibp-alert-container {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: rgba(255, 23, 68, 0.08);
    border: 1px solid var(--text-danger);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-main);
    animation: fadeIn 0.3s ease;
}

.hibp-badge {
    background: var(--text-danger);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Glossary & Modals */
.glossary-term {
    border-bottom: 1px dashed var(--primary);
    cursor: help;
    transition: color 0.2s, border-color 0.2s;
}

.glossary-term:hover {
    color: var(--primary);
    border-bottom-color: var(--secondary);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.25s ease-out;
}

.modal-content {
    width: 480px;
    max-width: 90%;
    padding: 30px;
    position: relative;
    border-color: var(--border-highlight);
    box-shadow: 0 10px 40px rgba(0, 229, 255, 0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.modal-header h3 {
    margin-bottom: 0 !important;
    color: var(--primary) !important;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-danger);
}

.modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
}
