* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Hide scrollbars on all scrollable elements for immersion */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

body {
    font-family: 'Courier New', monospace;
    background: #2c3e50;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Override NES.css container styles */
body.nes-container {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

body.nes-container::before,
body.nes-container::after {
    display: none !important;
}

/* Override NES.css button styles that might interfere */
.nes-btn {
    margin: 0;
}

/* Ensure NES containers inside overlays don't add borders */
.backpack-content.nes-container,
.auth-content.nes-container {
    border-width: 4px;
}

.game-container {
    width: 100vw;
    height: 100vh;
    max-width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.game-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #2c3e50;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Transparent cast button at top */
.cast-button-top {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 30px;
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 0;
    z-index: 5;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.cast-button-top:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.cast-button-top:active {
    transform: translateX(-50%) translateY(2px);
}

/* Backpack button */
.backpack-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2em;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.backpack-button:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Backpack overlay */
.backpack-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.hidden {
    display: none !important;
}

.backpack-overlay.hidden {
    display: none;
}

.backpack-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: center;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
}

.backpack-content {
    background: #2c3e50;
    border: 4px solid #34495e;
    flex: 1;
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    padding: 20px;
    position: relative;
    box-sizing: border-box; /* Include padding and border in width */
    /* Hide scrollbar but keep scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.backpack-content::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.buyback-slot-container {
    background: #2c3e50;
    border: 4px solid #34495e;
    min-width: 150px;
    max-width: 150px;
    max-height: 60vh;
    padding: 15px;
    box-sizing: border-box;
}

.buyback-header {
    text-align: center;
    margin-bottom: 10px;
    border-bottom: 2px solid #34495e;
    padding-bottom: 8px;
}

.buyback-header h3 {
    font-size: 1em;
}

.buyback-slot {
    min-height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px dashed #34495e;
    border-radius: 4px;
}

.buyback-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    width: 100%;
    border: 2px solid #f39c12;
    border-radius: 4px;
    background: rgba(243, 156, 18, 0.1);
}

.buyback-item img {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: 48px;
    height: 48px;
    margin-bottom: 6px;
}

.buyback-item-name {
    text-align: center;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.buyback-item-value {
    text-align: center;
    color: #f39c12;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.sell-button {
    margin-top: 5px;
    font-size: 0.8em;
    padding: 5px 10px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .backpack-overlay {
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .backpack-wrapper {
        flex-direction: column;
        align-items: stretch;
        max-width: 95%;
    }
    
    .buyback-slot-container {
        min-width: 100%;
        max-width: 100%;
        max-height: 200px;
        margin-top: 15px;
        margin-bottom: 0;
        padding: 12px;
        order: 2;
    }
    
    .buyback-slot {
        min-height: 120px;
        padding: 8px;
    }
    
    .buyback-header h3 {
        font-size: 0.9em;
    }
    
    .buyback-item img {
        width: 40px;
        height: 40px;
    }
    
    .backpack-content {
        max-width: 100%;
        order: 1;
        margin-bottom: 0;
    }
}

.backpack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 3px solid #34495e;
    padding-bottom: 15px;
}

.backpack-header h2 {
    color: #ecf0f1;
    font-size: 1.8em;
    text-shadow: 2px 2px 0px #000;
}

.backpack-close {
    background: #e74c3c;
    border: 2px solid #c0392b;
    color: #ecf0f1;
    width: 40px;
    height: 40px;
    font-size: 2em;
    cursor: pointer;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    line-height: 1;
}

.backpack-close:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.backpack-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    background: #34495e;
    padding: 10px 20px;
    border: 2px solid #2c3e50;
    color: #ecf0f1;
    font-size: 1.1em;
    font-weight: bold;
}

.stat-label {
    color: #95a5a6;
    margin-right: 5px;
}

.backpack-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.backpack-item {
    background: #34495e;
    border: 2px solid #2c3e50;
    padding: 15px;
    text-align: center;
    color: #ecf0f1;
    box-sizing: border-box;
    min-width: 0; /* Allow grid items to shrink below min-content */
    overflow-wrap: break-word; /* Break long words */
    word-wrap: break-word;
}

.backpack-item-name {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.backpack-item-details {
    font-size: 0.9em;
    color: #95a5a6;
    margin-bottom: 5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.backpack-item-value {
    color: #f39c12;
    font-size: 1em;
    font-weight: bold;
}

.most-valuable-fish {
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #34495e;
}

.most-valuable-header {
    color: #f39c12;
    font-size: 1.3em;
    font-weight: bold;
    text-align: center;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #000;
}

.most-valuable-item {
    border: 3px solid #f39c12;
    background: #34495e;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.backpack-separator {
    width: 100%;
    margin: 20px 0 15px 0;
    text-align: center;
}

.separator-text {
    color: #95a5a6;
    font-size: 1.1em;
    font-weight: bold;
    padding: 10px;
    border-top: 2px solid #34495e;
    border-bottom: 2px solid #34495e;
}

/* QTE Overlay */
.qte-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 15;
}

.qte-overlay.hidden {
    display: none;
}

.qte-instruction {
    color: #ecf0f1;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 3px 3px 0px #000;
    text-align: center;
}

.qte-button-container {
    position: relative;
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

/* On mobile, make button container full screen for better positioning */
@media (max-width: 600px) {
    .qte-button-container {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        margin: 0;
    }
}

.qte-button {
    width: 120px;
    height: 120px;
    border-radius: 0;
    border: 4px solid #ecf0f1;
    background: #e74c3c;
    color: #ecf0f1;
    font-size: 3em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 4px 4px 0px #000;
    display: flex;
    align-items: center;
    justify-content: center;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* NES.icons styling for QTE button */
.qte-button .nes-icon {
    display: inline-block !important;
    font-size: 1em !important;
    line-height: 1 !important;
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.5);
    font-family: 'nes-icons' !important;
    font-weight: 400;
    font-style: normal;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: grayscale;
}

.qte-button:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.qte-timer {
    width: 80%;
    max-width: 400px;
    height: 30px;
    background: #34495e;
    border: 3px solid #2c3e50;
    position: relative;
}

.qte-timer-bar {
    height: 100%;
    background: #2ecc71;
    width: 100%;
    transition: width 0.1s linear;
    border: 2px solid #27ae60;
}

.qte-timer-bar.warning {
    background: #f39c12;
    border-color: #e67e22;
}

.qte-timer-bar.danger {
    background: #e74c3c;
    border-color: #c0392b;
}

/* Fish info */
.fish-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #34495e;
    border: 4px solid #2c3e50;
    padding: 30px;
    text-align: center;
    z-index: 10;
    min-width: 320px;
    max-width: 90vw;
}

.fish-info.hidden {
    display: none;
}

.fish-info h3 {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.5em;
}

#fish-details {
    color: #ecf0f1;
    margin-bottom: 15px;
    font-size: 1.1em;
    line-height: 1.6;
}

.fish-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #f39c12;
    margin-bottom: 10px;
}

.fish-attribute {
    margin: 5px 0;
}

.rarity-common { color: #95a5a6; }
.rarity-uncommon { color: #2ecc71; }
.rarity-rare { color: #3498db; }
.rarity-epic { color: #9b59b6; }
.rarity-legendary { color: #f39c12; }
.rarity-mythical { color: #e74c3c; }
.rarity-universal { color: #ff00ff; }

.action-button {
    padding: 12px 25px;
    font-size: 1em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 3px solid #34495e;
    background: #3498db;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.1s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 4px 4px 0px #000;
    margin-top: 10px;
}

.action-button:hover:not(:disabled) {
    background: #2980b9;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.action-button:active:not(:disabled) {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0px #000;
}

.action-button:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Auth Overlay */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 30;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-overlay.hidden {
    display: none;
}

.auth-content {
    background: #2c3e50;
    border: 4px solid #34495e;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.auth-content h2 {
    color: #ecf0f1;
    margin-bottom: 20px;
    font-size: 2em;
    text-shadow: 2px 2px 0px #000;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-form.hidden {
    display: none;
}

.auth-form h3 {
    color: #ecf0f1;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.auth-input {
    padding: 12px;
    font-size: 1em;
    font-family: 'Courier New', monospace;
    border: 3px solid #34495e;
    background: #34495e;
    color: #ecf0f1;
    width: 100%;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #3498db;
}

.auth-switch {
    color: #95a5a6;
    margin-top: 10px;
    font-size: 0.9em;
}

.auth-switch a {
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    color: #e74c3c;
    margin-top: 15px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    font-size: 0.9em;
}

.auth-error.hidden {
    display: none;
}

/* Settings Button */
.settings-button {
    position: absolute;
    top: 20px;
    right: 230px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2em;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.settings-button:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Shop Button */
.shop-button {
    position: absolute;
    top: 20px;
    right: 90px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2em;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.shop-button:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Leaderboard Button */
.leaderboard-button {
    position: absolute;
    top: 20px;
    right: 160px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2em;
    width: 60px;
    height: 60px;
    cursor: pointer;
    border-radius: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.leaderboard-button:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.1);
}

/* Shop Content */
.shop-content {
    padding: 10px 0;
}

.shop-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.shop-item {
    background: #34495e;
    border: 3px solid #2c3e50;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
}

.shop-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.shop-item.owned {
    border-color: #2ecc71;
    opacity: 0.7;
}

.shop-item.equipped {
    border-color: #f39c12;
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.5);
}

.shop-item-name {
    color: #ecf0f1;
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 8px;
}

.shop-item-description {
    color: #95a5a6;
    font-size: 0.85em;
    margin-bottom: 10px;
    min-height: 40px;
}

.shop-item-price {
    color: #f39c12;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

.shop-item-button {
    width: 100%;
    padding: 8px;
    font-size: 0.9em;
    margin-top: 5px;
}

.shop-item-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Hide scrollbar but keep scrolling */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.leaderboard-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.leaderboard-item {
    background: #34495e;
    border: 2px solid #2c3e50;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ecf0f1;
    box-sizing: border-box;
    min-width: 0; /* Allow flex items to shrink */
    width: 100%;
    max-width: 100%;
}

.leaderboard-item.rank-1 {
    border-color: #f39c12;
    background: rgba(243, 156, 18, 0.2);
}

.leaderboard-item.rank-2 {
    border-color: #95a5a6;
    background: rgba(149, 165, 166, 0.2);
}

.leaderboard-item.rank-3 {
    border-color: #cd7f32;
    background: rgba(205, 127, 50, 0.2);
}

.leaderboard-rank {
    font-size: 1.5em;
    font-weight: bold;
    min-width: 50px;
    text-align: center;
}

.leaderboard-fish-sprite-container {
    min-width: 64px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid #2c3e50;
    border-radius: 4px;
    padding: 4px;
    box-sizing: border-box;
}

.leaderboard-fish-sprite {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.leaderboard-user-info {
    flex: 1;
    margin-left: 0;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent overflow */
}

.leaderboard-username {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-fish-info {
    font-size: 0.9em;
    color: #95a5a6;
    overflow-wrap: break-word;
    word-wrap: break-word;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-fish-name {
    color: #ecf0f1;
    font-weight: bold;
}

.leaderboard-value {
    color: #f39c12;
    font-size: 1.3em;
    font-weight: bold;
    flex-shrink: 0; /* Don't shrink the value */
    margin-left: 10px;
    min-width: 100px;
    text-align: right;
}

/* Settings Content */
.settings-content {
    padding: 20px 0;
}

.settings-item {
    margin-bottom: 25px;
    padding: 15px;
    background: #34495e;
    border: 2px solid #2c3e50;
}

.settings-item.settings-separator {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 3px solid #2c3e50;
}

.settings-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ecf0f1;
    font-size: 1.1em;
    cursor: pointer;
    user-select: none;
}

.settings-label span:first-child {
    flex: 1;
}

/* Toggle Switch */
.settings-label {
    position: relative;
}

.settings-input {
    width: 100px;
    padding: 5px 10px;
    background: #34495e;
    border: 2px solid #2c3e50;
    border-radius: 4px;
    color: #ecf0f1;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    text-align: center;
}

.settings-input:focus {
    outline: none;
    border-color: #3498db;
}

.settings-toggle {
    position: relative;
    width: 50px;
    height: 26px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #7f8c8d;
    border-radius: 13px;
    outline: none;
    cursor: pointer;
    transition: background 0.3s;
    margin-left: 15px;
    margin-right: 0;
    padding: 0;
}

.settings-toggle:checked {
    background: #2ecc71;
}

.settings-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
}

.settings-toggle:checked::before {
    transform: translateX(24px);
}

.settings-toggle:focus {
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

.toggle-slider {
    display: none; /* Not needed, using ::before pseudo-element */
}

/* Logout Button */
.logout-button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    border: 3px solid #e74c3c;
    background: #e74c3c;
    color: #ecf0f1;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 4px 4px 0px #000;
}

.logout-button:hover {
    background: #c0392b;
    border-color: #c0392b;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #000;
}

.logout-button:active {
    transform: translate(3px, 3px);
    box-shadow: 1px 1px 0px #000;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .cast-button-top {
        font-size: 1em;
        padding: 8px 20px;
        top: auto;
        bottom: 150px;
        transform: translateX(-50%);
    }
    
    .backpack-button {
        width: 40px;
        height: 40px;
        font-size: 1.2em;
        top: 15px;
        left: 15px;
        right: auto;
    }
    
    .qte-button {
        width: 60px;
        height: 60px;
        font-size: 1.8em;
        border: 3px solid #ecf0f1;
        font-family: 'Courier New', monospace;
    }
    
    .qte-button .nes-icon {
        font-size: 1em !important;
        display: inline-block !important;
        font-family: 'nes-icons' !important;
    }
    
    .qte-instruction {
        font-size: 1.2em;
        margin-bottom: 20px;
    }
    
    .backpack-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .settings-button {
        top: 65px;
        left: 15px;
        right: auto;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .shop-button {
        top: 165px;
        left: 15px;
        right: auto;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .leaderboard-button {
        top: 115px;
        left: 15px;
        right: auto;
        width: 40px;
        height: 40px;
        font-size: 1.2em;
    }
    
    .shop-items {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .leaderboard-fish-sprite-container {
        min-width: 48px;
        width: 48px;
        height: 48px;
        margin-right: 10px;
    }
    
    .leaderboard-item {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .leaderboard-rank {
        min-width: 35px;
        font-size: 1.2em;
    }
    
    .leaderboard-value {
        min-width: 70px;
        font-size: 1.1em;
    }
}

/* Touch-friendly for mobile */
@media (hover: none) and (pointer: coarse) {
    .cast-button-top {
        padding: 15px 30px;
        font-size: 1.1em;
    }
    
    .backpack-button {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        top: 15px;
        left: 15px;
    }
    
    .settings-button {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        top: 70px;
        left: 15px;
    }
    
    .shop-button {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        top: 175px;
        left: 15px;
    }
    
    .leaderboard-button {
        width: 45px;
        height: 45px;
        font-size: 1.3em;
        top: 125px;
        left: 15px;
    }
    
    .qte-button {
        width: 65px;
        height: 65px;
        font-size: 2em;
        font-family: 'Courier New', monospace;
    }
    
    .qte-button .nes-icon {
        font-size: 1em !important;
        display: inline-block !important;
        font-family: 'nes-icons' !important;
    }
}
