/* ===== ENHANCED RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(ellipse at center, #1a1a3e 0%, #0f0f1e 50%, #000 100%);
    color: #e0e6ed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ===== ENHANCED ANIMATED BACKGROUND ===== */
.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: twinkle 3s infinite ease-in-out;
}

.star.large {
    width: 3px;
    height: 3px;
    box-shadow: 0 0 6px #64b5f6;
}

.star.medium {
    width: 2px;
    height: 2px;
    box-shadow: 0 0 4px #ff9800;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

/* Floating particles effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 1px;
    height: 1px;
    background: #64b5f6;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% { 
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100px) translateX(100px);
        opacity: 0;
    }
}

/* ===== ENHANCED NAVIGATION ===== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.95), rgba(25, 25, 40, 0.95));
    backdrop-filter: blur(20px);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #64b5f6, #9c27b0, #64b5f6) 1;
    z-index: 100;
    padding: 12px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    background: linear-gradient(45deg, #64b5f6, #9c27b0, #e91e63);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #64b5f6, #9c27b0, #e91e63);
    opacity: 0.2;
    filter: blur(10px);
    z-index: -1;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.nav-tab {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.8), rgba(35, 35, 50, 0.8));
    border: 1px solid rgba(100, 181, 246, 0.3);
    color: #e0e6ed;
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.4s ease;
    font-size: 0.9em;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(100, 181, 246, 0.4), transparent);
    transition: left 0.6s ease;
}

.nav-tab:hover::before {
    left: 100%;
}

.nav-tab:hover {
    border-color: #64b5f6;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(156, 39, 176, 0.2));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.3);
}

.nav-tab.active {
    background: linear-gradient(135deg, #64b5f6, #9c27b0);
    color: white;
    box-shadow: 0 0 30px rgba(100, 181, 246, 0.6);
    transform: translateY(-1px);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #64b5f6;
    font-weight: bold;
    font-size: 0.95em;
    background: rgba(100, 181, 246, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    white-space: nowrap;
}

/* ===== ENHANCED RESOURCE BAR ===== */
.resource-bar {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(15, 15, 30, 0.95), rgba(25, 25, 40, 0.95));
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    z-index: 99;
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-height: 100px;
    overflow: hidden;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.15), rgba(156, 39, 176, 0.1));
    padding: 12px 16px;
    border-radius: 20px;
    border: 2px solid rgba(100, 181, 246, 0.4);
    transition: all 0.4s ease;
    font-size: 0.85em;
    min-width: 0;
    position: relative;
    overflow: hidden;
}

.resource-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.resource-item:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.resource-item:hover {
    border-color: #64b5f6;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.25), rgba(156, 39, 176, 0.15));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 181, 246, 0.4);
}

.resource-icon {
    font-size: 1.4em;
    flex-shrink: 0;
    text-shadow: 0 0 10px currentColor;
    filter: drop-shadow(0 0 5px currentColor);
}

.resource-name {
    font-weight: bold;
    color: #e0e6ed;
    font-size: 0.7em;
    display: block;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.resource-value {
    color: #4caf50;
    font-weight: bold;
    font-size: 1em;
    min-width: 35px;
    text-align: right;
    flex-shrink: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.resource-rate {
    color: #ffc107;
    font-size: 0.6em;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* ===== ENHANCED MAIN CONTAINER ===== */
.container {
    position: relative;
    z-index: 2;
    max-width: 1400px;
    margin: 0 auto;
    padding: 180px 20px 40px;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
}

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

/* ===== ENHANCED GAME GRID ===== */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ===== ENHANCED PANEL SYSTEM ===== */
.panel {
    background: linear-gradient(135deg, 
        rgba(25, 25, 40, 0.9) 0%, 
        rgba(35, 35, 50, 0.8) 50%, 
        rgba(25, 25, 40, 0.9) 100%);
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 25px;
    backdrop-filter: blur(15px);
    transition: all 0.4s ease;
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1), rgba(156, 39, 176, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.panel:hover::before {
    opacity: 1;
}

.panel:hover {
    border-color: rgba(100, 181, 246, 0.6);
    box-shadow: 
        0 15px 40px rgba(100, 181, 246, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.panel-title {
    color: #64b5f6;
    font-size: 1.2em;
    margin-bottom: 20px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #64b5f6, #9c27b0, transparent) 1;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
}

/* ===== ENHANCED CLICK AREAS ===== */
.click-area {
    background: linear-gradient(45deg, #1976d2, #64b5f6, #9c27b0);
    background-size: 300% 300%;
    border: none;
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.4s ease;
    margin: 20px 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    font-weight: bold;
    text-transform: uppercase;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.click-area::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.click-area:active::before {
    width: 300px;
    height: 300px;
}

.click-area:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(100, 181, 246, 0.5);
}

.click-area:active {
    transform: scale(0.98);
}

/* ===== ENHANCED UPGRADES SECTION ===== */
.upgrade-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.upgrade {
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(20, 20, 30, 0.8) 50%, 
        rgba(0, 0, 0, 0.6) 100%);
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.upgrade::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #64b5f6, #9c27b0, #e91e63, #64b5f6);
    z-index: -1;
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.upgrade:hover::before {
    opacity: 0.7;
}

.upgrade:hover {
    background: linear-gradient(135deg, 
        rgba(100, 181, 246, 0.1) 0%, 
        rgba(20, 20, 30, 0.9) 50%, 
        rgba(156, 39, 176, 0.1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 181, 246, 0.3);
}

.upgrade.locked {
    opacity: 0.5;
    border-color: #444;
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.6), rgba(30, 30, 30, 0.8));
    pointer-events: none;
}

.upgrade.locked::before {
    display: none;
}

.upgrade.locked .upgrade-btn {
    background: linear-gradient(45deg, #666, #555);
    color: #999;
    cursor: not-allowed;
}

.upgrade.locked .upgrade-name {
    color: #777;
}

/* Make unlocked upgrades more obvious */
.upgrade:not(.locked) {
    border-color: rgba(100, 181, 246, 0.6);
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.6) 0%, 
        rgba(20, 20, 30, 0.8) 50%, 
        rgba(0, 0, 0, 0.6) 100%);
}

.upgrade:not(.locked):hover {
    border-color: #64b5f6;
    background: linear-gradient(135deg, 
        rgba(100, 181, 246, 0.1) 0%, 
        rgba(20, 20, 30, 0.9) 50%, 
        rgba(156, 39, 176, 0.1) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(100, 181, 246, 0.3);
}

/* Ship construction unlock states */
.ship-type.locked {
    opacity: 0.5;
    border-color: #444;
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.6), rgba(30, 30, 30, 0.8));
    pointer-events: none;
}

.ship-type.locked .ship-btn {
    background: linear-gradient(45deg, #666, #555);
    color: #999;
    cursor: not-allowed;
}

.ship-type:not(.locked) {
    border-color: rgba(255, 152, 0, 0.6);
}

.upgrade-name {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.upgrade-level {
    color: #64b5f6;
    font-size: 0.85em;
    background: linear-gradient(45deg, rgba(100, 181, 246, 0.3), rgba(156, 39, 176, 0.3));
    padding: 4px 12px;
    border-radius: 12px;
    border: 1px solid rgba(100, 181, 246, 0.5);
    font-weight: bold;
}

.upgrade-description {
    color: #ccc;
    font-size: 0.85em;
    margin-bottom: 10px;
    line-height: 1.4;
}

.upgrade-stats {
    color: #ffc107;
    font-size: 0.85em;
    margin-bottom: 10px;
    font-weight: bold;
    background: rgba(255, 193, 7, 0.1);
    padding: 8px 12px;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}

.upgrade-cost {
    color: #ff9800;
    font-size: 0.85em;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cost-item {
    background: rgba(255, 152, 0, 0.2);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 152, 0, 0.5);
    font-size: 0.8em;
    white-space: nowrap;
}

.upgrade-btn {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.upgrade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.upgrade-btn:hover::before {
    left: 100%;
}

.upgrade-btn:hover {
    background: linear-gradient(45deg, #45a049, #5ba55b);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.upgrade-btn:disabled {
    background: linear-gradient(45deg, #666, #777);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.upgrade-btn:disabled::before {
    display: none;
}

/* ===== ENHANCED RESEARCH TREE ===== */
.research-tree {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.research-category {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.8), rgba(35, 35, 50, 0.6));
    border-radius: 20px;
    padding: 25px;
    border: 2px solid rgba(100, 181, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.research-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #9c27b0, #e91e63);
    opacity: 0.8;
}

.research-category h3 {
    color: #64b5f6;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    text-shadow: none;
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
    padding-bottom: 10px;
}

.research-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.research-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 30, 0.8));
    border: 2px solid rgba(100, 181, 246, 0.4);
    border-radius: 15px;
    padding: 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.research-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #64b5f6, #9c27b0, #e91e63);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.research-item:hover::before {
    opacity: 1;
}

.research-item:hover {
    border-color: #64b5f6;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1), rgba(20, 20, 30, 0.9));
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(100, 181, 246, 0.3);
}

.research-item.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(20, 20, 30, 0.8));
}

.research-item.completed::before {
    background: linear-gradient(90deg, #4caf50, #66bb6a, #4caf50);
    opacity: 1;
}

.research-item.locked {
    opacity: 0.5;
    border-color: #666;
}

.research-item.locked::before {
    display: none;
}

.research-name {
    color: #64b5f6;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(100, 181, 246, 0.5);
}

.research-item.completed .research-name {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.research-description {
    color: #ccc;
    margin-bottom: 10px;
    line-height: 1.4;
    font-size: 0.9em;
}

.research-cost {
    color: #ff9800;
    margin-bottom: 15px;
    font-size: 0.85em;
    background: rgba(255, 152, 0, 0.1);
    padding: 6px 10px;
    border-radius: 6px;
    border-left: 3px solid #ff9800;
}

.research-item.completed .research-cost {
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.research-btn {
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.85em;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.research-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.research-btn:hover::before {
    left: 100%;
}

.research-btn:hover {
    background: linear-gradient(45deg, #42a5f5, #8e24aa);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(100, 181, 246, 0.4);
}

.research-btn:disabled {
    background: linear-gradient(45deg, #666, #777);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.research-btn:disabled::before {
    display: none;
}

/* ===== ENHANCED FLEET MANAGEMENT ===== */
.ship-construction {
    display: flex;
    flex-direction: column;
    gap: 15px;
    /* max-height: 400px; */
    overflow-y: auto;
    padding-right: 5px;
}

.ship-type {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 30, 0.8));
    border: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 12px;
    padding: 18px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.ship-type::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 152, 0, 0.2), transparent);
    transition: left 0.8s ease;
}

.ship-type:hover::before {
    left: 100%;
}

.ship-type:hover {
    border-color: #ff9800;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(20, 20, 30, 0.9));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 152, 0, 0.3);
}

.ship-type.locked {
    opacity: 0.6;
}

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

.ship-name {
    color: #ff9800;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 0 10px rgba(255, 152, 0, 0.5);
}

.ship-stats {
    color: #64b5f6;
    font-size: 0.85em;
    background: linear-gradient(45deg, rgba(100, 181, 246, 0.3), rgba(255, 152, 0, 0.3));
    padding: 4px 10px;
    border-radius: 10px;
    font-weight: bold;
}

.ship-description {
    color: #ccc;
    margin-bottom: 10px;
    font-size: 0.85em;
    line-height: 1.4;
}

.ship-cost {
    color: #ff9800;
    margin-bottom: 15px;
    font-size: 0.85em;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ship-btn {
    background: linear-gradient(45deg, #ff9800, #ffc107);
    border: none;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    font-size: 0.85em;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.ship-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.ship-btn:hover::before {
    left: 100%;
}

.ship-btn:hover {
    background: linear-gradient(45deg, #f57c00, #ffb300);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.ship-btn:disabled {
    background: linear-gradient(45deg, #666, #777);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ship-btn:disabled::before {
    display: none;
}

/* ===== ENHANCED FLEET DISPLAY ===== */
.fleet-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fleet-summary {
    background: rgba(100, 181, 246, 0.1);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 12px;
    padding: 15px;
}

.fleet-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fleet-stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    color: #64b5f6;
    font-weight: bold;
    font-size: 0.9em;
}

.stat-value {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.1em;
}

.ship-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.ship-count {
    display: flex;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85em;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.ship-count:hover {
    background: rgba(255, 152, 0, 0.1);
    border-color: rgba(255, 152, 0, 0.5);
}

.explore-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 20px;
    align-items: flex-start;
    height: 75vh;
}

.galaxy-map-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.galaxy-map-container {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    background: #0a0a14;
    border-radius: 10px;
    border: 2px solid rgba(100, 181, 246, 0.3);
    padding: 20px;
}

/* Enhanced Galaxy Map Grid */
.galaxy-map-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: repeat(6, 1fr);
    gap: 8px;
    min-height: 500px;
    width: 100%;
    place-items: center;
}

/* Individual Hexagon Sectors - Improved Clickability */
.map-sector {
    position: relative;
    width: 60px;
    height: 60px;
    background-color: #1d1d3b;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    filter: grayscale(80%) brightness(0.6);
    border: 2px solid transparent;
    /* Remove the transform offset for better click detection */
}

/* Make sectors more clickable by adding padding around the clipped area */
.map-sector::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    /* This creates a larger click area */
    pointer-events: auto;
}

.map-sector:hover {
    background-color: #4a4a80;
    transform: scale(1.1);
    z-index: 10;
    filter: grayscale(0%) brightness(1.2);
    border-color: rgba(100, 181, 246, 0.8);
    box-shadow: 0 0 15px rgba(100, 181, 246, 0.5);
}

.map-sector.explored {
    filter: grayscale(0%) brightness(1);
    background-color: #2a2a50;
    border-color: rgba(76, 175, 80, 0.5);
}

.map-sector.explored:hover {
    background-color: #3a3a60;
    border-color: rgba(76, 175, 80, 0.8);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.map-sector.selected {
    background-color: #ffc107 !important;
    box-shadow: 0 0 20px #ffc107 !important;
    transform: scale(1.15) !important;
    z-index: 11;
    border-color: #ffc107 !important;
    filter: grayscale(0%) brightness(1.3) !important;
}

.map-sector.current {
    background-color: #64b5f6 !important;
    animation: pulse-current 2s infinite;
    z-index: 12;
    border-color: #64b5f6 !important;
    filter: grayscale(0%) brightness(1.5) !important;
}

.map-sector.current.selected {
    box-shadow: 
        0 0 25px rgba(100, 181, 246, 0.7), 
        inset 0 0 15px rgba(255, 193, 7, 0.4) !important;
}

@keyframes pulse-current {
    0% { box-shadow: 0 0 15px #64b5f6; }
    50% { box-shadow: 0 0 25px #fff, 0 0 35px #64b5f6; }
    100% { box-shadow: 0 0 15px #64b5f6; }
}

/* Sector Content */
.sector-icon {
    font-size: 1.8em;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    text-shadow: 0 0 8px #000;
    pointer-events: none; /* Prevent icon from interfering with clicks */
}

.sector-coords {
    font-size: 0.6em;
    color: #8899aa;
    opacity: 0.3;
    transition: opacity 0.5s ease;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none; /* Prevent coords from interfering with clicks */
    margin-top: 2px;
}

.map-sector.explored .sector-icon,
.map-sector.explored .sector-coords {
    opacity: 1;
}

/* Point of Interest (POI) Indicator */
.poi-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    background-color: #ff9800;
    border-radius: 50%;
    box-shadow: 0 0 8px #ff9800;
    animation: pulse-poi 1.5s infinite;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    pointer-events: none; /* Prevent indicator from interfering with clicks */
}

@keyframes pulse-poi {
    0% { transform: scale(0.9); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.8; }
}

/* Sidebar Styling */
.explore-sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#sectorDetailsPanel {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.sector-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.sector-desc {
    font-style: italic;
    color: #ccc;
    margin-bottom: 20px;
    border-left: 3px solid #64b5f6;
    padding-left: 10px;
    line-height: 1.4;
}

.unexplored-text {
    color: #ff9800;
    font-style: italic;
    text-align: center;
    padding: 20px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 5px;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.poi-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.poi-list li {
    background: rgba(0,0,0,0.3);
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(100, 181, 246, 0.2);
    transition: all 0.3s ease;
}

.poi-list li:hover {
    background: rgba(100, 181, 246, 0.1);
    border-color: rgba(100, 181, 246, 0.5);
}

.poi-name {
    font-weight: bold;
    color: #64b5f6;
}

.completed-tag {
    color: #4caf50;
    font-weight: bold;
    font-size: 0.8em;
    background: rgba(76, 175, 80, 0.2);
    padding: 4px 8px;
    border-radius: 10px;
}

.poi-action-btn, 
.sector-travel-btn, 
.sector-action-btn {
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.poi-action-btn:hover, 
.sector-action-btn:hover {
    background: linear-gradient(45deg, #42a5f5, #8e24aa);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(100, 181, 246, 0.4);
}

.sector-travel-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    margin-top: 15px;
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    text-align: center;
}

.sector-travel-btn:hover {
    background: linear-gradient(45deg, #45a049, #5ba55b);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.travel-warning {
    color: #ff9800;
    text-align: center;
    padding: 10px;
    background: rgba(255, 152, 0, 0.1);
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid rgba(255, 152, 0, 0.3);
    font-style: italic;
}

.current-location {
    color: #64b5f6;
    text-align: center;
    padding: 10px;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 5px;
    margin-top: 15px;
    border: 1px solid rgba(100, 181, 246, 0.3);
    font-weight: bold;
}

/* Responsive Design for Galaxy Map */
@media (max-width: 1024px) {
    .explore-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        height: auto;
    }
    
    .galaxy-map-panel {
        height: 60vh;
    }
    
    .map-sector {
        width: 50px;
        height: 50px;
    }
    
    .sector-icon {
        font-size: 1.4em;
    }
    
    .sector-coords {
        font-size: 0.5em;
    }
}

@media (max-width: 768px) {
    .galaxy-map-grid {
        gap: 4px;
        min-height: 400px;
    }
    
    .map-sector {
        width: 40px;
        height: 40px;
    }
    
    .sector-icon {
        font-size: 1.2em;
    }
    
    .sector-coords {
        display: none; /* Hide coordinates on mobile */
    }
    
    .poi-indicator {
        width: 10px;
        height: 10px;
        top: 5px;
        right: 5px;
    }
}

/* Add visual feedback for clicking */
.map-sector:active {
    transform: scale(0.95) !important;
    transition: transform 0.1s ease;
}

/* Ensure the map is always visible and functional */
.galaxy-map-container:empty::after {
    content: "Loading galaxy map...";
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #64b5f6;
    font-size: 1.2em;
}

/* Add a subtle grid background */
.galaxy-map-container {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(100, 181, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(156, 39, 176, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(233, 30, 99, 0.1) 0%, transparent 50%);
}

/* ===== ENHANCED SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #42a5f5, #8e24aa);
}

/* ===== ANIMATIONS ===== */
.pulse {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.floating-text {
    position: absolute;
    color: #4caf50;
    font-weight: bold;
    pointer-events: none;
    animation: float-up 2s ease-out forwards;
    z-index: 10;
    font-size: 1em;
    text-shadow: 0 0 8px currentColor;
}

@keyframes float-up {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .game-grid {
        grid-template-columns: 1fr;
    }
    
    .upgrade-section {
        grid-template-columns: 1fr;
    }
    
    .research-items {
        grid-template-columns: 1fr;
    }
    
    .ship-counts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        padding: 200px 15px 20px;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .resource-bar {
        grid-template-columns: repeat(2, 1fr);
        top: 130px;
    }
    
    .panel {
        padding: 20px;
    }
    
    .upgrade-section {
        max-height: 300px;
    }
    
    .ship-construction {
        max-height: 300px;
    }
}

@media (max-width: 600px) {
    .resource-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px;
    }
    
    .resource-item {
        padding: 8px 10px;
        font-size: 0.75em;
    }
    
    .resource-rate {
        display: none;
    }
    
    .panel-title {
        font-size: 1em;
    }
    
    .upgrade {
        padding: 15px;
    }
    
    .research-item {
        padding: 15px;
    }
    
    .ship-type {
        padding: 15px;
    }
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

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

.mb-small {
    margin-bottom: 8px;
}

.mb-medium {
    margin-bottom: 15px;
}

.mb-large {
    margin-bottom: 25px;
}

/* ===== ENHANCED MODALS ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.95), rgba(35, 35, 50, 0.95));
    border: 2px solid #64b5f6;
    border-radius: 15px;
    padding: 25px;
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(100, 181, 246, 0.3);
    padding-bottom: 10px;
}

.modal-header h2 {
    color: #64b5f6;
    margin: 0;
    font-size: 1.2em;
}

.close-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff6666;
}

/* ===== FLOATING BUTTON ===== */
.floating-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(100, 181, 246, 0.4);
    transition: all 0.3s ease;
    z-index: 999;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(100, 181, 246, 0.6);
}

/* ===== ACHIEVEMENTS ===== */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    max-height: 300px;
    overflow-y: auto;
}

.achievement {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #555;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievement.unlocked {
    border-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(102, 187, 106, 0.1));
}

.achievement.unlocked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.achievement-icon {
    font-size: 1.5em;
    margin-bottom: 8px;
    display: block;
}

.achievement-name {
    color: #64b5f6;
    font-weight: bold;
    margin-bottom: 6px;
    font-size: 0.8em;
}

.achievement-description {
    color: #ccc;
    font-size: 0.7em;
    line-height: 1.2;
}

/* ===== LOGS ===== */
.log {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(100, 181, 246, 0.3);
    border-radius: 10px;
    padding: 15px;
    height: 180px;
    overflow-y: auto;
    font-size: 0.8em;
}

.log-entry {
    margin: 6px 0;
    padding: 6px 10px;
    border-left: 3px solid #64b5f6;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 4px;
    animation: slideIn 0.5s ease;
    line-height: 1.4;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== ENHANCED SHOP ===== */
.shop-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shop-content {
    position: relative;
}

.shop-category {
    display: none;
}

.shop-category.active {
    display: block;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.shop-item {
    background: linear-gradient(135deg, rgba(25, 25, 40, 0.8), rgba(35, 35, 50, 0.6));
    border: 2px solid rgba(233, 30, 99, 0.4);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.shop-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.2), transparent);
    transition: left 0.8s ease;
}

.shop-item:hover::before {
    left: 100%;
}

.shop-item:hover {
    border-color: #e91e63;
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.1), rgba(35, 35, 50, 0.8));
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.3);
}

.item-header {
    color: #e91e63;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 12px;
    text-shadow: 0 0 10px rgba(233, 30, 99, 0.5);
}

.item-description {
    color: #ccc;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.9em;
}

.item-price {
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.shop-btn {
    background: linear-gradient(45deg, #e91e63, #ff4081);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85em;
    width: 100%;
}

.shop-btn:hover {
    background: linear-gradient(45deg, #c2185b, #f50057);
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(233, 30, 99, 0.4);
}

/* ===== ALLIANCE STYLES ===== */
.alliance-locked {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px dashed #666;
}

.alliance-locked h2 {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.alliance-locked p {
    color: #888;
    font-size: 0.9em;
}

.alliance-content {
    display: none;
}

.alliance-info {
    text-align: center;
    padding: 20px;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.alliance-name {
    font-size: 1.2em;
    color: #64b5f6;
    margin-bottom: 15px;
    font-weight: bold;
}

.alliance-btn {
    background: linear-gradient(45deg, #64b5f6, #9c27b0);
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 8px;
    font-weight: bold;
    font-size: 0.85em;
}

.alliance-btn:hover {
    background: linear-gradient(45deg, #42a5f5, #8e24aa);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(100, 181, 246, 0.4);
}

/* Trading Tab Styles */
.trading-locked {
    text-align: center;
    padding: 50px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    border: 2px dashed #666;
}

.trading-locked h2 {
    color: #666;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.trading-locked p {
    color: #888;
    font-size: 0.9em;
}

.trading-content {
    display: none;
}

.market-display,
.traders-list,
.contracts-list,
.auctions-list {
    max-height: 300px;
    overflow-y: auto;
}

.market-item,
.trader-item,
.contract-item,
.auction-item {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #555;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.market-item:hover,
.trader-item:hover,
.contract-item:hover,
.auction-item:hover {
    border-color: #64b5f6;
    background: rgba(100, 181, 246, 0.1);
}

/* Research Timer Styles */
.research-timer {
    margin: 10px 0;
    padding: 10px;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(100, 181, 246, 0.3);
}

.timer-bar {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.timer-progress {
    height: 100%;
    background: linear-gradient(90deg, #64b5f6, #9c27b0);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.timer-text {
    font-size: 0.8em;
    color: #64b5f6;
    text-align: center;
    font-weight: bold;
}

.research-item.researching {
    border-color: #64b5f6;
    background: linear-gradient(135deg, rgba(100, 181, 246, 0.1), rgba(20, 20, 30, 0.9));
}

.research-item.researching .research-btn {
    background: #666;
    cursor: not-allowed;
}

/* Enhanced Trading Styles */
.market-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.market-price {
    color: #4caf50;
    font-weight: bold;
}

.market-trend {
    font-size: 0.8em;
    font-weight: bold;
}

.market-trend.rising {
    color: #4caf50;
}

.market-trend.stable {
    color: #ffc107;
}

.market-trend.falling {
    color: #f44336;
}

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

.trader-name {
    color: #64b5f6;
    font-weight: bold;
}

.trader-reputation {
    color: #ffc107;
    font-size: 0.9em;
}

.trader-specialties,
.trader-location {
    color: #ccc;
    font-size: 0.8em;
    margin-bottom: 4px;
}

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

.contract-title {
    color: #64b5f6;
    font-weight: bold;
}

.contract-difficulty {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    text-transform: uppercase;
    font-weight: bold;
}

.contract-difficulty.easy {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.contract-difficulty.medium {
    background: rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.contract-difficulty.hard {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
}

.contract-description,
.contract-requirements,
.contract-rewards {
    color: #ccc;
    font-size: 0.8em;
    margin-bottom: 4px;
}

.contract-requirements {
    color: #ff9800;
}

.contract-rewards {
    color: #4caf50;
}

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

.auction-title {
    color: #64b5f6;
    font-weight: bold;
}

.auction-time {
    color: #ff9800;
    font-size: 0.8em;
}

.auction-description {
    color: #ccc;
    font-size: 0.8em;
    margin-bottom: 8px;
}

.auction-bidding {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-bid {
    color: #4caf50;
    font-weight: bold;
}

.bid-btn {
    background: #64b5f6;
    border: none;
    color: white;
    padding: 4px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
}

.bid-btn:hover {
    background: #42a5f5;
}

/* Enhanced Map Sector Styles */
.map-sector.selected {
    border-color: #ffc107; /* Gold for selected */
    box-shadow: 0 0 15px #ffc107;
}

.map-sector.current.selected {
     box-shadow: 0 0 25px rgba(100, 181, 246, 0.7), inset 0 0 15px rgba(255, 193, 7, 0.4);
}

/* New Sector Details Panel Styles */
#sectorDetailsPanel {
    display: flex;
    flex-direction: column;
}
.sector-content {
    flex-grow: 1;
}
.sector-desc {
    font-style: italic;
    color: #ccc;
    margin-bottom: 20px;
    border-left: 3px solid #64b5f6;
    padding-left: 10px;
}
.unexplored-text {
    color: #ff9800;
    font-style: italic;
}
.poi-list {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}
.poi-list li {
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.completed-tag {
    color: #4caf50;
    font-weight: bold;
    font-size: 0.8em;
}
.poi-action-btn, .sector-travel-btn {
    background: #64b5f6;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background 0.3s;
}
.poi-action-btn:hover, .sector-travel-btn:hover {
    background: #42a5f5;
}
.sector-travel-btn {
    width: 100%;
    padding: 12px;
    font-size: 1em;
    font-weight: bold;
    margin-top: 15px;
    background: linear-gradient(45deg, #4caf50, #66bb6a);
}
.sector-travel-btn:hover {
    background: linear-gradient(45deg, #45a049, #5ba55b);
}

/* New Fleet Designer Styles */
.fleet-layout {
    display: grid;
    grid-template-columns: minmax(350px, 1fr) 2fr; /* 1/3 and 2/3 layout */
    gap: 20px;
    align-items: flex-start;
}

.fleet-list {
    max-height: 250px; /* Adjusted height */
    overflow-y: auto;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 20px; /* Space between roster and construction */
}

/* NEW: Styles for the collapsible hull construction accordion */
.hull-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.hull-accordion-item {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(20, 20, 30, 0.8));
    border: 2px solid rgba(255, 152, 0, 0.4);
    border-radius: 12px;
    transition: all 0.4s ease;
}

.hull-accordion-header {
    padding: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hull-accordion-header:hover .ship-name {
    color: #ffc107;
}

.hull-accordion-content {
    padding: 0 15px 15px 15px;
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.hull-accordion-content.hidden {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.expand-icon {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff9800;
    transition: transform 0.3s ease;
}

.hull-accordion-item.open .expand-icon {
    transform: rotate(45deg);
}
.fleet-list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 5px;
    border-radius: 3px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}
.fleet-list-item:hover {
    background: rgba(100, 181, 246, 0.2);
    border-left-color: #64b5f6;
}
.fleet-list-item.selected {
    background: rgba(100, 181, 246, 0.3);
    border-left-color: #ffc107;
    font-weight: bold;
}
.ship-item-type {
    color: #ccc;
    font-size: 0.9em;
}
.no-ship-selected {
    text-align: center;
    color: #888;
    padding: 60px 0;
    font-style: italic;
}
.component-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}
.component-slot {
    background: rgba(0,0,0,0.4);
    border: 1px dashed #666;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 80px;
}
.slot-label {
    font-size: 0.8em;
    color: #999;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
}
.empty-slot {
    color: #777;
    font-style: italic;
}
.equipped-item {
    color: #4caf50;
    font-weight: bold;
}
.inventory-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #333;
    border-radius: 5px;
}
.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 5px;
}
.inventory-item button {
    font-size: 0.8em;
    padding: 4px 8px;
}

/* Enhanced Ship Designer Styles */
.ship-designer-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid #444;
}

.designer-tab {
    background: rgba(25, 25, 40, 0.8);
    border: 1px solid #444;
    color: #e0e6ed;
    padding: 10px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: none;
}

.designer-tab.active {
    background: #64b5f6;
    color: white;
    border-color: #64b5f6;
}

.designer-tab:hover:not(.active) {
    background: rgba(100, 181, 246, 0.2);
}

.designer-tab-content {
    display: none;
}

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

/* Component Slot Enhancements */
.component-slot {
    background: rgba(0,0,0,0.4);
    border: 2px dashed #666;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    min-height: 100px;
    transition: all 0.3s ease;
    position: relative;
}

.component-slot[data-slot-type="weapon"] {
    border-color: #e91e63;
}

.component-slot[data-slot-type="shield"] {
    border-color: #2196f3;
}

.component-slot[data-slot-type="engine"] {
    border-color: #ff9800;
}

.component-slot[data-slot-type="utility"] {
    border-color: #4caf50;
}

.component-slot:hover {
    border-style: solid;
    background: rgba(100, 181, 246, 0.1);
}

.equipped-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.component-name {
    color: #4caf50;
    font-weight: bold;
    font-size: 0.9em;
}

.unequip-btn {
    background: #f44336;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
}

.unequip-btn:hover {
    background: #d32f2f;
}

/* Inventory Enhancements */
.inventory-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 8px;
    border-radius: 5px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.inventory-item.compatible {
    border-left-color: #4caf50;
}

.inventory-item.incompatible {
    opacity: 0.5;
    border-left-color: #f44336;
}

.inventory-item:hover.compatible {
    background: rgba(76, 175, 80, 0.1);
}

.component-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.component-category {
    color: #999;
    font-size: 0.8em;
}

.component-count {
    color: #64b5f6;
    font-weight: bold;
    font-size: 0.9em;
}

.equip-btn {
    background: #4caf50;
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: background 0.3s ease;
}

.equip-btn:hover {
    background: #45a049;
}

.incompatible-text {
    color: #f44336;
    font-size: 0.8em;
    font-style: italic;
}

/* Ship Stats Display */
.ship-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-group {
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
}

.stat-group h4 {
    color: #64b5f6;
    margin-bottom: 15px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
}

.stat-value {
    color: #4caf50;
    font-weight: bold;
}

.abilities-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ability {
    background: rgba(100, 181, 246, 0.2);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    text-align: center;
    border: 1px solid rgba(100, 181, 246, 0.5);
}

.no-abilities {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

/* Deployment Interface */
.deployment-options {
    background: rgba(0,0,0,0.3);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
}

.current-assignment {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(100, 181, 246, 0.1);
    border-radius: 5px;
}

.status-value {
    color: #4caf50;
    font-weight: bold;
}

.deployment-actions,
.recall-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.deploy-btn,
.fleet-btn,
.recall-btn {
    background: #64b5f6;
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.deploy-btn:hover {
    background: #42a5f5;
}

.fleet-btn {
    background: #ff9800;
}

.fleet-btn:hover {
    background: #f57c00;
}

.recall-btn {
    background: #f44336;
}

.recall-btn:hover {
    background: #d32f2f;
}

/* Fleet List Enhancements */
.fleet-list-item {
    display: flex;
    flex-direction: column;
    padding: 12px;
    background: rgba(0,0,0,0.2);
    margin-bottom: 8px;
    border-radius: 5px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.fleet-list-item:hover {
    background: rgba(100, 181, 246, 0.2);
    border-left-color: #64b5f6;
}

.fleet-list-item.selected {
    background: rgba(100, 181, 246, 0.3);
    border-left-color: #ffc107;
    font-weight: bold;
}

.fleet-list-item.deployed {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.ship-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.ship-item-status {
    font-size: 0.8em;
}

.deployed-status {
    color: #4caf50;
}

.available-status {
    color: #64b5f6;
}