/*
 * Combined Stylesheet for Elite Nexus Dashboard and Ship Status Page
 *
 * This file contains all the custom CSS rules extracted from
 * both the dashboard (`index.html`) and the ship status page.
 *
 * NOTE: The Tailwind CSS classes are still present in the HTML files
 * and provide additional styling. This file should be linked to both
 * documents to centralize the custom styles.
 */

/* Import futuristic fonts */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Exo+2:wght@300;400;600&display=swap');

body {
    font-family: 'Exo 2', sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #151520 50%, #1a1a2e 100%);
    color: #8892b0;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Animated starfield background */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

.star {
    position: absolute;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Header and page-specific animations */
.header {
    background: rgba(10, 10, 15, 0.9);
    border-bottom: 2px solid #00d4ff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    color: #00d4ff;
    text-shadow: 0 0 10px #00d4ff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.credits {
    font-family: 'Orbitron', monospace;
    color: #39ff14;
    text-shadow: 0 0 5px #39ff14;
}

/* Dashboard specific styles */
.dashboard {
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-card {
    background: linear-gradient(145deg, rgba(30, 30, 46, 0.8), rgba(42, 42, 58, 0.6));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.span-two-columns {
  grid-column: span 2;
}
.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.5s;
}

.dashboard-card:hover::before {
    left: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.card-icon {
    width: 24px;
    height: 24px;
    fill: #00d4ff;
    filter: drop-shadow(0 0 5px #00d4ff);
}

.card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #00d4ff;
}

.card-status {
    margin-left: auto;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-online {
    background: rgba(57, 255, 20, 0.2);
    color: #39ff14;
    border: 1px solid #39ff14;
}

.status-warning {
    background: rgba(255, 176, 0, 0.2);
    color: #ffb000;
    border: 1px solid #ffb000;
}

.status-offline {
    background: rgba(255, 42, 109, 0.2);
    color: #ff2a6d;
    border: 1px solid #ff2a6d;
}

.card-content {
    line-height: 1.6;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}

.stat-value {
    font-family: 'Orbitron', monospace;
    color: #00ffa3;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(136, 146, 176, 0.2);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, #39ff14);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #ffb000, #ff2a6d);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 2s infinite;
}

.quick-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.2));
    border: 2px solid #00d4ff;
    border-radius: 8px;
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.action-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

/* Ship Status Page specific styles */
.main-content {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    font-weight: 700;
    color: #00d4ff;
    text-shadow: 0 0 8px #00d4ff;
    margin-bottom: 1.5rem;
    border-left: 4px solid #00d4ff;
    padding-left: 1rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}
        
.info-card {
    background: linear-gradient(145deg, rgba(30, 30, 46, 0.8), rgba(42, 42, 58, 0.6));
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.info-card .card-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
        
.info-card .card-icon {
    width: 24px;
    height: 24px;
    fill: #00d4ff;
    filter: drop-shadow(0 0 5px #00d4ff);
}
        
.info-card .stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}
        
.info-card .stat-value {
    font-family: 'Orbitron', monospace;
    color: #00ffa3;
}

.component-list {
    margin-top: 1rem;
    list-style: none;
}
        
.component-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(136, 146, 176, 0.1);
}

.component-item:last-child {
    border-bottom: none;
}
        
.component-item .component-name {
    font-family: 'Exo 2', sans-serif;
    font-weight: 400;
}
        
.component-item .component-status {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
        
.component-status.online {
    color: #39ff14;
}

.component-status.warning {
    color: #ffb000;
}

.component-status.offline {
    color: #ff2a6d;
}

.back-btn {
    margin-top: 2rem;
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, rgba(0, 212, 255, 0.1), rgba(0, 212, 255, 0.2));
    border: 2px solid #00d4ff;
    border-radius: 8px;
    color: #00d4ff;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: translateY(-2px);
}

/* Modal specific styles */
.modal {
    transition: opacity 0.3s ease-in-out;
}
.modal-content {
    animation: slideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
@keyframes slideIn {
    0% { transform: translateY(-50px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Responsive styles */
@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    .header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
