/* Global Styles */
:root {
    --bg-dark: #1a1a1a;
    --bg-darker: #121212;
    --bg-card: #212529;
    --primary: #00bfff;
    /* Neon Blue */
    --primary-hover: #0099cc;
    --secondary: #6c757d;
    --text-main: #f8f9fa;
    --text-muted: #adb5bd;
    --border-color: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3 {
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.highlight {
    color: var(--primary);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Navigation */
.navbar {
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-item {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary);
    background-color: rgba(0, 191, 255, 0.1);
}

/* Main Content */
.content-container {
    flex: 1;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../data/images/hero_bg.jpg');
    /* Need a bg image or fallback */
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.hero h1 {
    margin-bottom: 20px;
}

.cta-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

/* Grid Layout (Ships) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.2);
    border-color: var(--primary);
}

.card-img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #000;
    border-bottom: 1px solid var(--border-color);
}

.card-content {
    padding: 15px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--primary);
}

.card-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.card-specs {
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.spec-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 5px;
    border-radius: 3px;
}

/* Split View (Missions/Keybinds) */
.split-view {
    display: flex;
    gap: 20px;
    min-height: 600px;
}

.list-sidebar {
    width: 300px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow-y: auto;
    height: 700px;
}

.list-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.list-item:hover,
.list-item.selected {
    background-color: rgba(0, 191, 255, 0.1);
    border-left: 4px solid var(--primary);
}

.details-view {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    overflow-y: auto;
    height: 700px;
}

/* Tables (Routes/Mining) */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: var(--bg-card);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background-color: rgba(0, 191, 255, 0.1);
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.data-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Footer */
footer {
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.status {
    color: var(--success);
    font-family: 'Consolas', monospace;
}

/* Inputs */
input[type="text"],
select {
    padding: 10px;
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 4px;
}

input[type="text"]:focus {
    outline: 2px solid var(--primary);
}

.info-box.warning {
    background-color: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--warning);
    padding: 15px;
    margin-top: 20px;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    animation: fadeIn 0.3s forwards;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 12px;
    z-index: 2001;
    display: none;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(0, 191, 255, 0.3);
    animation: slideUp 0.3s forwards;
}

.modal.active,
.modal-overlay.active {
    display: block;
}

.modal-close {
    position: sticky;
    top: 15px;
    right: 20px;
    float: right;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--primary);
    color: #000;
}

.modal-content {
    padding: 30px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Ship Detail Specific Styles */
.ship-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.ship-gallery {
    flex: 1;
    min-width: 300px;
}

.main-img-container {
    width: 100%;
    height: 450px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnail-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.thumbnail-row img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.thumbnail-row img:hover,
.thumbnail-row img.active {
    border-color: var(--primary);
}

.ship-info-main {
    flex: 1.5;
    min-width: 300px;
}

.ship-info-main h2 {
    margin-top: 0;
    font-size: 2.5rem;
    color: var(--text-main);
    border: none;
}

.ship-info-main .manufacturer {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ship-specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.spec-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

.spec-card .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.spec-card .value {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary);
    margin: 30px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.buying-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.location-tag {
    background: rgba(0, 191, 255, 0.1);
    border: 1px solid var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid var(--border-color);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .modal {
        width: 95%;
        height: 95vh;
    }

    .ship-info-main h2 {
        font-size: 1.8rem;
    }

    .main-img-container {
        height: 250px;
    }
}