@import url('https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

html {
    font-size: 15px; /* Globální mírné zmenšení písma z výchozích 16px */
    scroll-behavior: smooth;
}

:root {
    --bg-color: #0b0c10;
    --container-bg: rgba(31, 40, 51, 0.2);
    --container-bg-hover: rgba(31, 40, 51, 0.35);
    --border-color: #1f2833;
    --border-color-glow: #66fcf1;
    
    --text-primary: #ffffff;
    --text-secondary: #c5c6c7;
    --text-muted: #8b9bb4;
    
    --color-titan: #a6b8c7;      /* Titanium silver */
    --color-helium3: #ff6b6b;    /* Helium-3 red-orange */
    --color-dark-matter: #a29bfe; /* Dark matter purple */
    
    --neon-blue: #66fcf1;
    --neon-blue-glow: rgba(102, 252, 241, 0.4);
    --neon-magenta: #e84393;
    --neon-magenta-glow: rgba(232, 67, 147, 0.4);
    
    --green-success: #2ecc71;
    --red-error: #e74c3c;
    --warning-yellow: #f1c40f;
    
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Inter', sans-serif;
}

body.theme-cyberpunk {
    --neon-blue: #ff007f;
    --neon-blue-glow: rgba(255, 0, 127, 0.4);
    --neon-magenta: #00f2fe;
    --neon-magenta-glow: rgba(0, 242, 254, 0.4);
    --border-color-glow: #ff007f;
}

body.theme-matrix {
    --neon-blue: #39ff14;
    --neon-blue-glow: rgba(57, 255, 20, 0.4);
    --neon-magenta: #00ff66;
    --neon-magenta-glow: rgba(0, 255, 102, 0.4);
    --border-color-glow: #39ff14;
}

body.theme-retro {
    --neon-blue: #f39c12;
    --neon-blue-glow: rgba(243, 156, 18, 0.4);
    --neon-magenta: #d35400;
    --neon-magenta-glow: rgba(211, 84, 0, 0.4);
    --border-color-glow: #f39c12;
}

body {
    background-color: var(--bg-color);
    color: var(--text-secondary);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(102, 252, 241, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(232, 67, 147, 0.05) 0%, transparent 40%),
        radial-gradient(circle at center, #1f2833 0%, #0b0c10 80%);
    background-attachment: fixed;
    overflow-x: hidden; /* Zamezení horizontálnímu scrolování u full-width elementů */
}

/* Hlavička */
#main-header {
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-logo {
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px var(--neon-blue));
}

.game-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--neon-blue);
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--neon-blue-glow);
}

/* Suroviny bar */
.resources-bar {
    display: flex;
    gap: 20px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 700;
}

.resource-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.resource-details span {
    white-space: nowrap;
}

.resource-production {
    font-size: 0.72rem;
    opacity: 0.7;
    font-weight: 400;
    margin-top: 1px;
}

.resource-item.titan { color: var(--color-titan); }
.resource-item.helium3 { color: var(--color-helium3); }
.resource-item.dark_matter { color: var(--color-dark-matter); }
.resource-item.population { color: #55efc4; }

.resource-icon {
    font-size: 1.3rem;
}

/* Hlavní kontejner */
#game-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Hompage / Login / Register */
.homepage {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 20px;
}

.hero {
    position: relative;
    width: 100vw;
    height: 100vh;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: -30px; /* Kompenzace odsazení z herního kontejneru */
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    padding: 40px;
    text-align: center;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 1px solid rgba(102, 252, 241, 0.2);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    background: #05070c;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
    pointer-events: none;
    opacity: 0.65; /* Zvýšení jasu videa zpět pro lepší viditelnost detailů bitvy */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5, 7, 12, 0.35) 0%, rgba(5, 7, 12, 0.8) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    background: rgba(5, 7, 12, 0.4); /* Jemné ztmavení přímo pod textovým blokem */
    padding: 30px 40px;
    border-radius: 16px;
    backdrop-filter: blur(8px); /* Blur efekt pouze za textem */
    border: 1px solid rgba(102, 252, 241, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-content h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(102, 252, 241, 0.95), 0 2px 10px rgba(0, 0, 0, 0.95);
    letter-spacing: 1px;
}

.hero-content p {
    font-size: 1.25rem; /* Zvětšení popisku */
    color: #ffffff; /* Čistě bílá barva bez jakékoli průhlednosti */
    font-weight: 500;
    max-width: 700px;
    margin: 0 auto 35px auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95), 0 1px 3px rgba(0, 0, 0, 0.9);
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.page-header {
    background: rgba(11, 12, 16, 0.65);
    border: 1px solid rgba(102, 252, 241, 0.2);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
    padding: 20px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    backdrop-filter: blur(8px);
    position: relative;
    z-index: 5;
}

.page-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #ffffff;
    font-family: var(--font-heading);
    text-shadow: 0 0 10px rgba(102, 252, 241, 0.6);
}

.page-header p {
    margin: 5px 0 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Tlačítka */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background: rgba(102, 252, 241, 0.03);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 8px rgba(102, 252, 241, 0.05);
    backdrop-filter: blur(4px);
}

.btn-primary:hover {
    background: var(--neon-blue);
    color: #0b0c10;
    box-shadow: 0 0 25px var(--neon-blue), 0 0 10px rgba(102, 252, 241, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(232, 67, 147, 0.03);
    border: 1px solid var(--neon-magenta);
    color: var(--neon-magenta);
    box-shadow: 0 0 8px rgba(232, 67, 147, 0.05);
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: var(--neon-magenta);
    color: white;
    box-shadow: 0 0 25px var(--neon-magenta), 0 0 10px rgba(232, 67, 147, 0.3);
    transform: translateY(-2px);
}

/* Statistiky a Karty */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: -30px;
    position: relative;
    z-index: 10;
}

.stat-item {
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 22px 26px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3), inset 0 0 15px rgba(255, 255, 255, 0.02);
}

.stat-item:hover {
    transform: translateY(-5px);
    background: rgba(10, 15, 30, 0.6);
    box-shadow: 0 15px 35px 0 rgba(0, 0, 0, 0.45), 0 0 15px rgba(255, 255, 255, 0.02);
}

.stat-item.stat-worlds {
    border-left: 3px solid var(--neon-blue);
}

.stat-item.stat-players {
    border-left: 3px solid #ba68c8;
}

.stat-item.stat-planets {
    border-left: 3px solid var(--neon-magenta);
}

.stat-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.stat-worlds .stat-icon-wrapper {
    color: var(--neon-blue);
    background: rgba(102, 252, 241, 0.06);
    border-color: rgba(102, 252, 241, 0.15);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.1);
}

.stat-players .stat-icon-wrapper {
    color: #ba68c8;
    background: rgba(186, 104, 200, 0.06);
    border-color: rgba(186, 104, 200, 0.15);
    box-shadow: 0 0 10px rgba(186, 104, 200, 0.1);
}

.stat-planets .stat-icon-wrapper {
    color: var(--neon-magenta);
    background: rgba(232, 67, 147, 0.06);
    border-color: rgba(232, 67, 147, 0.15);
    box-shadow: 0 0 10px rgba(232, 67, 147, 0.1);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.stat-worlds .stat-number {
    text-shadow: 0 0 8px rgba(102, 252, 241, 0.2);
}

.stat-players .stat-number {
    text-shadow: 0 0 8px rgba(186, 104, 200, 0.2);
}

.stat-planets .stat-number {
    text-shadow: 0 0 8px rgba(232, 67, 147, 0.2);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0.8px;
}

/* Feature grid */
.features {
    text-align: center;
}

.features h2 {
    font-family: var(--font-heading);
    color: var(--neon-blue);
    margin-bottom: 30px;
}

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

.feature-card {
    background: rgba(10, 15, 30, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 30px;
    border-radius: 14px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: left;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.feature-card:hover {
    border-color: rgba(102, 252, 241, 0.4);
    box-shadow: 0 12px 30px rgba(102, 252, 241, 0.1), 0 5px 15px rgba(0, 0, 0, 0.3);
    background: rgba(10, 15, 30, 0.55);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--neon-blue);
    display: inline-block;
    filter: drop-shadow(0 0 8px rgba(102, 252, 241, 0.3));
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-family: var(--font-heading);
    color: white;
    margin-top: 0;
}

.feature-link {
    color: var(--neon-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.feature-link:hover {
    text-decoration: underline;
}

/* Formuláře */
.form-box {
    max-width: 450px;
    margin: 50px auto;
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
}

.form-box h2 {
    font-family: var(--font-heading);
    color: var(--neon-blue);
    text-align: center;
    margin-top: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    background: rgba(11, 12, 16, 0.85);
    color: #ffffff;
    border-radius: 6px;
    box-sizing: border-box;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--neon-blue);
    outline: none;
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.3);
}

/* Notifikace, Chyby, Úspěchy */
.error-msg {
    background: rgba(231, 76, 60, 0.15);
    border-left: 4px solid var(--red-error);
    color: #ff8b8b;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.success-msg {
    background: rgba(46, 204, 113, 0.15);
    border-left: 4px solid var(--green-success);
    color: #a3e4d7;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.link-neon {
    color: var(--neon-blue);
    text-decoration: none;
    border-bottom: 1px dashed var(--neon-blue);
}
.link-neon:hover {
    color: white;
    border-bottom-style: solid;
}

/* ==========================================================================
   Hvězdná mapa / Star Map
   ========================================================================== */

.map-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .map-layout {
        grid-template-columns: 300px 1fr;
    }
}

/* Ovládací panel mapy */
.map-sidebar-panel {
    background: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.map-sidebar-panel h3 {
    font-family: var(--font-heading);
    color: var(--neon-blue);
    margin-top: 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Křížový ovladač pohybu (D-Pad) */
.dpad-container {
    display: grid;
    grid-template-columns: repeat(3, 40px);
    grid-template-rows: repeat(3, 40px);
    gap: 5px;
    justify-content: center;
    margin: 20px auto;
    width: 130px;
}

.dpad-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    color: var(--neon-blue);
    border-radius: 4px;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.dpad-btn:hover {
    background: var(--neon-blue);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    border-color: var(--neon-blue);
}

.dpad-btn.dpad-center {
    color: var(--neon-magenta);
    border-color: rgba(232, 67, 147, 0.4);
}

.dpad-btn.dpad-center:hover {
    background: var(--neon-magenta);
    color: #fff;
    box-shadow: 0 0 10px var(--neon-magenta-glow);
    border-color: var(--neon-magenta);
}

/* Obal mapy */
.map-view-container {
    background: rgba(5, 5, 10, 0.9);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    position: relative;
    overflow: visible;
    min-height: 400px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Mřížka mapy */
.map-grid-wrapper {
    display: block;
    position: relative;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
    cursor: grab;
    overflow: hidden;
    border-radius: 7px;
}

.map-grid {
    display: grid;
    gap: 1px;
    background: rgba(31, 40, 51, 0.2);
    padding: 0;
    border-radius: 0;
    width: calc(100% * (var(--render-size) / var(--map-size)));
    height: calc(100% * (var(--render-size) / var(--map-size)));
    position: absolute;
    left: calc(-100% * (var(--buffer) / var(--map-size)));
    top: calc(-100% * (var(--buffer) / var(--map-size)));
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    z-index: 1;
}

/* Dlaždice mapy */
.map-tile {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.02);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    box-sizing: border-box;
}

.map-tile:hover {
    background: rgba(102, 252, 241, 0.1);
    border-color: var(--neon-blue);
    z-index: 10;
    box-shadow: 0 0 8px rgba(102, 252, 241, 0.2);
}

/* Hi-tech zaměřovač (Targeting Reticle) v rozích při najetí */
.map-tile::before,
.map-tile::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    border: 1px solid transparent;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 5;
}

.map-tile::before {
    top: 2px;
    left: 2px;
}

.map-tile::after {
    bottom: 2px;
    right: 2px;
}

.map-tile:hover::before {
    border-top-color: var(--neon-blue);
    border-left-color: var(--neon-blue);
    opacity: 1;
    width: 8px;
    height: 8px;
}

.map-tile:hover::after {
    border-bottom-color: var(--neon-blue);
    border-right-color: var(--neon-blue);
    opacity: 1;
    width: 8px;
    height: 8px;
}

/* Zobrazení souřadnic na dlaždici */
.map-tile .tile-coords {
    position: absolute;
    bottom: 2px;
    font-size: clamp(0.4rem, calc(6rem / var(--map-size)), 0.6rem);
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

.map-tile:hover .tile-coords {
    opacity: 0.8;
    color: var(--neon-blue);
}

.map-tile .tile-icon {
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-tile:hover .tile-icon {
    transform: scale(1.15);
}

/* Velikosti a styly ikon podle rozvoje základny */
.map-tile.size-small .tile-icon {
    font-size: clamp(0.5rem, calc(9rem / var(--map-size)), 1rem);
    opacity: 0.7;
}

.map-tile.size-medium .tile-icon {
    font-size: clamp(0.7rem, calc(13rem / var(--map-size)), 1.5rem);
    opacity: 0.9;
}

.map-tile.size-large .tile-icon {
    font-size: clamp(0.9rem, calc(17rem / var(--map-size)), 2rem);
    opacity: 1;
    filter: drop-shadow(0 0 4px var(--neon-blue));
}

.map-tile.tile-player.size-large .tile-icon {
    filter: drop-shadow(0 0 4px var(--neon-magenta));
}

.map-tile.tile-abandoned.size-large .tile-icon {
    filter: drop-shadow(0 0 4px var(--warning-yellow));
}

/* Silnější stíny pro velké vyvinuté základny */
.map-tile.size-large {
    box-shadow: 0 0 12px var(--neon-blue-glow);
}

.map-tile.tile-player.size-large {
    box-shadow: 0 0 12px var(--neon-magenta-glow);
}

/* Parallax vesmírné pozadí */
.map-parallax-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: 0;
    pointer-events: none;
    will-change: transform;
}

.map-parallax-bg.layer-1 {
    background-color: #020205;
    background-image: 
        radial-gradient(1px 1px at 10% 10%, rgba(255,255,255,0.4) 100%, transparent),
        radial-gradient(1px 1px at 30% 50%, rgba(255,255,255,0.3) 100%, transparent),
        radial-gradient(1px 1px at 60% 80%, rgba(255,255,255,0.4) 100%, transparent),
        radial-gradient(1px 1px at 80% 20%, rgba(255,255,255,0.3) 100%, transparent);
    background-size: 200px 200px, 250px 250px, 300px 300px, 150px 150px;
    opacity: 0.5;
}

.map-parallax-bg.layer-2 {
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(102, 252, 241, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(232, 67, 147, 0.06) 0%, transparent 45%),
        radial-gradient(1.5px 1.5px at 15% 25%, rgba(255,255,255,0.7) 100%, transparent),
        radial-gradient(1.5px 1.5px at 45% 75%, rgba(255,255,255,0.8) 100%, transparent),
        radial-gradient(1.5px 1.5px at 75% 45%, rgba(255,255,255,0.6) 100%, transparent);
    background-size: 100% 100%, 100% 100%, 300px 300px, 350px 350px, 400px 400px;
    opacity: 0.8;
}

.map-parallax-bg.layer-3 {
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(31, 40, 51, 0.2) 0%, transparent 60%),
        radial-gradient(2px 2px at 25% 15%, rgba(102, 252, 241, 0.8) 100%, transparent),
        radial-gradient(2.5px 2.5px at 65% 55%, rgba(232, 67, 147, 0.8) 100%, transparent),
        radial-gradient(2px 2px at 85% 85%, rgba(255, 255, 255, 0.9) 100%, transparent);
    background-size: 100% 100%, 450px 450px, 500px 500px, 600px 600px;
    opacity: 1;
}

/* Různé typy planet na mapě (Neon Glow) */
.map-tile.tile-own {
    border-color: var(--neon-blue);
    background: rgba(102, 252, 241, 0.05);
    box-shadow: 0 0 8px var(--neon-blue-glow);
    animation: pulse-signal 2s infinite;
}

.map-tile.tile-own .tile-icon {
    filter: drop-shadow(0 0 3px var(--neon-blue));
}

.map-tile.tile-player {
    border-color: var(--neon-magenta);
    background: rgba(232, 67, 147, 0.05);
    box-shadow: 0 0 8px var(--neon-magenta-glow);
    animation: pulse-signal-enemy 2s infinite;
}

.map-tile.tile-player .tile-icon {
    filter: drop-shadow(0 0 3px var(--neon-magenta));
}

.map-tile.tile-abandoned {
    border-color: var(--warning-yellow);
    background: rgba(241, 196, 15, 0.03);
    box-shadow: 0 0 5px rgba(241, 196, 15, 0.2);
}

.map-tile.tile-abandoned .tile-icon {
    filter: drop-shadow(0 0 3px var(--warning-yellow));
}

.map-tile.tile-asteroid {
    border-color: var(--warning-yellow);
    background: rgba(241, 196, 15, 0.08);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.4);
    animation: pulse-signal-asteroid 2s infinite;
}

.map-tile.tile-asteroid .tile-icon {
    filter: drop-shadow(0 0 5px var(--warning-yellow));
}

@keyframes pulse-signal-asteroid {
    0% {
        box-shadow: 0 0 0 0px rgba(241, 196, 15, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(241, 196, 15, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(241, 196, 15, 0);
    }
}

.map-tile.tile-boss {
    border-color: #ff3333;
    background: rgba(255, 51, 51, 0.12);
    box-shadow: 0 0 12px rgba(255, 51, 51, 0.6);
    animation: pulse-signal-boss 1.5s infinite;
}

.map-tile.tile-boss .tile-icon {
    filter: drop-shadow(0 0 6px #ff3333);
}

@keyframes pulse-signal-boss {
    0% {
        box-shadow: 0 0 0 0px rgba(255, 51, 51, 0.6);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 51, 51, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(255, 51, 51, 0);
    }
}

.map-tile.tile-protected {
    border-color: #00f2fe;
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
    animation: pulse-signal-protected 2.5s infinite ease-in-out;
}

.map-tile.tile-protected .tile-icon {
    filter: drop-shadow(0 0 4px #00f2fe);
}

@keyframes pulse-signal-protected {
    0% {
        box-shadow: 0 0 0 0px rgba(0, 242, 254, 0.5);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(0, 242, 254, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(0, 242, 254, 0);
    }
}

.protect-shield-mini {
    position: absolute;
    bottom: -2px;
    right: -2px;
    font-size: 0.7rem;
    filter: drop-shadow(0 0 2px #00f2fe);
    pointer-events: none;
    z-index: 5;
}

/* Sci-fi Glassmorphism Popup */
.map-popup {
    position: absolute;
    background: rgba(11, 12, 16, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 4px 25px rgba(102, 252, 241, 0.25);
    border-radius: 8px;
    padding: 18px;
    width: 320px; /* Zvětšeno pro náhled planety */
    z-index: 500;
    pointer-events: auto;
    font-family: var(--font-body);
}

.map-popup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-magenta));
    border-radius: 8px 8px 0 0;
}

.popup-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    z-index: 10;
}

.popup-close-btn:hover {
    color: var(--neon-magenta);
}

/* Kontejner hlavičky popupu */
.popup-header-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    margin-top: 5px;
}

.popup-header-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.map-popup h4 {
    font-family: var(--font-heading);
    margin: 0;
    color: var(--neon-blue);
    font-size: 1.15rem;
    padding-right: 15px;
    line-height: 1.25;
}

.popup-badge {
    align-self: flex-start;
    font-size: 0.65rem;
    padding: 2px 6px;
    background: rgba(102, 252, 241, 0.1);
    border: 1px solid rgba(102, 252, 241, 0.3);
    color: var(--neon-blue);
    border-radius: 4px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* Dynamické 3D CSS planety */
.popup-planet-preview {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: inset -8px -8px 16px rgba(0,0,0,0.85), 0 0 8px rgba(255,255,255,0.1);
    overflow: visible; /* Pro prstence */
}

/* Vnější záře podle vlastníka */
.popup-planet-preview.owner-own {
    box-shadow: inset -8px -8px 16px rgba(0,0,0,0.85), 0 0 15px rgba(102, 252, 241, 0.4);
}
.popup-planet-preview.owner-player {
    box-shadow: inset -8px -8px 16px rgba(0,0,0,0.85), 0 0 15px rgba(232, 67, 147, 0.4);
}
.popup-planet-preview.owner-abandoned {
    box-shadow: inset -8px -8px 16px rgba(0,0,0,0.85), 0 0 12px rgba(241, 196, 15, 0.3);
}
.popup-planet-preview.owner-asteroid {
    box-shadow: inset -8px -8px 16px rgba(0,0,0,0.85), 0 0 15px rgba(241, 196, 15, 0.6);
}
.popup-planet-preview.planet-style-asteroid {
    background: radial-gradient(circle at 30% 30%, #ffeaa7 0%, #d35400 70%, #2d3436 100%);
}

/* Styly textur a barev planet */
/* 1. Sopečná */
.popup-planet-preview.planet-style-0 {
    background: radial-gradient(circle at 30% 30%, #ff7675 0%, #d63031 65%, #1e272e 100%);
}
/* 2. Ledová */
.popup-planet-preview.planet-style-1 {
    background: radial-gradient(circle at 30% 30%, #dfe6e9 0%, #74b9ff 60%, #0984e3 100%);
}
/* 3. Plynokovová s prstencem */
.popup-planet-preview.planet-style-2 {
    background: radial-gradient(circle at 30% 30%, #fd79a8 0%, #e84393 70%, #2d3436 100%);
}
.popup-planet-preview.planet-style-2::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 86px;
    height: 12px;
    border: 2px solid rgba(253, 121, 168, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    box-shadow: 0 0 8px rgba(253, 121, 168, 0.3);
    pointer-events: none;
}
/* 4. Oceánská */
.popup-planet-preview.planet-style-3 {
    background: radial-gradient(circle at 30% 30%, #55efc4 0%, #00cec9 50%, #0984e3 100%);
}
/* 5. Pouštní */
.popup-planet-preview.planet-style-4 {
    background: radial-gradient(circle at 30% 30%, #ffeaa7 0%, #fdcb6e 60%, #e17055 100%);
}
/* 6. Jedovatá kyselá */
.popup-planet-preview.planet-style-5 {
    background: radial-gradient(circle at 30% 30%, #a29bfe 0%, #6c5ce7 60%, #2d3436 100%);
}
/* 7. Kybernetická kovová */
.popup-planet-preview.planet-style-6 {
    background: radial-gradient(circle at 30% 30%, #b2bec3 0%, #636e72 70%, #1e272e 100%);
    border: 1px solid rgba(102, 252, 241, 0.15);
}
/* 8. Temná hmota */
.popup-planet-preview.planet-style-7 {
    background: radial-gradient(circle at 30% 30%, #6c5ce7 0%, #2d3436 75%, #000000 100%);
}
.popup-planet-preview.planet-style-7::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 12px rgba(102, 252, 241, 0.35);
    animation: dark-pulse 3s infinite alternate;
}
@keyframes dark-pulse {
    0% { opacity: 0.2; }
    100% { opacity: 0.8; }
}

/* 9. Prázdný vesmír (kolonizace) */
.popup-planet-preview.planet-style-empty {
    background: transparent;
    border: 2px dashed rgba(0, 188, 212, 0.4);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.popup-planet-preview.planet-style-empty::before {
    content: '+';
    color: rgba(0, 188, 212, 0.7);
    font-size: 1.8rem;
    font-weight: 300;
    line-height: 1;
}


.popup-details-container {
    margin-bottom: 15px;
}

.popup-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 4px;
}

.popup-info-row span:first-child {
    color: var(--text-muted);
}

.popup-info-row span:last-child {
    font-weight: 500;
    color: #fff;
}

.popup-actions {
    margin-top: 18px;
    display: flex;
    flex-direction: row;
    gap: 8px;
    justify-content: space-between;
}

.popup-actions .btn {
    padding: 10px 6px;
    font-size: 0.72rem;
    flex: 1;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: transform 0.2s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.popup-actions .btn:hover {
    transform: translateY(-4px); /* Vyskakování nahoru */
    box-shadow: 0 8px 16px var(--neon-blue-glow);
}

.popup-actions .btn-secondary:hover {
    box-shadow: 0 8px 16px var(--neon-magenta-glow);
}

/* Legenda k mapě */
.map-legend {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
}

.legend-color.own {
    background: rgba(102, 252, 241, 0.15);
    border: 1px solid var(--neon-blue);
    box-shadow: 0 0 5px var(--neon-blue-glow);
}

.legend-color.player {
    background: rgba(232, 67, 147, 0.15);
    border: 1px solid var(--neon-magenta);
    box-shadow: 0 0 5px var(--neon-magenta-glow);
}

.legend-color.abandoned {
    background: rgba(241, 196, 15, 0.1);
    border: 1px solid var(--warning-yellow);
    box-shadow: 0 0 3px rgba(241, 196, 15, 0.3);
}

.legend-color.empty {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Pohled na orbitální stanici (Základnu)
   ========================================================================== */

#station-view-graphic {
    position: relative;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: visible; /* Umožňuje popiskům vyčnívat u okrajů bez ořezání */
    margin-bottom: 35px;
    margin-top: 15px;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.2);
}

#station-view-graphic img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0.8;
    border-radius: 7px;
}

/* Styl pro samotný textový hotspot a popisek */
.station-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    text-decoration: none;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.station-hotspot:hover {
    z-index: 20;
    transform: translate(-50%, -50%) scale(1.06);
}

/* Styl info odznaku */
.hotspot-badge {
    background: rgba(5, 10, 20, 0.85);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.status-empty .hotspot-badge {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.65);
}

.status-empty:hover .hotspot-badge {
    border: 1px solid var(--neon-blue);
    background: rgba(5, 10, 20, 0.9);
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.6);
}

.status-construction .hotspot-badge {
    border-color: #e67e22;
    box-shadow: 0 0 10px rgba(230, 126, 34, 0.3);
}

.status-construction:hover .hotspot-badge {
    box-shadow: 0 0 18px rgba(230, 126, 34, 0.7);
}

.status-active .hotspot-badge {
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
}

.status-active:hover .hotspot-badge {
    box-shadow: 0 0 18px rgba(0, 188, 212, 0.7);
}

.status-max .hotspot-badge {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 12px rgba(232, 67, 147, 0.4);
    animation: max-pulse-badge 2s infinite ease-in-out;
}

.status-max:hover .hotspot-badge {
    box-shadow: 0 0 22px rgba(232, 67, 147, 0.85);
}

@keyframes max-pulse-badge {
    0% { box-shadow: 0 0 8px rgba(232, 67, 147, 0.4); }
    50% { box-shadow: 0 0 15px rgba(232, 67, 147, 0.6); }
    100% { box-shadow: 0 0 8px rgba(232, 67, 147, 0.4); }
}

.lvl-badge {
    font-weight: bold;
    margin-top: 2px;
    font-size: 0.65rem;
}

.status-empty .lvl-badge {
    color: var(--text-muted);
}

.status-construction .lvl-badge {
    color: #e67e22;
}

.status-active .lvl-badge {
    color: var(--neon-blue);
}

.status-max .lvl-badge {
    color: var(--neon-magenta);
}

/* Stylování dynamických holografických siluet budov na blueprintu (Bez koleček) */
.station-module-visual {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Klikatelný je pouze odznak */
    z-index: 5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.station-module-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Velikostní stupně (Stage 1 až Stage 7) s krokem po 5 levelech */
.station-module-visual.stage-1 { width: 34px; height: 34px; }
.station-module-visual.stage-2 { width: 39px; height: 39px; }
.station-module-visual.stage-3 { width: 44px; height: 44px; }
.station-module-visual.stage-4 { width: 49px; height: 49px; }
.station-module-visual.stage-5 { width: 54px; height: 54px; }
.station-module-visual.stage-6 { width: 59px; height: 59px; }
.station-module-visual.stage-7 { width: 66px; height: 66px; }

/* Přebarvovací filtry pro holografický styl */
/* Oranžový hologram (Lvl 1 - 9) */
.station-module-visual.status-construction img {
    filter: grayscale(100%) sepia(100%) saturate(600%) hue-rotate(340deg) brightness(0.85) opacity(0.8);
}

/* Zářivě tyrkysový hologram (Lvl 10 - 29) */
.station-module-visual.status-active img {
    filter: grayscale(100%) sepia(100%) saturate(1000%) hue-rotate(145deg) brightness(0.9);
}

/* Fialovo-růžový hologram (Lvl 30) */
.station-module-visual.status-max img {
    filter: grayscale(100%) sepia(100%) saturate(1200%) hue-rotate(260deg) brightness(1.0);
    animation: max-silhouette-glow 3s infinite ease-in-out;
}

@keyframes max-silhouette-glow {
    0% { filter: grayscale(100%) sepia(100%) saturate(1200%) hue-rotate(260deg) brightness(0.95); opacity: 0.9; }
    50% { filter: grayscale(100%) sepia(100%) saturate(1500%) hue-rotate(260deg) brightness(1.15); opacity: 1; }
    100% { filter: grayscale(100%) sepia(100%) saturate(1200%) hue-rotate(260deg) brightness(0.95); opacity: 0.9; }
}

/* Posunutí odznaků pod siluety budov, aby nepřekážely grafice */
.station-hotspot.shifted-badge {
    transform: translate(-50%, 32px);
}

.station-hotspot.shifted-badge:hover {
    transform: translate(-50%, 32px) scale(1.06);
    z-index: 20;
}

/* Ovládání Zoomu přímo v mapě */
.map-zoom-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.zoom-btn {
    width: 36px;
    height: 36px;
    background: rgba(11, 12, 16, 0.85);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    color: var(--neon-blue);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 1rem;
}

.zoom-btn:hover:not([disabled]) {
    background: var(--neon-blue);
    color: var(--bg-color);
    box-shadow: 0 0 10px var(--neon-blue-glow);
    border-color: var(--neon-blue);
}

/* Efekt skenovací linie radaru */
.map-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to bottom, rgba(102, 252, 241, 0) 0%, rgba(102, 252, 241, 0.4) 50%, rgba(102, 252, 241, 0) 100%);
    box-shadow: 0 0 8px rgba(102, 252, 241, 0.3);
    opacity: 0.6;
    z-index: 5;
    pointer-events: none;
    animation: scan 6s linear infinite;
}

/* Keyframes animace skenování */
@keyframes scan {
    0% {
        top: 0%;
    }
    100% {
        top: 100%;
    }
}

/* Keyframes pulzujících signálů planet */
@keyframes pulse-signal {
    0% {
        box-shadow: 0 0 0 0px rgba(102, 252, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(102, 252, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(102, 252, 241, 0);
    }
}

@keyframes pulse-signal-enemy {
    0% {
        box-shadow: 0 0 0 0px rgba(232, 67, 147, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(232, 67, 147, 0);
    }
    100% {
        box-shadow: 0 0 0 0px rgba(232, 67, 147, 0);
    }
}

/* ==========================================================================
   Galactic HUD & Cards Redesign
   ========================================================================== */

/* Animované vesmírné pozadí */
@keyframes slow-bg {
    0% { background-position: 0% 0%; }
    50% { background-position: 50% 100%; }
    100% { background-position: 0% 0%; }
}
body {
    background-size: 200% 200%;
    animation: slow-bg 90s linear infinite;
}

/* Glassmorphism panel přepsání pro standardní kontejnery */
section, .form-box, .map-sidebar-panel, .techtree-container {
    background: rgba(11, 12, 16, 0.75) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(102, 252, 241, 0.15) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(102, 252, 241, 0.05) !important;
    transition: border-color 0.3s, box-shadow 0.3s;
}
section:hover {
    border-color: rgba(102, 252, 241, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 15px rgba(102, 252, 241, 0.1) !important;
}

/* HUD Progress bary pro suroviny */
.hud-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
.hud-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width 0.5s ease-out, background-color 0.3s;
}
.hud-progress-bar.titan {
    background: var(--neon-blue);
    box-shadow: 0 0 8px var(--neon-blue);
}
.hud-progress-bar.helium3 {
    background: var(--color-helium3);
    box-shadow: 0 0 8px var(--color-helium3);
}
.hud-progress-bar.dark_matter {
    background: var(--color-dark-matter);
    box-shadow: 0 0 8px var(--color-dark-matter);
}

@keyframes hud-alert-pulse {
    0% { opacity: 0.6; box-shadow: 0 0 4px #ff5252; background-color: #ff5252; }
    50% { opacity: 1.0; box-shadow: 0 0 12px #ff3333; background-color: #ff3333; }
    100% { opacity: 0.6; box-shadow: 0 0 4px #ff5252; background-color: #ff5252; }
}
.hud-bar-warning {
    animation: hud-alert-pulse 1s infinite !important;
}

/* Mřížka pro budovy a jednotky */
.building-grid, .unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

/* Karta budovy (Building Card) */
.building-card {
    background: rgba(5, 8, 22, 0.85);
    border: 1px solid rgba(102, 252, 241, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    position: relative;
}
.building-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 15px rgba(102, 252, 241, 0.2);
}

/* Miniatura obrázku v kartě */
.card-banner {
    width: 100%;
    height: 105px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.building-card:hover .card-banner img {
    transform: scale(1.05);
}
.card-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(5, 8, 22, 0.95) 15%, rgba(0,0,0,0.3) 60%, transparent 100%);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 10px 15px;
    box-sizing: border-box;
}
.card-level-badge {
    background: rgba(102, 252, 241, 0.15);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-family: var(--font-heading);
    font-weight: bold;
    text-shadow: 0 0 5px var(--neon-blue-glow);
}
.card-level-badge.maxed {
    background: rgba(255, 215, 0, 0.15) !important;
    color: #ffd700 !important;
    border-color: #ffd700 !important;
    text-shadow: 0 0 5px rgba(255,215,0,0.5) !important;
}

/* Vnitřní obsah karty */
.card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 0 0 15px 0;
}

/* Náklady na upgrade v kartě */
.card-costs {
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 6px;
    padding: 10px;
    font-size: 0.78rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 15px;
}
.card-costs-full {
    grid-column: 1 / -1;
}
.cost-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Spodní tlačítko v kartě */
.card-action-container {
    width: 100%;
}
.card-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-decoration: none;
    border: none;
    border-radius: 0 0 8px 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.card-action-btn.upgrade-active {
    background: rgba(102, 252, 241, 0.08);
    color: var(--neon-blue);
    border-top: 1px solid rgba(102, 252, 241, 0.3);
}
.card-action-btn.upgrade-active:hover {
    background: var(--neon-blue);
    color: var(--bg-color);
    box-shadow: 0 -5px 15px var(--neon-blue-glow);
}
.card-action-btn.upgrade-locked {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    cursor: not-allowed;
}

/* Karta jednotky (Unit Card) */
.unit-card {
    background: rgba(5, 8, 22, 0.85);
    border: 1px solid rgba(232, 67, 147, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    position: relative;
}
.unit-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-magenta);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 15px rgba(232, 67, 147, 0.2);
}
.unit-card .card-banner {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.unit-card:hover .card-banner img {
    transform: scale(1.05);
}

/* Taktické vlastnosti lodi na kartě */
.unit-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding: 8px 5px;
    text-align: center;
    margin-bottom: 12px;
}
.unit-stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.72rem;
}
.unit-stat-mini span:first-child {
    font-size: 0.9rem;
    margin-bottom: 2px;
}
.unit-stat-mini span:last-child {
    font-weight: bold;
    color: white;
}

/* Rekrutační akční zóna */
.unit-recruit-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 15px 15px 15px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.03);
}

/* Progres fronty styly */
.front-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}
.front-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--neon-blue), var(--green-success));
    box-shadow: 0 0 10px var(--neon-blue-glow);
    transition: width 1s linear;
}

/* Mřížka a karty pro výzkum */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.research-card {
    background: rgba(5, 8, 22, 0.85);
    border: 1px solid rgba(102, 252, 241, 0.2);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    position: relative;
    min-height: 380px;
}

.research-card:hover {
    transform: translateY(-5px);
    border-color: var(--neon-blue);
    box-shadow: 0 15px 30px rgba(0,0,0,0.8), 0 0 15px rgba(102, 252, 241, 0.2);
}

.research-card:hover .card-banner img {
    transform: scale(1.05);
}

/* Responzivní přizpůsobení horního menu navigace */
@media (max-width: 1280px) {
    #main-header {
        justify-content: center;
        padding: 10px 20px;
    }
    #main-header nav {
        justify-content: center;
        width: 100%;
        gap: 8px 10px !important;
    }
    #main-header nav .btn {
        padding: 5px 8px !important;
        font-size: 0.78rem !important;
    }
}

@media (max-width: 768px) {
    #main-header {
        padding: 8px 10px;
    }
    #main-header nav {
        gap: 6px 8px !important;
    }
    #main-header nav .btn {
        padding: 4px 6px !important;
        font-size: 0.72rem !important;
    }
}

/* --- TRIDY PRO MULTIHERNI ROZCESTNIK --- */
.world-selection-section {
    max-width: 1100px;
    margin: 60px auto;
    padding: 0 20px;
}

.world-section-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    padding-bottom: 12px;
    margin-bottom: 30px;
    position: relative;
    letter-spacing: 1px;
}

.world-section-title.active-title {
    color: var(--neon-blue);
    border-bottom: 1px solid rgba(102, 252, 241, 0.2);
    text-shadow: 0 0 8px rgba(102, 252, 241, 0.15);
}

.world-section-title.expansion-title {
    color: #ba68c8;
    border-bottom: 1px solid rgba(186, 104, 200, 0.2);
    text-shadow: 0 0 8px rgba(186, 104, 200, 0.15);
}

.world-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

@media (max-width: 800px) {
    .world-selection-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

/* Glassmorphismus karty světů */
.game-world-card {
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.35), inset 0 0 15px rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    min-height: 310px;
    max-width: 560px;
    width: 100%;
    box-sizing: border-box;
}

.game-world-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    transition: background 0.3s ease;
}

/* Karta aktivního světa */
.game-world-card.active-world {
    border: 1px solid rgba(102, 252, 241, 0.15);
    background: linear-gradient(135deg, rgba(10, 15, 30, 0.5) 0%, rgba(102, 252, 241, 0.02) 100%);
}

.game-world-card.active-world::before {
    background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
}

.game-world-card.active-world:hover {
    transform: translateY(-6px);
    border-color: rgba(102, 252, 241, 0.4);
    box-shadow: 0 15px 35px rgba(102, 252, 241, 0.08), 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Karta světa k expanzi */
.game-world-card.expansion-world {
    border: 1px solid rgba(186, 104, 200, 0.15);
    background: linear-gradient(135deg, rgba(10, 15, 30, 0.5) 0%, rgba(186, 104, 200, 0.02) 100%);
}

.game-world-card.expansion-world::before {
    background: linear-gradient(90deg, transparent, #ba68c8, transparent);
}

.game-world-card.expansion-world:hover {
    transform: translateY(-6px);
    border-color: rgba(186, 104, 200, 0.4);
    box-shadow: 0 15px 35px rgba(186, 104, 200, 0.08), 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Badge pro aktivní misi */
.mission-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(102, 252, 241, 0.08);
    border: 1px solid rgba(102, 252, 241, 0.25);
    color: var(--neon-blue);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.8px;
    box-shadow: 0 0 8px rgba(102, 252, 241, 0.08);
    font-family: var(--font-heading);
}

/* Radarový pulzující bod */
.radar-pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--neon-blue);
    border-radius: 50%;
    margin-right: 5px;
    position: relative;
    vertical-align: middle;
}

.radar-pulse::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 12px;
    height: 12px;
    border: 1px solid var(--neon-blue);
    border-radius: 50%;
    animation: radar-pulse-anim 1.8s infinite ease-out;
}

@keyframes radar-pulse-anim {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.2); opacity: 0; }
}

.world-card-body {
    flex-grow: 1;
}

.world-card-title {
    margin: 0 0 12px 0;
    color: #ffffff;
    font-size: 1.3rem;
    font-family: var(--font-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}

.world-code-badge {
    font-size: 0.85rem;
    color: var(--neon-blue);
    font-family: monospace;
    font-weight: 400;
}

.world-card-desc {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 8px 0 18px 0;
    height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Detaily světa v mřížce */
.world-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0 20px 0;
}

.world-detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 8px 12px;
    border-radius: 8px;
}

.world-detail-item.detail-wide {
    grid-column: 1 / -1;
}

.world-detail-item .detail-icon {
    font-size: 1rem;
    color: var(--text-muted);
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.world-detail-item .detail-text {
    display: flex;
    flex-direction: column;
}

.world-detail-item .detail-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.world-detail-item .detail-value {
    font-size: 0.85rem;
    color: #ffffff;
    font-weight: 600;
}

.world-detail-item .detail-value.text-neon-blue {
    color: var(--neon-blue);
}

.world-detail-item .detail-value.text-neon-purple {
    color: #ba68c8;
}

.world-detail-item .coords-bracket {
    font-family: monospace;
    color: var(--neon-blue);
    font-size: 0.8rem;
    margin-left: 2px;
}

.btn-galaxy-enter {
    width: 100%;
    padding: 10px 0;
    font-size: 0.82rem;
}

.btn-galaxy-create {
    width: 100%;
    padding: 10px 0;
    font-size: 0.82rem;
    display: block;
}

.world-action-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* --- SCROLL INDICATOR --- */
.scroll-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 5;
    pointer-events: none;
}

.scroll-indicator .mouse {
    width: 20px;
    height: 32px;
    border: 2px solid rgba(102, 252, 241, 0.4);
    border-radius: 12px;
    display: block;
    position: relative;
}

.scroll-indicator .wheel {
    width: 2px;
    height: 6px;
    background: var(--neon-blue);
    border-radius: 1px;
    display: block;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel-anim 1.6s infinite ease-in-out;
}

@keyframes scroll-wheel-anim {
    0% { top: 6px; opacity: 0; }
    30% { opacity: 1; }
    80% { top: 18px; opacity: 0; }
    100% { top: 6px; opacity: 0; }
}

.scroll-indicator .arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-indicator .arrow span {
    display: block;
    width: 8px;
    height: 8px;
    border-bottom: 2px solid rgba(102, 252, 241, 0.5);
    border-right: 2px solid rgba(102, 252, 241, 0.5);
    transform: rotate(45deg);
    margin-top: -3px;
    animation: scroll-arrow-anim 1.6s infinite ease-in-out;
}

.scroll-indicator .arrow span:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes scroll-arrow-anim {
    0% { opacity: 0; transform: rotate(45deg) translate(-2px, -2px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(2px, 2px); }
}

/* --- NETWORK STATUS PANEL --- */
.network-status-panel {
    background: rgba(10, 15, 30, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(102, 252, 241, 0.12);
    border-radius: 16px;
    padding: 16px 24px;
    margin: 40px auto 20px auto;
    max-width: 1100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.status-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

.status-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

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

.status-dot.green {
    background: var(--green-success);
    box-shadow: 0 0 8px var(--green-success);
    animation: status-pulse-green 1.8s infinite;
}

@keyframes status-pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
    70% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.status-icon-cyan {
    color: var(--neon-blue);
    filter: drop-shadow(0 0 3px var(--neon-blue-glow));
}

.status-icon-purple {
    color: #ba68c8;
    filter: drop-shadow(0 0 3px rgba(186, 104, 200, 0.3));
}

.status-text strong {
    color: #ffffff;
}

.status-bulletin {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 6px 14px;
    border-radius: 8px;
    flex-grow: 1;
    max-width: 600px;
}

.bulletin-badge {
    background: rgba(232, 67, 147, 0.12);
    border: 1px solid rgba(232, 67, 147, 0.35);
    color: var(--neon-magenta);
    font-family: var(--font-heading);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: status-badge-pulse 2s infinite alternate;
}

@keyframes status-badge-pulse {
    0% { box-shadow: 0 0 5px rgba(232, 67, 147, 0.1); }
    100% { box-shadow: 0 0 10px rgba(232, 67, 147, 0.3); }
}

.bulletin-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* --- REDESIGN FEATURE KARET S HERNÍ GRAFIKOU --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
}

.features-grid .feature-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: rgba(10, 15, 30, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.features-grid .feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(102, 252, 241, 0.35);
    box-shadow: 0 15px 35px rgba(102, 252, 241, 0.1), 0 5px 15px rgba(0, 0, 0, 0.3);
}

.feature-image-wrapper {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.features-grid .feature-card:hover .feature-image {
    transform: scale(1.06);
}

.feature-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.features-grid .feature-icon {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--neon-blue);
    filter: drop-shadow(0 0 5px var(--neon-blue-glow));
    transition: transform 0.3s;
}

.features-grid .feature-card:hover .feature-icon {
    transform: scale(1.08);
}



