/* EVE D-Scan Tool - Custom Styles */

/* CSS Variables for theming */
:root {
    --eve-primary: #00d4ff;
    --eve-secondary: #ff6b00;
    --eve-dark: #0a0e14;
    --eve-darker: #050709;
    --threat-critical: #dc3545;
    --threat-high: #fd7e14;
    --threat-medium: #ffc107;
    --threat-low: #20c997;
    --threat-none: #6c757d;
    --bs-body-bg: #1a1d24;
    --bs-card-bg: #21262d;
    --navbar-bg: #161b22;
    --input-bg: #262c36;
}

/* Global styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--eve-primary) !important;
}

/* Cards */
.card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.25rem;
}

/* D-Scan Input */
.dscan-input {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875rem;
    resize: none;
    background-color: var(--input-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dscan-input:focus {
    background-color: var(--input-bg);
    border-color: var(--eve-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.25);
}

/* Stat Cards */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
    margin-top: 0.25rem;
}

/* Threat level colors */
.threat-critical {
    border-left: 4px solid var(--threat-critical) !important;
}

.threat-critical .stat-value {
    color: var(--threat-critical);
}

.threat-high {
    border-left: 4px solid var(--threat-high) !important;
}

.threat-high .stat-value {
    color: var(--threat-high);
}

.threat-medium {
    border-left: 4px solid var(--threat-medium) !important;
}

.threat-medium .stat-value {
    color: var(--threat-medium);
}

.threat-low {
    border-left: 4px solid var(--threat-low) !important;
}

.threat-low .stat-value {
    color: var(--threat-low);
}

.threat-none {
    border-left: 4px solid var(--threat-none) !important;
}

/* Results Container */
.results-container {
    max-height: 500px;
    overflow-y: auto;
}

.results-container::-webkit-scrollbar {
    width: 8px;
}

.results-container::-webkit-scrollbar-track {
    background: transparent;
}

.results-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Ship Category */
.ship-category {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ship-category:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    cursor: pointer;
    user-select: none;
}

.category-header:hover {
    opacity: 0.8;
}

.category-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.category-count {
    background: rgba(0, 212, 255, 0.2);
    color: var(--eve-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.ship-list {
    padding-left: 1rem;
}

.ship-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

.ship-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.ship-name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ship-count {
    font-weight: 600;
    opacity: 0.7;
}

.threat-badge {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.threat-badge.critical {
    background-color: var(--threat-critical);
    box-shadow: 0 0 6px var(--threat-critical);
}

.threat-badge.high {
    background-color: var(--threat-high);
    box-shadow: 0 0 6px var(--threat-high);
}

.threat-badge.medium {
    background-color: var(--threat-medium);
}

.threat-badge.low {
    background-color: var(--threat-low);
}

.threat-badge.none {
    background-color: var(--threat-none);
}

/* Faction colors */
.faction-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.faction-gallente {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

.faction-caldari {
    background-color: rgba(0, 123, 255, 0.2);
    color: #007bff;
}

.faction-amarr {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.faction-minmatar {
    background-color: rgba(220, 53, 69, 0.2);
    color: #dc3545;
}

.faction-ore {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

/* Faction breakdown */
.faction-bar {
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    min-width: 40px;
}

/* Footer */
.footer {
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn-primary {
    background-color: var(--eve-primary);
    border-color: var(--eve-primary);
    color: #000;
}

.btn-primary:hover {
    background-color: #00b8e6;
    border-color: #00b8e6;
    color: #000;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* Collapse animation */
.ship-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.ship-list.show {
    max-height: 1000px;
}

/* Pilot item for local scan */
.pilot-item {
    transition: background-color 0.2s ease;
}

.pilot-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.pilot-link {
    color: var(--eve-primary);
}

.pilot-link:hover {
    text-decoration: underline !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stat-value {
        font-size: 1.5rem;
    }
    
    .results-container {
        max-height: 400px;
    }
}
