* {
    box-sizing: border-box
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: Inter, system-ui, Arial, sans-serif;
    background: #0b0e18;
    color: #e6e9f2;
    overflow: hidden
}

/* Menu */
#menu {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 24px;
    z-index: 5;
    overflow-y: auto;
    animation: fadeIn 0.5s ease-out
}

#menu h1 {
    margin: 8px 0 0;
    font-size: 36px;
    letter-spacing: 3px;
    background: linear-gradient(135deg, #3b7bff, #ec4899, #8b5cf6);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(59, 123, 255, 0.3);
    animation: gradientShift 3s ease infinite
}

#menu .menu-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 8px
}

/* === MAIN MENU SECTION === */
#mainMenu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 40px 20px;
    animation: fadeIn 0.5s ease-out
}

#mainMenu .subtitle {
    color: #7a819a;
    font-size: 16px;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase
}

.main-menu-buttons {
    margin: 20px 0
}

.play-btn {
    font-size: 24px;
    padding: 20px 60px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4)
}

.play-btn:hover {
    background: linear-gradient(135deg, #16a34a, #15803d);
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(34, 197, 94, 0.5)
}

.play-btn:active {
    transform: scale(0.98)
}

/* === SHIP SELECT SECTION === */
#shipSelect {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
    animation: slideUp 0.4s ease-out
}

#shipSelect h2 {
    font-size: 28px;
    color: #fff;
    margin: 0;
    text-align: center
}

.ship-select-buttons {
    display: flex;
    gap: 16px;
    margin-top: 16px
}

.ship-select-buttons #startBtn {
    font-size: 18px;
    padding: 14px 40px
}

#characters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: min(1000px, 95vw);
    margin-bottom: 16px
}

/* === NEW SHIP CARD STYLES === */
.ship-card {
    text-align: center;
    padding: 24px 20px;
    min-height: 320px
}

.ship-card .ship-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    border: 3px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease
}

.ship-card:hover .ship-icon {
    transform: scale(1.1);
    box-shadow: 0 0 30px currentColor
}

.ship-card .ship-emoji {
    font-size: 40px
}

.ship-card .ship-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 2px
}

.ship-card .ship-weapon {
    font-size: 13px;
    color: #a9b0c7;
    margin-bottom: 16px
}

.ship-card .ship-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px
}

.ship-card .ship-stat {
    display: flex;
    align-items: center;
    gap: 10px
}

.ship-card .stat-label {
    font-size: 12px;
    color: #a9b0c7;
    min-width: 90px;
    text-align: left
}

.ship-card .stat-bar-bg {
    flex: 1;
    height: 8px;
    background: #1a2033;
    border-radius: 4px;
    overflow: hidden
}

.ship-card .stat-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease
}

.ship-card .stat-value {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    min-width: 30px;
    text-align: right
}

.ship-card .ship-desc {
    font-size: 12px;
    color: #7a819a;
    line-height: 1.5;
    margin-bottom: 12px;
    min-height: 36px
}

.ship-card .ship-ultimate {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(99, 102, 241, 0.2));
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px
}

.ship-card .ultimate-label {
    color: #a78bfa;
    margin-right: 4px
}

.ship-card .ultimate-name {
    color: #fff;
    font-weight: 600
}

.card {
    background: linear-gradient(135deg, rgba(20, 24, 38, 0.9), rgba(26, 32, 51, 0.9));
    backdrop-filter: blur(10px);
    border: 1px solid #2a3354;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideUp 0.5s ease-out backwards;
    position: relative;
    overflow: hidden
}

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

.card:hover::before {
    left: 100%
}

.card:nth-child(1) {
    animation-delay: 0.1s
}

.card:nth-child(2) {
    animation-delay: 0.2s
}

.card:nth-child(3) {
    animation-delay: 0.3s
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    border-color: #3b7bff;
    box-shadow: 0 12px 30px rgba(59, 123, 255, 0.25), 0 0 60px rgba(59, 123, 255, 0.1) inset
}

.card.selected {
    border-color: #22d3ee;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3), 0 0 40px rgba(34, 211, 238, 0.1) inset
}

.card h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px
}

.card .ship-preview {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(59, 123, 255, 0.1);
    border: 2px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center
}

.card .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px
}

.card .stat-bar {
    display: flex;
    flex-direction: column;
    gap: 4px
}

.card .stat-bar label {
    font-size: 10px;
    color: #7a819a;
    text-transform: uppercase;
    letter-spacing: 0.5px
}

.card .stat-bar .bar-container {
    height: 6px;
    background: #1a2033;
    border-radius: 3px;
    overflow: hidden
}

.card .stat-bar .bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease
}

.card .weapon-info {
    background: rgba(59, 123, 255, 0.1);
    border: 1px solid rgba(59, 123, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px
}

.card .weapon-info .weapon-icon {
    font-size: 18px
}

.row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.stat {
    background: #1a2033;
    border: 1px solid #2a3354;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    color: #a9b0c7
}

.desc {
    font-size: 12px;
    color: #7a819a;
    line-height: 1.4
}

/* Buttons */
button {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #3b7bff;
    background: linear-gradient(135deg, #1a2033, #141826);
    color: #e6e9f2;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease
}

button:hover::after {
    width: 200%;
    height: 200%
}

button:hover {
    background: linear-gradient(135deg, #3b7bff, #6366f1);
    border-color: #6366f1;
    transform: scale(1.02)
}

button:active {
    transform: scale(0.98)
}

#startBtn {
    font-size: 18px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3b7bff, #6366f1);
    border: none;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase
}

#startBtn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4)
}

.menu-btn {
    padding: 8px 16px;
    font-size: 13px;
    background: transparent;
    border: 1px solid #3a4366
}

.menu-btn:hover {
    background: rgba(59, 123, 255, 0.1);
    border-color: #3b7bff
}

/* Wallet */
#walletStub {
    display: flex;
    gap: 10px;
    align-items: center
}

#connectWallet {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #22d3ee;
    background: transparent;
    color: #22d3ee
}

#connectWallet:hover {
    background: #22d3ee22
}

#bpInfo {
    font-size: 12px;
    color: #22d3ee
}

/* Game canvas */
#game {
    position: absolute;
    inset: 0;
    z-index: 1
}

/* HUD */
#hud {
    position: absolute;
    top: 10px;
    left: 12px;
    right: 12px;
    display: none;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    z-index: 6
}

#bars {
    display: flex;
    gap: 10px
}

#hpBar,
#xpBar {
    width: 200px;
    height: 16px;
    background: #1a2033;
    border: 1px solid #2a3354;
    border-radius: 10px;
    overflow: hidden;
    position: relative
}

#hpBar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #ff3b3b, #ff6b6b);
    width: 100%;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(255, 59, 59, 0.5)
}

#xpBar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b7bff, #6366f1);
    width: 0%;
    transition: width 0.2s ease;
    box-shadow: 0 0 10px rgba(59, 123, 255, 0.5)
}

#stats {
    display: flex;
    gap: 12px;
    font-size: 14px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    align-items: center
}

#audioBtn {
    pointer-events: auto;
    padding: 6px 10px;
    font-size: 16px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a2033, #141826);
    border: 1px solid #3b7bff;
    cursor: pointer
}

#audioBtn:hover {
    background: linear-gradient(135deg, #3b7bff, #6366f1)
}

/* Audio Panel */
#audioPanel {
    min-width: 280px
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px
}

.vol-control {
    display: flex;
    align-items: center;
    gap: 12px
}

.vol-control label {
    min-width: 80px;
    font-size: 14px;
    color: #a9b0c7
}

.vol-control input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #2a3354;
    appearance: none;
    cursor: pointer
}

.vol-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b7bff, #6366f1);
    border: 2px solid #fff;
    cursor: pointer
}

.vol-control span {
    min-width: 40px;
    font-size: 12px;
    color: #7a819a;
    text-align: right
}

/* Panels */
.panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(20, 24, 38, 0.95), rgba(26, 32, 51, 0.95));
    backdrop-filter: blur(20px);
    border: 1px solid #2a3354;
    border-radius: 20px;
    padding: 24px;
    display: none;
    z-index: 10;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    animation: panelAppear 0.3s ease-out
}

.panel h2 {
    margin: 0 0 16px;
    text-align: center;
    font-size: 24px;
    color: #fff
}

#overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    z-index: 9;
    animation: fadeIn 0.2s ease-out
}

/* Choices */
#choices,
#chestItems {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    width: min(800px, 90vw)
}

.choice {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 1px solid #2a3354;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease
}

.choice:hover {
    border-color: #3b7bff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 123, 255, 0.2)
}

.choice h4 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 15px
}

.choice p {
    margin: 0;
    color: #7a819a;
    font-size: 12px
}

#continue,
#closeChest {
    margin-top: 14px;
    padding: 10px 18px
}

/* Pause Menu */
#pauseMenu {
    text-align: center
}

.pause-content {
    margin: 16px 0;
    text-align: left
}

.pause-content h3 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #7a819a;
    text-transform: uppercase;
    letter-spacing: 1px
}

.controls-list {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.control-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #a9b0c7
}

.key {
    background: #242c46;
    border: 1px solid #3a4366;
    border-radius: 6px;
    padding: 4px 10px;
    font-family: monospace;
    font-size: 11px;
    color: #fff
}

/* Game Over */
#gameover {
    text-align: center
}

#endText {
    margin: 16px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #a9b0c7
}

/* Tutorial Panel */
.tutorial-panel {
    max-width: 600px;
    text-align: center;
    padding: 30px
}

.tutorial-panel h2 {
    margin-bottom: 20px;
    font-size: 28px
}

.tutorial-step {
    padding: 24px;
    background: linear-gradient(135deg, rgba(59, 123, 255, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 123, 255, 0.3);
    border-radius: 16px;
    margin-bottom: 20px
}

.tutorial-step h3 {
    font-size: 24px;
    margin: 0 0 16px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px
}

.tutorial-step p {
    color: #a9b0c7;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto
}

.tutorial-step .key-demo {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0 0
}

.tutorial-step .key-demo .key {
    font-size: 14px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #242c46, #1a2033);
    border: 1px solid #3b7bff;
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(59, 123, 255, 0.2);
    transition: all 0.2s ease
}

.tutorial-step .key-demo .key:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 123, 255, 0.3)
}

.tutorial-progress {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0
}

.tutorial-progress .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2a3354;
    transition: all 0.3s ease;
    cursor: pointer
}

.tutorial-progress .dot.active {
    background: linear-gradient(135deg, #3b7bff, #8b5cf6);
    box-shadow: 0 0 15px rgba(59, 123, 255, 0.6);
    transform: scale(1.2)
}

.tutorial-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 10px
}

.tutorial-buttons button {
    min-width: 140px;
    padding: 12px 24px;
    font-size: 15px
}

/* Bestiary Panel */
.bestiary-panel {
    max-width: 950px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px
}

.bestiary-panel h2 {
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center
}

#bestiaryList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 8px
}

#bestiaryList::-webkit-scrollbar {
    width: 8px
}

#bestiaryList::-webkit-scrollbar-track {
    background: #1a2033;
    border-radius: 4px
}

#bestiaryList::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b7bff, #8b5cf6);
    border-radius: 4px
}

.bestiary-card {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 1px solid #2a3354;
    border-radius: 16px;
    padding: 16px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden
}

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

.bestiary-card:hover::before {
    left: 100%
}

.bestiary-card:hover {
    border-color: #3b7bff;
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(59, 123, 255, 0.2)
}

.bestiary-card.locked {
    opacity: 0.4;
    filter: grayscale(0.9)
}

.bestiary-card.locked:hover {
    transform: none;
    border-color: #2a3354
}

.bestiary-card .enemy-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px
}

.bestiary-card .enemy-sprite {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px
}

.bestiary-card .enemy-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff
}

.bestiary-card .enemy-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600
}

.bestiary-card .enemy-stats {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap
}

.bestiary-card .enemy-stats span {
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    color: #a9b0c7;
    border: 1px solid #2a3354
}

.bestiary-card .kill-count {
    font-size: 13px;
    color: #22d3ee;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 10px;
    font-weight: 600
}

.bestiary-card .enemy-desc {
    font-size: 12px;
    color: #7a819a;
    line-height: 1.5;
    margin-top: 10px
}

/* Responsive Bestiary */
@media (max-width: 900px) {
    #bestiaryList {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto
    }
}

/* Mini-Map */
#minimap-container {
    position: absolute;
    top: 50px;
    right: 12px;
    width: 140px;
    height: 140px;
    z-index: 7;
    pointer-events: none;
    display: none
}

#minimap {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(10, 15, 26, 0.8);
    border: 2px solid #2a3354;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 30px rgba(59, 123, 255, 0.1) inset
}

.minimap-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #7a819a;
    text-transform: uppercase;
    letter-spacing: 1px
}

/* Game Mode Panel */
.modes-panel {
    max-width: 1000px;
    max-height: 85vh;
    overflow-y: auto
}

.modes-panel h2 {
    margin-bottom: 20px
}

#modesList {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px
}

.mode-card {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 1px solid #2a3354;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px
}

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

.mode-card:hover::before {
    left: 100%
}

.mode-card:hover {
    border-color: #3b7bff;
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(59, 123, 255, 0.3)
}

.mode-card.selected {
    border-color: #22d3ee;
    background: linear-gradient(135deg, #1a2033, #142330);
    box-shadow: 0 0 25px rgba(34, 211, 238, 0.25)
}

.mode-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.6)
}

.mode-card.locked:hover {
    transform: none;
    border-color: #2a3354
}

/* Mode Card Header */
.mode-card .mode-header {
    display: flex;
    align-items: center;
    gap: 14px
}

.mode-card .mode-icon {
    font-size: 48px;
    line-height: 1
}

.mode-card .mode-title {
    flex: 1
}

.mode-card .mode-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px
}

.mode-card .mode-difficulty {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px
}

/* Mode Description */
.mode-card .mode-desc {
    font-size: 13px;
    color: #a9b0c7;
    line-height: 1.5
}

/* Mode Features List */
.mode-card .mode-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px
}

.mode-card .mode-features li {
    font-size: 12px;
    color: #7a819a;
    padding-left: 0
}

/* Mode Extras */
.mode-card .mode-highscore {
    font-size: 12px;
    color: #facc15;
    background: rgba(250, 204, 21, 0.1);
    border: 1px solid rgba(250, 204, 21, 0.3);
    border-radius: 8px;
    padding: 6px 10px;
    text-align: center
}

.mode-card .mode-daily-info {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 8px;
    background: rgba(236, 72, 153, 0.1);
    border: 1px solid rgba(236, 72, 153, 0.3);
    border-radius: 8px
}

.mode-card .mode-daily-info.played {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3)
}

.mode-card .mode-daily-info .daily-date {
    color: #ec4899
}

.mode-card .mode-daily-info .daily-status {
    color: #22c55e
}

.mode-card .mode-locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ef4444;
    font-weight: 600
}

/* Responsive Mode Cards */
@media (max-width: 900px) {
    #modesList {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto 16px
    }
}

/* Challenge Cards */
.challenge-card {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 1px solid #2a3354;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left
}

.challenge-card:hover {
    border-color: #f97316;
    transform: translateY(-2px)
}

.challenge-card.completed {
    border-color: #22c55e;
    background: linear-gradient(135deg, #1a2033, #0f291a)
}

.challenge-card .challenge-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px
}

.challenge-card .challenge-icon {
    font-size: 24px
}

.challenge-card .challenge-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff
}

.challenge-card .challenge-desc {
    font-size: 12px;
    color: #7a819a;
    line-height: 1.4
}

.challenge-card .challenge-status {
    font-size: 11px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px
}

.challenge-card .challenge-status.completed {
    color: #22c55e
}

.challenge-card .challenge-status.locked {
    color: #7a819a
}

/* Wave Counter HUD */
#waveCounter {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 7;
    display: none;
    padding: 8px 20px;
    background: rgba(20, 24, 38, 0.8);
    border: 1px solid #3b7bff;
    border-radius: 20px;
    backdrop-filter: blur(10px)
}

#waveCounter.wave-incoming {
    animation: pulse 0.5s ease infinite
}

/* Daily Challenge Banner */
.daily-banner {
    background: linear-gradient(135deg, #7c3aed, #6366f1);
    border: none;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: center
}

.daily-banner .daily-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px
}

.daily-banner .daily-seed {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace
}

.daily-banner.played {
    background: linear-gradient(135deg, #374151, #1f2937);
    opacity: 0.7
}

.daily-banner.played::after {
    content: '✓ Ma már játszottál';
    display: block;
    font-size: 12px;
    color: #22c55e;
    margin-top: 8px
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px)
    }

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

@keyframes panelAppear {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9)
    }

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

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%
    }

    50% {
        background-position: 100% 50%
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(255, 59, 59, 0.5)
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 59, 59, 0.8), 0 0 30px rgba(255, 59, 59, 0.4)
    }
}

@keyframes glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px currentColor)
    }

    50% {
        filter: drop-shadow(0 0 15px currentColor)
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-5px)
    }
}

@keyframes radarSweep {
    from {
        transform: rotate(0deg)
    }

    to {
        transform: rotate(360deg)
    }
}

/* Responsive */
@media(max-width:600px) {

    #hpBar,
    #xpBar {
        width: 120px;
        height: 12px
    }

    #stats {
        font-size: 12px;
        gap: 8px
    }

    .card {
        padding: 12px
    }

    #characters {
        grid-template-columns: 1fr
    }

    .choice {
        padding: 10px
    }

    #minimap-container {
        width: 100px;
        height: 100px;
        top: 36px
    }

    .bestiary-panel {
        max-width: 95vw
    }

    #bestiaryList {
        grid-template-columns: 1fr
    }
}

/* ========== SHIP CUSTOMIZATION PANEL ========== */
.customization-panel {
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto
}

.customize-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #2a3354
}

.customize-section:last-of-type {
    border-bottom: none
}

.customize-section h3 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #a9b0c7;
    text-transform: uppercase;
    letter-spacing: 1px
}

/* Skin Grid */
.skin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px
}

.skin-card {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 2px solid #2a3354;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease
}

.skin-card:hover {
    border-color: #3b7bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 123, 255, 0.2)
}

.skin-card.selected {
    border-color: #22d3ee;
    background: linear-gradient(135deg, #1a2033, #162238);
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.3)
}

.skin-card .skin-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px
}

.skin-card .skin-name {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px
}

.skin-card .skin-desc {
    font-size: 10px;
    color: #7a819a
}

/* Contrail Grid */
.contrail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px
}

.contrail-card {
    background: linear-gradient(135deg, #1a2033, #242c46);
    border: 2px solid #2a3354;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden
}

.contrail-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--trail-color-1), var(--trail-color-2), var(--trail-color-3));
    opacity: 0.7
}

.contrail-card:hover {
    border-color: #3b7bff;
    transform: scale(1.02)
}

.contrail-card.selected {
    border-color: #22d3ee;
    box-shadow: 0 0 15px rgba(34, 211, 238, 0.25)
}

.contrail-card .contrail-icon {
    font-size: 18px;
    margin-bottom: 4px
}

.contrail-card .contrail-name {
    font-size: 11px;
    font-weight: 600;
    color: #fff
}

/* Color Pickers */
.color-pickers {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center
}

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

.color-picker label {
    font-size: 12px;
    color: #a9b0c7
}

.color-picker input[type="color"] {
    width: 50px;
    height: 50px;
    border: 2px solid #3a4366;
    border-radius: 10px;
    cursor: pointer;
    background: transparent;
    padding: 2px
}

.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0
}

.color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px
}

.color-picker input[type="color"]:hover {
    border-color: #3b7bff;
    transform: scale(1.05)
}

/* Preview */
.customize-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    padding: 16px;
    background: rgba(10, 15, 26, 0.6);
    border-radius: 12px;
    border: 1px solid #2a3354
}

.customize-preview canvas {
    border-radius: 50%;
    background: radial-gradient(circle, #0d1220 0%, #050810 100%);
    border: 2px solid #3a4366;
    box-shadow: 0 0 20px rgba(59, 123, 255, 0.2) inset
}

.customize-preview span {
    font-size: 11px;
    color: #7a819a;
    text-transform: uppercase;
    letter-spacing: 1px
}

/* ========== SECTOR HUD (Campaign Mode) ========== */
#sectorHud {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    text-align: center;
    pointer-events: none
}

#sectorHud .sector-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    margin-bottom: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, rgba(20, 24, 38, 0.85), rgba(30, 36, 58, 0.85));
    backdrop-filter: blur(10px);
    border: 1px solid #3a4366;
    border-radius: 25px;
    letter-spacing: 0.5px
}

#sectorHud .sector-name.boss-warning {
    color: #ef4444;
    animation: bossWarningPulse 0.8s ease-in-out infinite;
    border-color: #ef4444
}

@keyframes bossWarningPulse {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
        transform: scale(1.02);
    }
}

.sector-progress {
    width: 200px;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid #3a4366
}

.sector-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #3b82f6, #22d3ee);
    border-radius: 3px;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.5)
}

/* Sector transition animation */
@keyframes sectorTransition {
    0% {
        opacity: 0;
        transform: translateX(-50%) scale(0.9);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
    }

    100% {
        transform: translateX(-50%) scale(1);
    }
}

#sectorHud.sector-transition {
    animation: sectorTransition 0.5s ease-out
}

/* ========== RESPONSIVE SHIP CARDS ========== */
@media (max-width: 900px) {
    #characters {
        grid-template-columns: 1fr;
        max-width: 400px
    }

    .ship-card {
        min-height: auto;
        padding: 20px 16px
    }

    .ship-card .ship-icon {
        width: 60px;
        height: 60px
    }

    .ship-card .ship-emoji {
        font-size: 30px
    }

    .ship-card .ship-name {
        font-size: 20px
    }
}

/* ========== IMPROVED MENU BUTTONS ========== */
.menu-buttons {
    margin-bottom: 16px
}

.menu-btn {
    font-size: 14px;
    padding: 10px 18px;
    transition: all 0.3s ease
}

.menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 123, 255, 0.3)
}