/* MYRKUR - Enhanced Cyber Attack Visualizer Styles */

/* Basic Reset & Body Styling */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Courier New', Courier, monospace;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: linear-gradient(135deg, #050505 0%, #0a0a0a 50%, #050505 100%);
    color: #00e600;
}

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

::-webkit-scrollbar-track {
    background: #000000;
    border: 1px solid #002200;
}

::-webkit-scrollbar-thumb {
    background: #003300;
    border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
    background: #004400;
}

/* Header Styles */
#app-header {
    background: linear-gradient(90deg, #000000 0%, #0a0f0a 50%, #000000 100%);
    color: #00ff00;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 1002;
    box-sizing: border-box;
    box-shadow: 0 2px 10px rgba(0,255,0,0.15);
    border-bottom: 1px solid #002200;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.project-info {
    display: flex;
    align-items: baseline;
}

.project-title {
    font-size: 1.6em;
    margin: 0;
    color: #00ff00;
    font-weight: normal;
    letter-spacing: 3px;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00aa00;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.project-author {
    font-size: 0.75em;
    margin: 0 0 0 15px;
    color: #00b300;
    opacity: 0.8;
}

.header-links a.header-button {
    color: #000000;
    background: linear-gradient(135deg, #00cc00, #00aa00);
    padding: 6px 14px;
    text-decoration: none;
    border-radius: 2px;
    margin-left: 8px;
    font-size: 0.85em;
    transition: all 0.3s ease;
    border: 1px solid #007700;
    position: relative;
    overflow: hidden;
}

.header-links a.header-button:hover {
    background: linear-gradient(135deg, #007700, #005500);
    color: #00ff00;
    box-shadow: 0 0 15px #00cc00, inset 0 0 5px rgba(0,255,0,0.3);
    transform: translateY(-1px);
}

/* App Container */
.app-container {
    display: flex;
    height: calc(100vh - 50px - 150px);
    width: 100%;
    margin-top: 50px;
    box-sizing: border-box;
    overflow: hidden;
}

/* Map Container */
#map-container {
    flex-grow: 1;
    height: 100%;
    border-right: 1px solid #002200;
    background-color: #000000;
    position: relative;
}

/* Map styling enhancements */
.leaflet-container {
    background: #000000;
}

.attack-line {
    animation: attack-pulse 1s ease-out;
}

@keyframes attack-pulse {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Attack List Container */
#attack-list-container {
    width: 350px;
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, #000000 0%, #050505 100%);
    color: #00e600;
    padding: 15px;
    box-sizing: border-box;
    box-shadow: -2px 0 10px rgba(0,255,0,0.1);
    border-left: 1px solid #002200;
}

#attack-list-container h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #003300;
    font-size: 1.3em;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    font-weight: normal;
    letter-spacing: 1px;
}

#attack-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.attack-item-placeholder {
    padding: 10px;
    font-style: italic;
    color: #009900;
    text-align: center;
}

/* Enhanced Attack Item Styling */
.attack-item {
    padding: 10px;
    border-bottom: 1px solid #002200;
    font-size: 0.85em;
    line-height: 1.4;
    background: linear-gradient(90deg, rgba(0,17,0,0.3) 0%, transparent 100%);
    margin-bottom: 6px;
    border-radius: 2px;
    transition: all 0.2s ease;
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.attack-item:hover {
    background: linear-gradient(90deg, rgba(0,34,0,0.5) 0%, rgba(0,17,0,0.2) 100%);
    transform: translateX(2px);
}

.attack-item.blocked-attack {
    opacity: 0.7;
    background: linear-gradient(90deg, rgba(0,17,0,0.2) 0%, transparent 100%);
}

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

.attack-header strong {
    color: #33ff33;
    font-size: 1.05em;
}

.attack-status {
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 2px;
    font-weight: bold;
}

.attack-status.blocked {
    background: rgba(0,100,0,0.3);
    color: #00aa00;
    border: 1px solid #005500;
}

.attack-status.active {
    background: rgba(100,0,0,0.3);
    color: #ff9900;
    border: 1px solid #aa5500;
}

.attack-details {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 4px 0;
}

.severity-badge {
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.75em;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
}

.attack-target {
    color: #00cc00;
    flex: 1;
}

.attack-meta {
    display: block;
    color: #009900;
    margin-top: 4px;
    font-family: monospace;
}

.attack-time {
    display: block;
    color: #007700;
    margin-top: 2px;
    font-size: 0.8em;
}

/* Overview Section */
#overview-section {
    background: linear-gradient(180deg, #0a0a0a 0%, #000000 100%);
    color: #00e600;
    padding: 10px 20px;
    box-shadow: 0 -2px 10px rgba(0,255,0,0.2);
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 1001;
    height: 150px;
    border-top: 2px solid #002200;
}

#overview-section h3 {
    margin: 0 0 10px 0;
    text-align: center;
    font-size: 1.1em;
    color: #00ff00;
    border-bottom: 1px solid #003300;
    padding-bottom: 5px;
    text-shadow: 0 0 5px #00ff00;
    font-weight: normal;
    letter-spacing: 2px;
}

.overview-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    height: calc(100% - 35px);
}

/* Attack Type Circles */
#attack-type-counts {
    flex-basis: 55%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    padding: 0;
    overflow-y: auto;
    max-height: 100%;
    gap: 5px;
}

.attack-circle {
    width: 85px;
    height: 85px;
    margin: 2px;
    padding: 5px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #002200, #000000);
    border: 2px solid #004400;
    color: #00e600;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.attack-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent, rgba(0,255,0,0.1));
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.attack-circle:hover {
    transform: scale(1.05);
    border-color: #00ff00;
    box-shadow: 0 0 20px #00bb00, inset 0 0 10px rgba(0,255,0,0.2);
}

.attack-circle h5.circle-attack-name {
    font-size: 0.65em;
    margin: 0 0 3px 0;
    color: #33ff33;
    font-weight: normal;
    z-index: 1;
}

.attack-circle p.circle-attack-count {
    font-size: 1.1em;
    margin: 0 0 2px 0;
    color: #00ff00;
    font-weight: bold;
    z-index: 1;
}

.attack-circle p.circle-last-attack-time {
    font-size: 0.55em;
    margin: 0;
    color: #00cc00;
    z-index: 1;
}

/* Country Attack Stats */
#country-attack-stats {
    flex-basis: 25%;
    padding: 0 10px;
    box-sizing: border-box;
    max-height: 100%;
    overflow-y: auto;
}

#country-attack-stats h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #00ff00;
    text-align: center;
    padding-bottom: 5px;
    border-bottom: 1px solid #003300;
    font-weight: normal;
}

.country-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 0.75em;
    border-bottom: 1px dashed #001100;
    transition: all 0.2s ease;
}

.country-stat-item:hover {
    background: rgba(0,255,0,0.05);
    padding-left: 5px;
}

.country-stat-item:last-child {
    border-bottom: none;
}

.country-name {
    color: #33ff33;
    margin-right: 5px;
}

.country-count {
    font-weight: bold;
    color: #00ff00;
}

/* System Status */
#last-attack-info {
    flex-basis: 20%;
    text-align: right;
    padding: 0 10px;
    box-sizing: border-box;
    max-height: 100%;
}

#last-attack-info h4 {
    margin: 0 0 8px 0;
    font-size: 0.9em;
    color: #00ff00;
    font-weight: normal;
}

#last-attack-info p {
    margin: 5px 0;
    font-size: 0.8em;
    color: #00cc00;
}

#time-since-last-attack {
    font-weight: bold;
    color: #00ff00;
    font-size: 1.1em;
}

/* Map Title Overlay */
#map-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0,0,0,0.9), rgba(0,20,0,0.8));
    color: #00ff00;
    padding: 8px 20px;
    border-radius: 2px;
    font-size: 1.4em;
    font-weight: normal;
    z-index: 1000;
    pointer-events: none;
    text-shadow: 0 0 10px #00ff00, 0 0 20px #00aa00;
    border: 1px solid #003300;
    letter-spacing: 2px;
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { box-shadow: 0 0 10px rgba(0,255,0,0.5); }
    50% { box-shadow: 0 0 20px rgba(0,255,0,0.8), inset 0 0 10px rgba(0,255,0,0.2); }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,10,0,0.95), rgba(0,0,0,0.98));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: linear-gradient(135deg, #000000, #0a0f0a);
    color: #00e600;
    padding: 25px 30px;
    border-radius: 4px;
    width: 90%;
    max-width: 500px;
    text-align: left;
    position: relative;
    box-shadow: 0 0 30px rgba(0,255,0,0.3), inset 0 0 20px rgba(0,255,0,0.05);
    transform: scale(0.9) rotateX(10deg);
    transition: all 0.3s ease;
    border: 2px solid #003300;
}

.modal-overlay.visible .modal-content {
    transform: scale(1) rotateX(0);
}

.modal-content h2 {
    margin-top: 0;
    color: #00ff00;
    margin-bottom: 15px;
    border-bottom: 2px solid #003300;
    padding-bottom: 10px;
    text-shadow: 0 0 10px #00ff00;
    font-weight: normal;
    font-size: 1.4em;
    letter-spacing: 2px;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95em;
    color: #00cc00;
}

.modal-close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    color: #009900;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
}

.modal-close-button:hover {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    transform: rotate(90deg);
}

/* Modal Disclaimer Footer */
.disclaimer-footer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #003300;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #00cc00;
    cursor: pointer;
    font-size: 0.9em;
}

.checkbox-container input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.modal-button {
    background: linear-gradient(135deg, #00cc00, #00aa00);
    color: #000000;
    border: 1px solid #007700;
    padding: 8px 20px;
    border-radius: 2px;
    font-size: 0.95em;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-button:hover {
    background: linear-gradient(135deg, #00ff00, #00cc00);
    box-shadow: 0 0 15px #00ff00;
    transform: scale(1.05);
}

/* Additional UI Elements */
.status-indicator {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    padding: 4px 10px;
    background: rgba(0,50,0,0.3);
    border: 1px solid #003300;
    border-radius: 2px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse 2s infinite;
}

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

.status-text {
    font-size: 0.8em;
    color: #00ff00;
    letter-spacing: 1px;
}

/* Feed Controls */
.feed-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.feed-controls {
    display: flex;
    gap: 8px;
}

.feed-btn {
    background: #002200;
    color: #00ff00;
    border: 1px solid #003300;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 2px;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.feed-btn:hover {
    background: #003300;
    box-shadow: 0 0 5px #00ff00;
}

#feed-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.feed-filter {
    flex: 1;
    background: #001100;
    color: #00ff00;
    border: 1px solid #003300;
    padding: 4px;
    border-radius: 2px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8em;
}

/* Map Controls */
#map-controls {
    position: absolute;
    top: 60px;
    right: 20px;
    z-index: 500;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.map-control-btn {
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.8);
    color: #00ff00;
    border: 1px solid #003300;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.map-control-btn:hover {
    background: #003300;
    box-shadow: 0 0 10px #00ff00;
}

/* Live Counter */
#live-counter {
    position: absolute;
    top: 60px;
    left: 20px;
    z-index: 500;
    background: rgba(0,0,0,0.8);
    border: 1px solid #003300;
    padding: 8px 12px;
    border-radius: 2px;
}

.counter-label {
    color: #00cc00;
    font-size: 0.8em;
    margin-right: 8px;
}

.counter-value {
    color: #00ff00;
    font-size: 1.1em;
    font-weight: bold;
}

/* Loading Screen */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.loading-title {
    color: #00ff00;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 0 20px #00ff00;
    letter-spacing: 5px;
    animation: pulse-glow 2s infinite;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: #002200;
    border: 1px solid #003300;
    margin: 0 auto 20px;
}

.loading-progress {
    height: 100%;
    background: #00ff00;
    animation: loading-fill 1s ease-out forwards;
}

@keyframes loading-fill {
    from { width: 0; }
    to { width: 100%; }
}

.loading-text {
    color: #00cc00;
    font-size: 0.9em;
    animation: blink 1s infinite;
}

/* Stats Modal Content */
.stats-content {
    max-width: 800px;
    width: 90%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(0,20,0,0.3);
    border: 1px solid #003300;
    padding: 15px;
    border-radius: 2px;
}

.stat-card h3 {
    margin: 0 0 15px 0;
    color: #00ff00;
    font-size: 1em;
    border-bottom: 1px solid #003300;
    padding-bottom: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px dashed #002200;
    color: #00cc00;
    font-size: 0.9em;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-value {
    color: #00ff00;
    font-weight: bold;
}

.stat-bar {
    flex: 1;
    height: 8px;
    background: #001100;
    border: 1px solid #003300;
    margin: 0 10px;
    position: relative;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00aa00, #00ff00);
    transition: width 0.5s ease;
}

#timeline-chart {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Help Tooltip */
.help-tooltip {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    border: 2px solid #003300;
    padding: 20px;
    border-radius: 4px;
    z-index: 2500;
    color: #00ff00;
}

.help-tooltip h4 {
    margin-top: 0;
    color: #00ff00;
    border-bottom: 1px solid #003300;
    padding-bottom: 10px;
}

.help-tooltip ul {
    list-style: none;
    padding: 0;
}

.help-tooltip li {
    margin: 8px 0;
    color: #00cc00;
}

.help-tooltip kbd {
    background: #002200;
    border: 1px solid #003300;
    padding: 2px 6px;
    border-radius: 2px;
    color: #00ff00;
    font-family: monospace;
}
#disclaimer-button {
    background: linear-gradient(135deg, #005500, #003300);
    color: #00e600;
    border-color: #002200;
}

#disclaimer-button:hover {
    background: linear-gradient(135deg, #003300, #001100);
    color: #00ff00;
    border-color: #00aa00;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1200px) {
    #attack-list-container {
        width: 300px;
    }
    
    .attack-circle {
        width: 75px;
        height: 75px;
    }
    
    .attack-circle h5.circle-attack-name {
        font-size: 0.55em;
    }
}

/* Animation for live data feeling */
@keyframes data-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.attack-item:first-child {
    animation: data-pulse 1s ease-in-out;
}

/* Loading animation */
@keyframes loading {
    0% { content: "Monitoring."; }
    33% { content: "Monitoring.."; }
    66% { content: "Monitoring..."; }
    100% { content: "Monitoring."; }
}
