/* Global Styles */
:root {
    --primary-color: #5e17eb;
    --secondary-color: #6c757d;
    --success-color: #00e676;
    --info-color: #00b0ff;
    --warning-color: #ffab00;
    --danger-color: #ff1744;
    --light-color: #f8f9fa;
    --dark-color: #0a0a1a;
    --futuristic-glow: 0 0 10px rgba(94, 23, 235, 0.5);
    --futuristic-gradient: linear-gradient(135deg, #5e17eb, #00b0ff);
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #212529;
    line-height: 1.6;
    background-color: #f8f9fa;
    background-image: radial-gradient(circle at top right, rgba(94, 23, 235, 0.05), transparent 70%),
                      radial-gradient(circle at bottom left, rgba(0, 176, 255, 0.05), transparent 70%);
    background-attachment: fixed;
}

/* Futuristic Card Styles */
.card {
    background-color: #ffffff;
    border: 1px solid rgba(94, 23, 235, 0.2);
    border-radius: 12px;
    box-shadow: var(--futuristic-glow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 0 20px rgba(94, 23, 235, 0.7);
    transform: translateY(-5px);
}

.card-header {
    background-color: rgba(94, 23, 235, 0.1);
    border-bottom: 1px solid rgba(94, 23, 235, 0.2);
    color: #212529;
}

.card-body {
    color: #212529;
}

/* Dark themed cards for visualization page */
.visualization-page .card {
    background-color: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(10px);
}

.visualization-page .card-header {
    background-color: rgba(30, 30, 60, 0.9);
    color: #fff;
}

.visualization-page .card-body {
    color: #e0e0e0;
}

/* Futuristic Button Styles */
.btn-primary {
    background: var(--futuristic-gradient);
    border: none;
    box-shadow: var(--futuristic-glow);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(94, 23, 235, 0.8);
    background: linear-gradient(135deg, #7028ff, #00c3ff);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    box-shadow: none;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--futuristic-gradient);
    border-color: transparent;
    box-shadow: var(--futuristic-glow);
}

/* Hero Section */
.hero-section {
    background: #0a0a1a;
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* Globe Styling */
.globe-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.globe {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    z-index: 3;
    opacity: 0.9;
}

.globe::before,
.globe::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid rgba(0, 176, 255, 0.2);
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    animation: pulse-ring 3s linear infinite;
}

.globe::after {
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    border: 1px solid rgba(0, 176, 255, 0.1);
    animation-delay: 1.5s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.globe-sphere {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #00b0ff;
    box-shadow: 0 0 60px rgba(0, 176, 255, 0.8);
    opacity: 1;
}

.globe-outer-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: -20px -20px 60px rgba(0, 0, 0, 0.4) inset;
    opacity: 0.7;
}

.globe-inner-shadow {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 20px 20px 60px rgba(0, 0, 0, 0.5) inset;
    opacity: 0.7;
}

.globe-worldmap {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: url('https://upload.wikimedia.org/wikipedia/commons/c/c3/Africa_map.svg') no-repeat center center;
    background-size: 60%;
    background-position: 50% 50%;
    opacity: 0.2;
}

.globe-overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 10px rgba(0, 176, 255, 0.8);
    letter-spacing: 2px;
    z-index: 5;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
    animation: text-glow 3s ease-in-out infinite alternate;
}

@keyframes text-glow {
    0% {
        text-shadow: 0 0 10px rgba(0, 176, 255, 0.8);
        opacity: 0.8;
    }
    100% {
        text-shadow: 0 0 20px rgba(0, 176, 255, 1), 0 0 30px rgba(94, 23, 235, 0.5);
        opacity: 1;
    }
}

.globe-glow {
    position: absolute;
    width: 160%;
    height: 160%;
    top: -30%;
    left: -30%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(0, 176, 255, 0.6), transparent 70%);
    z-index: -1;
    filter: blur(30px);
    animation: pulse-glow 4s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
    0% {
        opacity: 0.6;
        filter: blur(30px);
    }
    100% {
        opacity: 0.8;
        filter: blur(40px);
    }
}

@keyframes globe-rotate {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Connection Lines */
.globe-connections {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 4;
}

.connection-point {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 5px rgba(0, 176, 255, 0.8);
    animation: pulse-point 3s infinite alternate;
}

.connection-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, rgba(0, 176, 255, 0.3), rgba(0, 176, 255, 0.1));
    transform-origin: left center;
    animation: pulse-line 3s infinite alternate;
}

.point1 {
    top: 45%;
    left: 45%;
    animation-delay: 0s;
}

.point2 {
    top: 55%;
    left: 55%;
    animation-delay: 0.5s;
}

.point3 {
    top: 40%;
    left: 60%;
    animation-delay: 1s;
}

.point4 {
    top: 60%;
    left: 40%;
    animation-delay: 1.5s;
}

.line1 {
    top: 45%;
    left: 45%;
    width: 10%;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.line2 {
    top: 55%;
    left: 55%;
    width: 8%;
    transform: rotate(-30deg);
    animation-delay: 0.5s;
}

.line3 {
    top: 40%;
    left: 60%;
    width: 10%;
    transform: rotate(20deg);
    animation-delay: 1s;
}

@keyframes pulse-point {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes pulse-line {
    0% {
        opacity: 0.2;
    }
    100% {
        opacity: 0.4;
    }
}

@media (max-width: 1200px) {
    .globe {
        right: 5%;
        width: 350px;
        height: 350px;
    }

    .globe-overlay-text {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .globe {
        right: 0;
        width: 300px;
        height: 300px;
    }

    .hero-content {
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .globe {
        right: -20%;
        width: 250px;
        height: 250px;
        opacity: 0.7;
    }

    .hero-section {
        min-height: 500px;
    }

    .hero-content {
        text-align: center !important;
    }

    .globe-overlay-text {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .globe {
        right: -30%;
        width: 200px;
        height: 200px;
        opacity: 0.5;
    }

    .globe-overlay-text {
        font-size: 1.2rem;
    }
}

/* Navbar Styling */
.navbar-dark {
    background: linear-gradient(90deg, rgba(10, 10, 26, 0.95), rgba(30, 30, 60, 0.95)) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(94, 23, 235, 0.2);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 2px;
    position: relative;
    padding-left: 15px;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--futuristic-gradient);
    border-radius: 5px;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--futuristic-gradient);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Map Preview */
.map-preview {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.overlay-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.map-preview:hover .overlay-text {
    opacity: 1;
}

/* Preview Map Specific Styles */
#preview-map {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.map-preview:hover #preview-map {
    transform: scale(1.02);
}

/* Feature Cards */
.feature-card {
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Step Cards */
.step-card {
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* CTA Section */
.cta-section {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Footer */
footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--info-color) !important;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: background-color 0.3s ease;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Map Styles */
#map {
    height: 600px;
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    #map {
        height: 400px;
    }
}

/* Visualization Page Specific Styles */
.map-controls {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.filter-group {
    margin-bottom: 15px;
}

.legend {
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Full height map styles */
#visualization-map {
    height: 75vh;
    min-height: 550px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(94, 23, 235, 0.5);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.full-height-map {
    transition: height 0.3s ease;
}

/* Map overlay for futuristic effect */
#visualization-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(10, 10, 26, 0.3));
    z-index: 10;
}

/* Grid overlay for futuristic effect */
#visualization-map::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(94, 23, 235, 0.1) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(94, 23, 235, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
}

/* Glow effect for markers */
.glow-marker {
    box-shadow: 0 0 15px var(--info-color);
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 10px var(--info-color);
    }
    100% {
        box-shadow: 0 0 20px var(--primary-color);
    }
}

/* Connection lines */
.connection-line {
    stroke: var(--info-color);
    stroke-width: 1.5;
    stroke-dasharray: 5;
    stroke-opacity: 0.7;
    animation: dash-animation 30s linear infinite;
    transition: stroke-width 0.3s ease, stroke-opacity 0.3s ease, filter 0.3s ease;
}

.connection-line.highlighted {
    stroke-width: 3;
    stroke-opacity: 0.9;
    filter: drop-shadow(0 0 5px var(--info-color));
    z-index: 1000;
}

@keyframes dash-animation {
    to {
        stroke-dashoffset: 1000;
    }
}

/* Table toggle button */
.card-header button[data-bs-toggle="collapse"] {
    transition: all 0.3s ease;
}

.card-header button[data-bs-toggle="collapse"] i {
    transition: transform 0.3s ease;
}

.card-header button[data-bs-toggle="collapse"][aria-expanded="true"] i {
    transform: rotate(180deg);
}

/* Report Table Styles */
.report-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.report-row:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Report Popup Styles */
.report-popup {
    min-width: 200px;
}

.report-popup h6 {
    margin-bottom: 8px;
    font-weight: 600;
}

.report-popup p {
    margin-bottom: 8px;
}

/* Report Form Styles */
.form-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 30px;
}

.location-preview {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Pulse Animation for Map Points */
@keyframes pulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.pulse-marker::after {
    content: '';
    border-radius: 50%;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    z-index: -1;
    animation: pulse 2s infinite;
}
