:root {
    --bg-main: #1C222E;
    /* Main dark background */
    --bg-panel: #242D3C;
    /* Slightly lighter for top bar / panels */
    --bg-darker: #151A22;
    /* Darkest for grid background */
    --text-main: #ffffff;
    --text-muted: #8B9AB0;
    --accent-blue: #00B4F0;
    /* Bright cyan from the image */
    --accent-glow: rgba(0, 180, 240, 0.4);
    --border-color: #2F3B4E;

    --sky-color: #79D1F9;
    --mountain-color: #8EB7D5;
    --pier-color: #4A2824;
    /* Dark wood */
    --water-color: #1F67FF;
    /* Bright blue water */

    --grid-bg: #121820;
    /* Very dark for the slots */
    --grid-border: #1E2734;

    --grass-bg: #4caf50;
    --grass-dark: #388e3c;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    user-select: none;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    position: relative;
}

/* SCREEN MANAGEMENT */
.screen {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
}

.screen.active {
    display: flex;
}

.hidden {
    display: none !important;
}

/* BUTTONS COMMON */
.primary-btn {
    background: linear-gradient(180deg, #00C6FF 0%, #0099EA 100%);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 180, 240, 0.4);
    transition: transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.primary-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 180, 240, 0.3);
}

.small-btn {
    padding: 10px 24px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 180, 240, 0.3);
}

.battlepass-btn {
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    color: #111;
}

.battlepass-btn:active {
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

.battlepass-icon-btn {
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    color: #111;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
    transition: transform 0.1s;
}

.battlepass-icon-btn:active {
    transform: translateY(2px);
}

/* ------------------------------------- */
/* TITLE SCREEN */
/* ------------------------------------- */
#title-screen {
    background-color: var(--bg-main);
    background-image:
        radial-gradient(circle at center, rgba(0, 180, 240, 0.1) 0%, transparent 60%),
        linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-main) 100%);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.title-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    animation: floatTitle 3s ease-in-out infinite;
}

@keyframes floatTitle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.title-logo {
    font-size: 80px;
    font-weight: 900;
    color: white;
    letter-spacing: 4px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.title-logo i {
    color: var(--accent-blue);
    font-size: 90px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

/* ------------------------------------- */
/* HUB SCREEN - GRASS OVERHAUL */
/* ------------------------------------- */
#hub-screen {
    background-color: var(--grass-bg);
    background-image:
        radial-gradient(var(--grass-dark) 15%, transparent 16%),
        radial-gradient(var(--grass-dark) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    overflow: hidden;
}

/* Hub Borders (Houses/Fences) */
.hub-border {
    position: absolute;
    background-color: #6d4c41;
    /* Brown roof color */
    z-index: 5;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.2) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.2) 2px, transparent 2px);
    background-size: 20px 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(0, 0, 0, 0.6);
}

/* Hub Boundaries by Zone */
body[data-zone="1"] .hub-border {
    background-color: #6d4c41;
}

body[data-zone="2"] .hub-border {
    background-color: #455a64;
}

/* Stone/River edges */
body[data-zone="3"] .hub-border {
    background-color: #1a237e;
}

/* Deep sea coral/walls */

.border-top {
    top: 0;
    left: 0;
    right: 0;
    height: 10%;
    border-bottom: 4px solid rgba(0, 0, 0, 0.5);
}

.border-bottom {
    bottom: 0;
    left: 0;
    right: 0;
    height: 10%;
    border-top: 4px solid rgba(0, 0, 0, 0.5);
}

.border-left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 10%;
    border-right: 4px solid rgba(0, 0, 0, 0.5);
}

.border-right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 10%;
    border-left: 4px solid rgba(0, 0, 0, 0.5);
}

/* Hub Fountain colors by Zone */
body[data-zone="1"] .fountain-water {
    background-color: #1F67FF;
}

body[data-zone="2"] .fountain-water {
    background-color: #00bcd4;
}

body[data-zone="3"] .fountain-water {
    background-color: #6200ea;
}

.hub-fountain {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 15%;
    aspect-ratio: 1;
    z-index: 8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fountain-base {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: #9e9e9e;
    /* Stone color */
    border-radius: 50%;
    border: 4px solid #757575;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.fountain-water {
    position: absolute;
    width: 80%;
    height: 80%;
    background-color: var(--water-color);
    border-radius: 50%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 15px 15px;
    animation: waterMove 5s linear infinite;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.fountain-ripple {
    position: absolute;
    width: 40%;
    height: 40%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    animation: ripplePulse 2s infinite ease-out;
}

@keyframes ripplePulse {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Hub UI Container */
.hub-ui-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 24px;
}

.hub-top-bar {
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hub-player-info {
    background-color: var(--bg-panel);
    border: 2px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 12px;
    display: flex;
    gap: 24px;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hub-level-tag {
    font-weight: 800;
    color: var(--accent-blue);
    font-size: 14px;
}

.hub-coins {
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-coins i {
    color: #FFCD00;
}

.hub-actions {
    display: flex;
    gap: 16px;
}

.hub-instructions {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    backdrop-filter: blur(4px);
    align-self: center;
    pointer-events: auto;
}

/* Hub Shops */
.hub-shop {
    position: absolute;
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s;
}

.hub-shop:hover {
    transform: scale(1.1);
}

.hub-shop.market {
    top: 15%;
    right: 15%;
}

.hub-shop.lab {
    bottom: 15%;
    left: 15%;
}

.shop-sign {
    background: #282a36;
    color: #50fa7b;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    margin-bottom: 4px;
    border: 1px solid #50fa7b;
    white-space: nowrap;
}

.lab .shop-sign {
    color: #bd93f9;
    border-color: #bd93f9;
}

.shop-building {
    width: 40px;
    height: 40px;
    background: #44475a;
    border: 3px solid #6272a4;
    border-radius: 4px;
    position: relative;
}

.market .shop-building {
    background: #50fa7b22;
    border-color: #50fa7b;
}

.lab .shop-building {
    background: #bd93f922;
    border-color: #bd93f9;
}

/* Shop Modals */
.shop-modal {
    max-width: 600px;
    width: 90%;
}

.market-actions {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.sell-all-btn {
    padding: 12px 30px;
    font-size: 16px;
    background: linear-gradient(180deg, #50fa7b 0%, #44bd65 100%);
}

.market-inventory,
.lab-inventory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
}

.shop-item-card {
    background: #44475a;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid #6272a4;
}

.shop-item-icon {
    font-size: 24px;
}

.shop-item-name {
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    min-height: 32px;
}

.shop-item-val {
    font-size: 11px;
    color: #FFCD00;
}

.lab-desc {
    text-align: center;
    margin-bottom: 20px;
    color: #bd93f9;
    font-size: 14px;
}

.hub-viewport {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
}

.character {
    position: absolute;
    width: 40px;
    height: 40px;
    background-color: var(--accent-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: white;
}

.character .name-tag {
    position: absolute;
    top: -30px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    pointer-events: none;
}

.character.bot {
    background-color: #ff79c6;
    cursor: pointer;
    transition: transform 0.1s;
}

.character.bot:hover {
    transform: translate(-50%, -50%) scale(1.1);
    border-color: #FFCD00;
    z-index: 16;
}

.character.player {
    z-index: 15;
}

/* Modal Shared Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 50;
    pointer-events: auto;
    opacity: 1;
    transition: opacity 0.2s;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--bg-panel);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background-color: var(--bg-main);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

.close-modal-btn,
.close-bp-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
}

.close-modal-btn:hover,
.close-bp-btn:hover {
    color: white;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.trade-offer-text {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    background-color: var(--bg-darker);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.trade-action-area {
    display: flex;
    gap: 16px;
}

.trade-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: transform 0.1s;
}

.trade-btn:active {
    transform: translateY(2px);
}

.trade-btn.accept {
    background-color: #50fa7b;
    color: #111;
}

.trade-btn.accept:hover {
    background-color: #69ff90;
}

.trade-btn.accept:disabled {
    background-color: #2F3B4E;
    color: #8B9AB0;
    cursor: not-allowed;
}

.trade-btn.decline {
    background-color: var(--bg-darker);
    color: white;
    border: 1px solid var(--border-color);
}

.trade-btn.decline:hover {
    background-color: var(--grid-border);
}

/* BATTLEPASS STYLES */
.bp-modal-content {
    width: 600px;
    height: 80vh;
}

.bp-header h2 i {
    color: #FFCD00;
}

.bp-progress-area {
    padding: 20px 24px;
    background-color: var(--bg-darker);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.bp-level-info {
    font-size: 18px;
    font-weight: 800;
}

.bp-lvl {
    color: #FFCD00;
    font-size: 24px;
}

.bp-desc {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.bp-tiers-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bp-tier {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 20px;
    transition: border-color 0.2s;
}

.bp-tier.unlocked {
    border-color: #FFCD00;
    background-image: linear-gradient(90deg, rgba(255, 215, 0, 0.05) 0%, transparent 100%);
}

.bp-tier.claimed {
    opacity: 0.5;
    border-color: #50fa7b;
    background-color: rgba(80, 250, 123, 0.05);
}

.bp-tier-level {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-muted);
    width: 50px;
    text-align: center;
}

.bp-tier.unlocked .bp-tier-level {
    color: #FFCD00;
}

.bp-tier-reward {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bp-tier-icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    background-color: var(--bg-darker);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--grid-border);
}

.bp-reward-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bp-reward-name {
    font-size: 14px;
    font-weight: 800;
}

.bp-tier-action {
    flex-shrink: 0;
}

.bp-claim-btn {
    background-color: #FFCD00;
    color: #111;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 900;
    cursor: pointer;
    font-size: 12px;
    transition: transform 0.1s;
}

.bp-claim-btn:active {
    transform: translateY(2px);
}

.bp-claim-btn:disabled {
    background-color: var(--bg-darker);
    color: var(--text-muted);
    cursor: not-allowed;
    border: 1px solid var(--border-color);
}

.bp-tier.claimed .bp-claim-btn {
    background-color: transparent;
    color: #50fa7b;
    border: none;
    font-size: 14px;
}

/* ------------------------------------- */
/* FISHING SCREEN (Existing CSS below) */
/* ------------------------------------- */
/* TOP BAR */
.back-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
    transition: color 0.2s;
}

.back-btn:hover {
    color: white;
}

.top-bar {
    height: 56px;
    background-color: var(--bg-panel);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 24px;
    flex-shrink: 0;
}

.logo {
    font-weight: 900;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    letter-spacing: 0.5px;
}

.logo i {
    color: var(--accent-blue);
    font-size: 20px;
}

.level-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: 16px;
}

.level-text {
    font-size: 12px;
    font-weight: 800;
    color: var(--accent-blue);
    text-transform: uppercase;
}

.progress-bar-bg {
    width: 160px;
    height: 6px;
    background-color: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background-color: #4A5B72;
    transition: width 0.3s ease-out;
}

.progress-bar-fill.active-prog {
    background-color: var(--text-muted);
    /* Changes as it fills */
}

.coins-container {
    background-color: var(--bg-darker);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
    margin-left: 8px;
    transition: all 0.2s;
}

.coins-container.pop {
    animation: pop 0.3s ease-out;
}

.coins-container i {
    color: #FFCD00;
    /* Yellow coin color */
    font-size: 14px;
}

.top-right-controls {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.catch-message {
    font-weight: 800;
    color: #50fa7b;
    font-size: 13px;
    opacity: 1;
    transition: opacity 0.5s;
    text-shadow: 0 0 10px rgba(80, 250, 123, 0.5);
}

.catch-message.hidden {
    opacity: 0;
}

.auto-fish-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.auto-fish-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.auto-fish-btn.active {
    color: var(--text-main);
    border-color: var(--accent-blue);
    background-color: rgba(0, 180, 240, 0.1);
}

.settings-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.settings-btn:hover {
    color: var(--text-main);
}

/* ZONES OVERRIDES */
body[data-zone="2"] .sky {
    background-color: #00838f;
}

body[data-zone="2"] .water {
    background-color: #00bcd4;
}

body[data-zone="2"] #hub-screen {
    background-color: #006064;
}

/* swampy */
body[data-zone="2"] .mountain {
    border-bottom-color: #4dd0e1;
}

body[data-zone="3"] .sky {
    background-color: #1a237e;
}

body[data-zone="3"] .water {
    background-color: #311b92;
}

body[data-zone="3"] #hub-screen {
    background-color: #000051;
}

/* deep dark */
body[data-zone="3"] .mountain {
    border-bottom-color: #4527a0;
}

/* MAIN LAYOUT */
.main-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* SCENE */
.scene-container {
    flex: 0 0 45%;
    /* Fixed ratio based on image */
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.sky {
    flex: 1;
    background-color: var(--sky-color);
    position: relative;
    display: flex;
    align-items: flex-end;
}

.mountains {
    width: 100%;
    height: 80px;
    position: relative;
    display: flex;
}

.mountain {
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 70px solid var(--mountain-color);
    position: absolute;
    bottom: 0;
}

.m1 {
    left: 4%;
    border-bottom-width: 50px;
}

.m2 {
    left: 24%;
    border-bottom-width: 65px;
}

.m3 {
    left: 45%;
    border-bottom-width: 45px;
}

.m4 {
    left: 63%;
    border-bottom-width: 85px;
}

.m5 {
    right: 5%;
    border-bottom-width: 55px;
}

.pier {
    height: 48px;
    background-color: var(--pier-color);
    width: 100%;
    position: relative;
    border-top: 1px solid rgba(0, 0, 0, 0.2);
    border-bottom: 2px solid rgba(0, 0, 0, 0.4);
    background-image: repeating-linear-gradient(90deg,
            transparent,
            transparent 15.8%,
            rgba(0, 0, 0, 0.3) 15.8%,
            rgba(0, 0, 0, 0.3) 16%);
}

.water {
    height: 180px;
    background-color: var(--water-color);
    width: 100%;
    position: relative;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 80px 45px;
    animation: waterMove 15s linear infinite;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fishing-float {
    width: 14px;
    height: 14px;
    background-color: #ff3b30;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3), inset 0 -4px 0 rgba(0, 0, 0, 0.3);
    position: absolute;
    animation: bobbing 1s ease-in-out infinite;
    top: 50%;
    left: 45%;
}

.fishing-float.hidden {
    display: none;
}

.fishing-float.nibble {
    animation: nibble 0.2s ease-in-out infinite;
    background-color: #ffcc00;
}

/* BOTTOM PANEL */
.bottom-panel {
    flex: 1;
    background-color: var(--bg-panel);
    display: flex;
    flex-direction: column;
    padding: 20px 24px 20px 24px;
    overflow: hidden;
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    flex-shrink: 0;
}

.tabs {
    display: flex;
    gap: 32px;
    margin-left: 8px;
}

.tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.tab i {
    font-size: 14px;
}

.tab:hover {
    color: var(--text-main);
}

.tab.active {
    background-color: var(--accent-blue);
    color: white;
    box-shadow: 0 0 15px var(--accent-glow);
}

.cast-btn {
    background: linear-gradient(180deg, #00C6FF 0%, #0099EA 100%);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(0, 180, 240, 0.3);
    transition: transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cast-btn i {
    font-size: 14px;
}

.cast-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 10px rgba(0, 180, 240, 0.3);
}

.cast-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: var(--bg-darker);
    color: var(--text-muted);
    box-shadow: none;
}

.panel-content {
    flex: 1;
    background-color: var(--bg-darker);
    border-radius: 8px;
    border: 1px solid var(--grid-border);
    padding: 4px;
    overflow-y: auto;
    position: relative;
}

.view {
    display: none;
    height: 100%;
}

.view.active {
    display: block;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 4px;
    padding: 4px;
}

.slot {
    aspect-ratio: 1 / 1.1;
    background-color: var(--grid-bg);
    border: 1px solid var(--grid-border);
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    transition: transform 0.2s, border-color 0.2s, background-color 0.2s;
    overflow: hidden;
}

.slot:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.03);
}

.slot.empty {
    color: rgba(255, 255, 255, 0.05);
    font-size: 18px;
    font-weight: 800;
}

.slot-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    padding: 12px;
}

.slot-item-icon {
    font-size: 32px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.slot-item-icon.unknown {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.05);
    font-weight: 800;
    filter: none;
}

.slot-item-name {
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slot-item-name.unknown {
    display: none;
}

.slot-item-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 800;
    color: white;
}

/* RIGHT PANEL (UPGRADES & RODS) */
.right-panel {
    width: 300px;
    background-color: var(--bg-panel);
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.panel-title {
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 900;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    background-color: var(--bg-main);
}

.panel-title::before {
    content: '\f0aa';
    font-family: 'Font Awesome 6 Free';
    color: var(--accent-blue);
}

.upgrades-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: var(--bg-panel);
}

.upgrade-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
}

.upgrade-card:hover {
    border-color: var(--accent-blue);
}

.upgrade-card.maxed,
.upgrade-card.equipped {
    border-color: #ffd700;
}

.upgrade-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.upgrade-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.upgrade-name {
    font-size: 13px;
    font-weight: 800;
}

.upgrade-level {
    font-size: 10px;
    color: var(--accent-blue);
    font-weight: 800;
    text-transform: uppercase;
}

.upgrade-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 600;
}

.upgrade-btn {
    background-color: var(--bg-darker);
    color: white;
    border: 1px solid var(--grid-border);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.upgrade-btn:hover:not(:disabled) {
    background-color: #2ea043;
    border-color: #2ea043;
}

.upgrade-btn:active:not(:disabled) {
    transform: translateY(2px);
}

.upgrade-btn:disabled {
    background-color: var(--bg-main);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.upgrade-btn.maxed-btn,
.upgrade-btn.equipped-btn {
    background-color: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    border-color: #ffd700;
    justify-content: center;
}

.upgrade-cost {
    display: flex;
    align-items: center;
    gap: 6px;
}

.upgrade-cost i {
    color: #FFCD00;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 14px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--bg-panel);
    border: 3px solid var(--grid-bg);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-color);
}