/* Global Styles */
:root {
    --primary-gradient: linear-gradient(45deg, #4f46e5, #6366f1);
    --glow-color: rgba(99, 102, 241, 0.5);
    --card-bg: rgba(33, 37, 41, 0.9);
    --card-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #121212;
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism card styles */
.card.glassmorphism {
    backdrop-filter: blur(10px);
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Hover animations */
.hover-scale {
    transition: transform 0.3s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-translate {
    transition: transform 0.3s ease-in-out;
}

.hover-translate:hover {
    transform: translateY(-10px);
}

/* Glowing elements */
.glow {
    box-shadow: 0 0 15px var(--glow-color);
}

.glow:hover {
    box-shadow: 0 0 25px var(--glow-color);
}

/* 3D effects */
.card.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card.card-3d:hover .card-body {
    transform: translateZ(20px);
}

.card.card-3d .card-body {
    transition: transform 0.3s ease-in-out;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: var(--primary-gradient);
}

/* Custom Utilities */
.min-vh-80 {
    min-height: 80vh;
}

.rounded-4 {
    border-radius: 1rem;
}

/* Form styling */
.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .display-2 {
        font-size: calc(1.575rem + 3.9vw);
    }
    
    .display-4 {
        font-size: calc(1.425rem + 2.1vw);
    }
    
    .lead {
        font-size: 1.1rem;
    }
}

/* Skip navigation for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--bs-primary);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Dark mode optimizations */
[data-bs-theme=dark] .form-control {
    background-color: rgba(33, 37, 41, 0.8);
}

[data-bs-theme=dark] .form-control:focus {
    background-color: rgba(33, 37, 41, 0.9);
}

/* Footer styling */
.footer {
    background-color: rgba(33, 37, 41, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Interactive CLI terminal styles */
.cli-simulation {
    background-color: rgba(17, 17, 23, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 20px var(--glow-color);
}

.cli-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cli-title {
    font-family: monospace;
    color: #6366f1;
    font-size: 14px;
    font-weight: bold;
}

.cli-body {
    padding: 15px;
    font-family: monospace;
    height: 300px;
    overflow-y: auto;
    color: #d1d5db;
}

.cli-prompt {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.cli-prompt-symbol {
    color: #6366f1;
    margin-right: 8px;
    font-weight: bold;
}

.cli-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: monospace;
    font-size: 14px;
    width: 100%;
    outline: none;
    animation: cursor-blink 1s infinite;
}

.cli-input:focus {
    box-shadow: none;
    border: none;
    background: transparent;
}

.cli-command {
    margin-bottom: 5px;
    display: flex;
}

.cli-output {
    padding-left: 20px;
    color: #a3a3a3;
    margin-bottom: 15px;
}

.cli-output.scanning {
    color: #6366f1;
}

.cli-output.alert {
    color: #ef4444;
    font-weight: bold;
}

.cli-commands-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.cli-command-pill {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cli-command-pill:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.hacker-glow {
    text-shadow: 0 0 5px rgba(99, 102, 241, 0.7);
}

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

/* Mindmap visualization */
.mindmap-container {
    height: 400px;
    position: relative;
    overflow: hidden;
}

.node {
    stroke: #6366f1;
    stroke-width: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.node:hover {
    stroke-width: 4px;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.8));
}

.node-label {
    font-size: 12px;
    fill: #fff;
    text-anchor: middle;
    pointer-events: none;
}

.link {
    stroke: rgba(99, 102, 241, 0.5);
    stroke-width: 1.5px;
}

/* Roadmap section */
.roadmap-container {
    position: relative;
    padding: 30px 0;
}

.roadmap-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.2), rgba(99, 102, 241, 0.8));
    transform: translateX(-50%);
}

.roadmap-item {
    position: relative;
    margin-bottom: 50px;
    z-index: 1;
}

.roadmap-marker {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6366f1;
    left: 50%;
    top: 15px;
    transform: translateX(-50%);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.7);
}

.roadmap-content {
    width: 45%;
    padding: 20px;
    border-radius: 10px;
    background: rgba(33, 37, 41, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.roadmap-date {
    color: #6366f1;
    font-weight: bold;
    margin-bottom: 5px;
}

.roadmap-item:nth-child(even) .roadmap-content {
    margin-left: auto;
}

/* Leaderboard section */
.leaderboard-card {
    background: rgba(33, 37, 41, 0.7);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.leaderboard-card:hover {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
    transform: translateY(-5px);
}

.leaderboard-rank {
    font-size: 24px;
    font-weight: bold;
    color: #6366f1;
}

.leaderboard-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #6366f1;
}

.leaderboard-name {
    font-weight: bold;
    color: #fff;
}

.leaderboard-stats {
    font-size: 14px;
    color: #a3a3a3;
}

/* World map visualization */
.world-map-container {
    height: 500px;
    position: relative;
}

.world-map-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(17, 17, 23, 0.8);
    padding: 15px;
    border-radius: 10px;
    z-index: 10;
}

.threat-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    transform: translate(-50%, -50%);
    z-index: 5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    70% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* Easter egg hacker mode */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #111;
    z-index: 9999;
    display: none;
    color: #0f0;
    font-family: monospace;
    overflow: hidden;
}

.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.matrix-column {
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: matrix-rain 2s linear infinite;
}

.matrix-char {
    color: #0f0;
    font-size: 14px;
    text-align: center;
    text-shadow: 0 0 5px #00ff00;
}

.matrix-char.bright {
    color: #fff;
    text-shadow: 0 0 10px #00ff00;
}

.matrix-content {
    color: #0f0;
    z-index: 10;
    text-shadow: 0 0 5px #00ff00;
}

.matrix-terminal {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #0f0;
    border-radius: 5px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.matrix-prompt {
    display: flex;
}

.matrix-cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: #0f0;
    margin-left: 4px;
    animation: blink 1s infinite;
}

@keyframes matrix-rain {
    0% { 
        transform: translateY(0);
    }
    100% { 
        transform: translateY(30px);
    }
}

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