@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&display=swap');

@font-face {
    font-family: 'Modesto Condensed Bold';
    src: url('./fonts/Modesto Condensed Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Modesto Condensed Light';
    src: url('./fonts/Modesto Condensed Light.ttf') format('truetype');
}

@font-face {
    font-family: 'Modesto Expanded';
    src: url('./fonts/Modesto Expanded.ttf') format('truetype');
}

@font-face {
    font-family: 'EndlessBossBattleRegular';
    src: url('./fonts/EndlessBossBattleRegular-v7Ey.ttf') format('truetype');
}

/* Rest Button Styling */
.btn.rest-button {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    border: 2px solid #1e8449;
    color: white !important;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    box-shadow: 0 3px 8px rgba(39, 174, 96, 0.4);
    transition: all 0.3s ease;
    margin-top: 8px;
    position: relative;
    overflow: hidden;
}

.btn.rest-button:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    border-color: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.6);
    transform: translateY(-1px);
}

.btn.rest-button:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(39, 174, 96, 0.4);
}

/* Rest Button Glow Animation */
.btn.rest-button::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #27ae60, #2ecc71, #27ae60);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn.rest-button:hover::before {
    opacity: 0.7;
    animation: restGlow 2s ease-in-out infinite alternate;
}

@keyframes restGlow {
    0% {
        box-shadow: 0 0 5px rgba(39, 174, 96, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(39, 174, 96, 0.8);
    }
}

/* Skill Shortcuts Animation */
@keyframes shortcut-ready {
    0% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 8px rgba(39, 174, 96, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

.shortcut-slot.skill-ready {
    animation: shortcut-ready 0.6s ease-in-out;
}

/* Red pulse animation for urgent ground items */
@keyframes pulse-red {
    0% {
        border-color: #e74c3c;
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
    }
    50% {
        border-color: #ff4444;
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.7);
    }
    100% {
        border-color: #e74c3c;
        box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
    }
}

/* Rest Button Icon Animation */
.btn.rest-button .rest-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.btn.rest-button:hover .rest-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Regeneration Message Styling */
.regen-message {
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1), rgba(46, 204, 113, 0.1));
    border-left: 4px solid #27ae60;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    font-weight: 500;
}

/* Status Effect Styling */
.status-bonus {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid rgba(39, 174, 96, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    display: inline-block;
    margin: 2px;
    font-size: 0.9em;
}

.status-penalty {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.3);
    border-radius: 12px;
    padding: 2px 8px;
    display: inline-block;
    margin: 2px;
    font-size: 0.9em;
}

@font-face {
    font-family: 'EndlessBossBattle';
    src: url('./fonts/EndlessBossBattleRegular-v7Ey.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Disable text selection on all elements by default */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for specific elements where it makes sense */
input, textarea, .game-text {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Override selection colors to be less intrusive */
::selection {
    background: rgba(74, 144, 226, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(74, 144, 226, 0.3);
    color: inherit;
}

/* Disable highlighting on buttons and interactive elements */
.btn, .character-slot, .equipment-item, .spell-item,
.context-menu-item, .selectable-item, .shortcut-slot,
.character-panel, .header, .time-display, .stat-box,
.health-bar, .mana-bar, .hunger-bar, .thirst-bar,
.section-title, .accordion-header, .modal-content {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    /* Also disable focus outline that might cause highlighting */
    outline: none;
    -webkit-tap-highlight-color: transparent;
    /* Disable drag and drop */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

body {
    font-family: 'Orbitron', monospace;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #e0e0e0;
    min-height: 100vh;
    overflow-x: auto;
    /* Disable text selection highlighting */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    /* Disable tap highlight on mobile */
    -webkit-tap-highlight-color: transparent;
    /* Disable drag and drop */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* Zoom for larger screens - makes UI 25% bigger */
@media (min-width: 1024px) {
    body {
        zoom: 125%;
    }
}

.game-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    text-align: center;
    margin-bottom: 20px;
    background: rgba(0,0,0,0.3);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #4a90e2;
    position: relative;
}

.header h1 {
    font-family: 'Modesto Condensed Bold', serif;
    font-size: 2.5em;
    color: #ff6347;
    text-shadow: 
        0 0 10px #ff4500,
        0 0 20px #ff4500,
        2px 2px 0px #000;
    letter-spacing: 0.08em;
    margin-bottom: 5px;
    animation: fireGlow 4s ease-in-out infinite alternate;
    /* Ensure no blocking */
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.header .game-subtitle {
    font-family: 'EndlessBossBattle', fantasy;
    font-size: 0.8em;
    color: #ff6347;
    letter-spacing: 0.25em;
    text-shadow: 0 0 10px #ff4500;
    margin-bottom: 10px;
}

@keyframes fireGlow {
    0% { 
        text-shadow: 
            0 0 10px #ff4500,
            0 0 20px #ff4500,
            2px 2px 0px #000;
        filter: brightness(1);
    }
    100% { 
        text-shadow: 
            0 0 15px #ff4500,
            0 0 30px #ff4500,
            2px 2px 0px #000;
        filter: brightness(1.2);
    }
}

.time-display {
    color: #ffd700;
    font-size: 1.1em;
}

.user-info {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #4a90e2;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 100;
    pointer-events: auto;
}

.logout-btn {
    background: rgba(231,76,60,0.8);
    border: 1px solid #e74c3c;
    color: white;
    padding: 5px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Orbitron', monospace;
    font-size: 0.75em;
    white-space: nowrap;
}

.logout-btn:hover {
    background: rgba(231,76,60,1);
}

/* Character Select button styling */
.logout-btn:first-of-type {
    background: rgba(74,144,226,0.8);
    border-color: #4a90e2;
}

.logout-btn:first-of-type:hover {
    background: rgba(74,144,226,1);
}

/* Login Screen Styles */
.login-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.login-container {
    background: rgba(0,0,0,0.4);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 30px;
    max-width: 400px;
    width: 100%;
}

.login-title {
    font-family: 'Modesto Condensed Bold', serif;
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    color: #ff6347;
    text-shadow: 
        0 0 10px #ff4500,
        0 0 20px #ff4500,
        2px 2px 0px #000;
    letter-spacing: 0.08em;
    animation: fireGlow 4s ease-in-out infinite alternate;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 2px solid #4a90e2;
    border-radius: 5px;
    background: rgba(0,0,0,0.6);
    color: #e0e0e0;
    font-family: 'Orbitron', monospace;
    font-size: 1em;
}

.login-form input::placeholder {
    color: #888;
}

/* Character Selection Styles */
.character-selection {
    background: rgba(0,0,0,0.4);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

/* Character selection buttons uniform styling */
.character-selection .btn {
    width: 100%;
    margin: 5px 0;
    padding: 12px 20px;
    font-size: 1em;
}

.character-selection .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Delete account link styling */
.character-selection a[href="#"] {
    display: inline-block;
    transition: all 0.3s ease;
}

.character-selection a[href="#"]:hover {
    color: #c0392b !important;
    text-decoration: underline !important;
}

.selection-title {
    font-family: 'Modesto Condensed Bold', serif;
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 20px;
    color: #ff6347;
    text-shadow: 
        0 0 10px #ff4500,
        0 0 20px #ff4500,
        2px 2px 0px #000;
    letter-spacing: 0.08em;
    animation: fireGlow 4s ease-in-out infinite alternate;
}

.character-slots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.character-slot {
    background: rgba(0,0,0,0.6);
    border: 2px solid #666;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.character-slot:hover {
    border-color: #4a90e2;
    background: rgba(74,144,226,0.1);
}

.character-slot.selected {
    border-color: #ffd700;
    background: rgba(255,215,0,0.1);
}

.character-slot.empty {
    border-style: dashed;
    text-align: center;
    color: #888;
    font-style: italic;
}

.character-slot.ghost {
    border-color: #e74c3c;
    background: rgba(231,76,60,0.1);
}

.character-info {
    color: #e0e0e0;
}

.character-name {
    color: #4a90e2;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 5px;
}

.character-details {
    color: #ffd700;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.character-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: #888;
}

.ghost-marker {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #e74c3c;
    font-size: 1.2em;
}

.main-content {
    display: flex;
    gap: 20px;
    flex: 1;
}

.character-panel {
    flex: 0 0 300px;
    background: rgba(0,0,0,0.4);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 15px;
    height: fit-content;
}

.game-area {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.character-creation {
    display: block;
}

.character-creation input, .character-creation select {
    width: 100%;
    padding: 8px;
    margin: 5px 0 15px 0;
    border: 2px solid #4a90e2;
    border-radius: 5px;
    background: rgba(0,0,0,0.6);
    color: #e0e0e0;
    font-family: 'Orbitron', monospace;
}

.character-creation label {
    color: #4a90e2;
    font-weight: bold;
    display: block;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0;
}

.stat-box {
    background: rgba(0,0,0,0.6);
    border: 1px solid #4a90e2;
    border-radius: 5px;
    padding: 8px;
    text-align: center;
}

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

.stat-value {
    color: #ffd700;
    font-size: 1.2em;
    font-weight: bold;
}

.hunger-thirst {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.hunger-bar, .thirst-bar {
    flex: 1;
    height: 20px;
    border: 2px solid #4a90e2;
    border-radius: 5px;
    background: rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.hunger-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff8800, #ffaa44);
    transition: width 0.3s ease;
}

.thirst-fill {
    height: 100%;
    background: linear-gradient(90deg, #0088ff, #44aaff);
    transition: width 0.3s ease;
}

.health-mana {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

.health-bar, .mana-bar {
    flex: 1;
    height: 25px;
    border: 2px solid #4a90e2;
    border-radius: 5px;
    background: rgba(0,0,0,0.6);
    position: relative;
    overflow: hidden;
}

.health-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff6666);
    transition: width 0.3s ease;
}

.mana-fill {
    height: 100%;
    background: linear-gradient(90deg, #4444ff, #6666ff);
    transition: width 0.3s ease;
}

.bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.8em;
    text-shadow: 1px 1px 2px black;
    white-space: nowrap;
}

.equipment-section, .spells-section, .inventory-section, .ground-items-section {
    margin: 15px 0;
    background: rgba(0,0,0,0.6);
    border: 1px solid #4a90e2;
    border-radius: 5px;
    padding: 10px;
}

.section-title {
    color: #4a90e2;
    font-weight: bold;
    margin-bottom: 8px;
    border-bottom: 1px solid #4a90e2;
    padding-bottom: 5px;
}

/* Accordion styling */
.accordion-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accordion-header:hover {
    background: rgba(74, 144, 226, 0.1);
    border-radius: 3px;
    padding: 2px 5px;
}

.accordion-arrow {
    font-size: 0.8em;
    transition: transform 0.2s ease;
    margin-right: 5px;
    display: inline-block;
    width: 12px;
    text-align: center;
}

.accordion-content {
    transition: all 0.3s ease;
    overflow: visible;
    padding-top: 8px;
}

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

.equipment-item, .spell-item {
    background: rgba(0,0,0,0.8);
    border: 1px solid #666;
    border-radius: 3px;
    padding: 5px;
    margin: 3px 0;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.equipment-item:hover, .spell-item:hover {
    background: rgba(74,144,226,0.2);
    border-color: #4a90e2;
}

.equipped-item {
    border-color: #ffd700 !important;
    background: rgba(255,215,0,0.1) !important;
    cursor: pointer; /* Show that equipped items are clickable */
}

.equipped-marker {
    color: #ffd700;
    font-weight: bold;
    margin-right: 5px;
}

.tooltip {
    position: absolute;
    background: rgba(0,0,0,0.9);
    border: 2px solid #4a90e2;
    border-radius: 5px;
    padding: 8px;
    color: #e0e0e0;
    font-size: 0.8em;
    z-index: 1000;
    max-width: 250px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tooltip.show {
    opacity: 1;
}

.item-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.skill-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.8) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 2000 !important;
}

.modal-content {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 20px;
    max-width: 500px;
    max-height: 70vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 rgba(255,255,255,0.1);
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
    width: 10px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    margin: 5px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

.modal-title {
    color: #4a90e2;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
    flex-shrink: 0;
}

.item-list {
    flex: 1;
    overflow-y: auto;
    margin: 15px 0;
    min-height: 0;
    max-height: 400px;
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 rgba(255,255,255,0.1);
    padding-right: 5px;
}

/* Item list scrollbar styling */
.item-list::-webkit-scrollbar {
    width: 10px;
}

.item-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.item-list::-webkit-scrollbar-thumb {
    background: #4a90e2;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.item-list::-webkit-scrollbar-thumb:hover {
    background: #357abd;
}

.selectable-item {
    background: rgba(0,0,0,0.6);
    border: 1px solid #666;
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.selectable-item:hover {
    background: rgba(74,144,226,0.2);
    border-color: #4a90e2;
}

.reroll-info {
    color: #f39c12;
    font-size: 0.9em;
    text-align: center;
    margin: 10px 0;
}

.stat-display {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    padding: 5px;
    background: rgba(0,0,0,0.3);
    border-radius: 3px;
}

/* Base game text styling for all screens */
.game-text {
    background: rgba(0,0,0,0.8);
    border: 2px solid #4a90e2;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    overflow-y: auto;
    font-size: 1.1em;
    line-height: 1.4;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #4a90e2 rgba(255,255,255,0.1);
}

/* Mobile game text - flexible height */
@media (max-width: 768px) {
    .game-text {
        min-height: 150px;
        max-height: 250px;
    }
}

/* Desktop game text - fixed height for consistent layout */
@media (min-width: 769px) {
    .game-text {
        height: 300px !important; /* Fixed height prevents button jumping */
        min-height: 300px !important;
        max-height: 300px !important;
    }
}

/* Desktop scrollbar styling for game-text */
@media (min-width: 769px) {
    .game-text::-webkit-scrollbar {
        width: 8px;
    }
    
    .game-text::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
    }
    
    .game-text::-webkit-scrollbar-thumb {
        background: #4a90e2;
        border-radius: 4px;
        transition: background 0.3s ease;
    }
    
    .game-text::-webkit-scrollbar-thumb:hover {
        background: #357abd;
    }
}

/* Proper text alignment for game messages with icons - COMBAT ONLY */
.game-text.combat-fixed-height p {
    margin: 2px 0;
    text-indent: -1.8em; /* Increased from -1.5em */
    padding-left: 1.8em; /* Increased from 1.5em */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* Action Buttons Container - Single dark box around all buttons */
#actionButtons {
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    border: 2px solid rgba(74, 144, 226, 0.4);
}

/* Shop Button Grid Layout */
.shop-button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.shop-button-grid .btn {
    width: 100%;
    min-height: 50px;
    font-size: 1.05em;
}

.shop-button-single {
    width: 100%;
    margin-bottom: 12px;
}

.shop-button-single .btn {
    width: 100%;
    min-height: 50px;
}

.shop-button-return {
    width: 100%;
    margin-bottom: 0;
}

.shop-button-return .btn {
    width: 100%;
    min-height: 50px;
}

/* Mobile: Single column layout (original design) */
@media (max-width: 768px) {
    .shop-button-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    .shop-button-grid .btn {
        width: 100% !important;
    }
}

.btn {
    padding: 14px 20px;
    border: 2px solid #2c5aa0;
    border-radius: 6px;
    background: linear-gradient(180deg, #2d4a7c 0%, #1a2942 100%);
    color: #e8f0ff;
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1em;
    position: relative;
    z-index: 10;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn:hover {
    background: linear-gradient(180deg, #3a5f9e 0%, #243554 100%);
    border-color: #3a6bb8;
    transform: translateY(-1px);
    box-shadow: 
        0 3px 8px rgba(74, 144, 226, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn:active {
    transform: translateY(0px);
    box-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.5),
        inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(180deg, #333, #1a1a1a) !important;
    border-color: #444 !important;
    box-shadow: none !important;
}

.btn:not(:disabled) {
    opacity: 1;
}

.btn-danger:not(:disabled) {
    background: linear-gradient(180deg, #8b3a3a 0%, #5a1f1f 100%);
    border-color: #a04040;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(180deg, #a04545 0%, #6b2626 100%);
    border-color: #c05050;
    box-shadow: 
        0 3px 8px rgba(231, 76, 60, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-success:not(:disabled) {
    background: linear-gradient(180deg, #3a7a4d 0%, #234a2e 100%);
    border-color: #408052;
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(180deg, #469058 0%, #2d5a3a 100%);
    border-color: #52a066;
    box-shadow: 
        0 3px 8px rgba(39, 174, 96, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(180deg, #8b3a3a 0%, #5a1f1f 100%);
    border-color: #a04040;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 0 15px #e74c3c;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    border-color: #27ae60;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    box-shadow: 0 0 15px #27ae60;
}

/* Grate Button Styling */
.grate-button {
    position: relative;
    font-weight: bold;
    transition: all 0.3s ease, transform 0.2s ease;
}

.grate-button.locked {
    background: linear-gradient(135deg, #8b0000, #a52a2a) !important;
    border-color: #dc143c !important;
    animation: lockPulse 2s ease-in-out infinite alternate;
    box-shadow: 0 0 15px rgba(220, 20, 60, 0.5) !important;
}

.grate-button.locked:hover {
    background: linear-gradient(135deg, #a52a2a, #8b0000) !important;
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.7) !important;
    transform: translateY(-2px);
}

.grate-button:not(.locked) {
    background: linear-gradient(135deg, #ffd700, #ffb347) !important;
    border-color: #ffd700 !important;
    color: #2c3e50 !important;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.grate-button:not(.locked):hover {
    background: linear-gradient(135deg, #ffb347, #ffd700) !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8) !important;
    transform: translateY(-2px);
}

@keyframes lockPulse {
    0% {
        box-shadow: 0 0 15px rgba(220, 20, 60, 0.3);
        border-color: #dc143c;
    }
    100% {
        box-shadow: 0 0 25px rgba(220, 20, 60, 0.6);
        border-color: #ff1744;
    }
}

.hidden {
    display: none !important;
}

.text-rare { color: #4a90e2; }
.text-uncommon { color: #27ae60; }
.text-common { color: #e0e0e0; }
.text-legendary { color: #ff6b35; }
.text-danger { color: #e74c3c; }
.text-warning { color: #f39c12; }

.context-menu {
    position: fixed;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 10px;
    z-index: 3000;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #e0e0e0;
}

.context-menu-item:hover {
    background: rgba(74,144,226,0.2);
}

.context-menu-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tombstone-list {
    background: rgba(0,0,0,0.6);
    border: 1px solid #666;
    border-radius: 5px;
    padding: 10px;
    margin: 10px 0;
    max-height: 150px;
    overflow-y: auto;
}

.tombstone-entry {
    color: #888;
    font-size: 0.9em;
    margin: 3px 0;
    padding: 3px;
    border-bottom: 1px solid #333;
}

.tombstone-entry:last-child {
    border-bottom: none;
}

.auto-save-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(39, 174, 96, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.8em;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.auto-save-indicator.show {
    opacity: 1;
}

/* Password Setup Indicator */
.password-setup-indicator {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(52, 152, 219, 0.95);
    color: white;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 0.9em;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.password-setup-indicator.show {
    opacity: 1;
}

/* Item Context Menu */
.item-context-menu {
    position: fixed;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #4a90e2;
    border-radius: 8px;
    padding: 5px;
    z-index: 3000;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.context-item {
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: #e0e0e0;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.context-item:hover {
    background: rgba(74,144,226,0.2);
}

.context-item.drop-item {
    color: #e74c3c;
    border-top: 1px solid #444;
    margin-top: 2px;
}

.context-item.drop-item:hover {
    background: rgba(231, 76, 60, 0.2);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    
    .game-container {
        padding: 10px;
    }
    
    /* Header Mobile */
    .header {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .header h1 {
        font-size: 1.6em;
        margin-bottom: 3px;
    }
    
    .header .game-subtitle {
        font-size: 0.6em;
        margin-bottom: 5px;
    }
    
    .time-display {
        font-size: 0.9em;
    }
    
    /* User Info Mobile - Move to top */
    .user-info {
        position: static;
        background: rgba(0,0,0,0.6);
        padding: 8px;
        border-radius: 5px;
        margin-bottom: 10px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
        font-size: 0.8em;
    }
    
    .logout-btn {
        padding: 8px 12px;
        font-size: 0.8em;
    }
    
    /* Main Content Mobile */
    .main-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .character-panel {
        flex: none;
        order: 2;
    }
    
    .game-area {
        order: 1;
        min-height: 250px;
        padding: 15px;
    }
    
    /* Game Text Mobile - Fixed Height with Scroll */
    .game-text {
        padding: 12px;
        font-size: 0.95em;
        height: 240px !important; /* Fixed height equivalent to 12 lines */
        min-height: 240px !important;
        max-height: 240px !important;
        margin-bottom: 10px;
        line-height: 1.3;
        overflow-y: auto !important; /* Enable scrolling */
        overflow-x: hidden;
        /* Smooth scrolling for touch devices */
        -webkit-overflow-scrolling: touch;
        /* Hide scrollbar but keep functionality */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    /* Mobile text alignment adjustments - COMBAT ONLY */
    .game-text.combat-fixed-height p {
        text-indent: -1.5em; /* Increased from -1.2em */
        padding-left: 1.5em; /* Increased from 1.2em */
        margin: 1px 0; /* Tighter spacing on mobile */
    }
    
    /* Hide scrollbar for WebKit browsers */
    .game-text::-webkit-scrollbar {
        display: none;
    }
    
    /* Combat fixed height for mobile - same as regular now */
    .game-text.combat-fixed-height {
        height: 240px !important;
        min-height: 240px !important;
        max-height: 240px !important;
        overflow-y: auto !important;
    }
    
    /* Buttons Mobile */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn {
        width: 100% !important;
        padding: 15px;
        font-size: 1em;
        margin: 0 !important;
        white-space: normal;
        text-align: center;
    }
    
    /* Character Selection Mobile */
    .character-selection {
        padding: 15px;
        margin: 10px 5px;
    }
    
    .selection-title {
        font-size: 1.2em;
    }
    
    .character-slots {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .character-slot {
        padding: 12px;
        min-height: auto;
    }
    
    /* Login Mobile */
    .login-container {
        padding: 20px;
        margin: 20px 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
    
    .login-title {
        font-size: 1.4em;
        margin-bottom: 20px;
    }
    
    .login-form input {
        padding: 15px;
        font-size: 1em;
        margin: 15px 0;
    }
    
    /* Character Creation Mobile */
    .character-panel {
        padding: 12px;
    }
    
    .character-creation input,
    .character-creation select {
        padding: 12px;
        font-size: 0.95em;
        margin-bottom: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    
    .stat-box {
        padding: 8px;
    }
    
    /* Bars Mobile */
    .hunger-thirst,
    .health-mana {
        gap: 8px;
        margin: 10px 0;
    }
    
    /* Equipment Mobile */
    .equipment-section,
    .spells-section {
        margin: 10px 0;
        padding: 8px;
    }
    
    .section-title {
        font-size: 0.9em;
    }
    
    .equipment-item,
    .spell-item {
        padding: 8px;
        font-size: 0.85em;
    }
    
    /* Modal Mobile */
    .modal-content {
        margin: 20px;
        padding: 15px;
        max-width: none;
        width: calc(100% - 40px);
        max-height: 80vh;
    }
    
    /* Context Menu Mobile */
    .context-menu {
        min-width: 120px;
        font-size: 0.9em;
    }
    
    .context-menu-item {
        padding: 10px;
    }
}

/* Branding Section Styling */
.branding-section {
    margin-top: 30px;
    text-align: center;
    border-top: 1px solid #4a90e2;
    padding-top: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    position: relative;
    overflow: visible;
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.studio-text {
    color: #4a90e2;
    font-size: 0.9em;
    font-weight: bold;
    letter-spacing: 0.05em;
    position: relative;
    background: linear-gradient(90deg, 
        #4a90e2 0%,
        #4a90e2 30%,
        #ffffff 50%,
        #4a90e2 70%,
        #4a90e2 100%
    );
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShimmerGlow 15s ease-in-out infinite;
    filter: drop-shadow(0 0 0px transparent);
}

/* Text shimmer animation - makes the text glow as it sweeps */
@keyframes textShimmerGlow {
    0% {
        background-position: 100% 0;
        filter: drop-shadow(0 0 0px transparent);
    }
    15% {
        background-position: 100% 0;
        filter: drop-shadow(0 0 0px transparent);
    }
    20% {
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
    }
    35% {
        background-position: -100% 0;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
    }
    37% {
        filter: drop-shadow(0 0 0px transparent);
    }
    100% {
        background-position: -100% 0;
        filter: drop-shadow(0 0 0px transparent);
    }
}

.version-number {
    color: #888;
    font-size: 0.75em;
    font-family: 'Courier New', monospace;
    background: rgba(0,0,0,0.3);
    border: 1px solid #555;
    border-radius: 3px;
    padding: 2px 6px;
    display: inline-block;
}

/* Developer Clear Storage Button */
/* TODO: REMOVE BEFORE RELEASE - Dev tool only */
.dev-clear-storage-btn {
    margin-top: 15px;
    padding: 8px 15px;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid #dc2626;
    border-radius: 4px;
    color: #dc2626;
    font-size: 0.75em;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    width: 100%;
    text-align: center;
}

.dev-clear-storage-btn:hover {
    background: rgba(220, 38, 38, 0.4);
    border-color: #ef4444;
    color: #ef4444;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}

.dev-clear-storage-btn:active {
    transform: scale(0.98);
}

/* Equipment System Styling */
.equipment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.equipment-modal .modal-content {
    background-color: #1a1a1a;
    border: 2px solid #4a90e2;
    border-radius: 10px;
    padding: 20px;
    max-width: 90%;
    max-height: 90%;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(74, 144, 226, 0.3);
}

/* Equipped Items Display */
.equipped-items {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.equipped-items .slot-category {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #444;
}

.equipped-items .slot-category:last-child {
    border-bottom: none;
}

.equipped-items .category-title {
    color: #4a90e2;
    font-weight: bold;
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.equipped-items .slot-item {
    margin: 2px 0 2px 15px;
    font-size: 0.85em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.equipped-items .slot-name {
    color: #27ae60;
    font-weight: bold;
    min-width: 80px;
}

.equipped-items .item-name {
    color: #fff;
    flex-grow: 1;
    margin-left: 5px;
}

.equipped-items .item-stats {
    color: #f39c12;
    font-size: 0.8em;
    margin-left: 5px;
}

.equipped-items .unequip-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 2px 6px;
    font-size: 0.7em;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 5px;
}

.equipped-items .unequip-btn:hover {
    background: #c0392b;
}

/* Available Equipment List */
.available-equipment {
    background: #2a2a2a;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.equipment-item {
    background: #333;
    border: 1px solid #444;
    border-radius: 5px;
    padding: 8px;
    margin: 5px 0;
    transition: all 0.2s ease;
}

.equipment-item:hover {
    background: #3a3a3a;
    border-color: #4a90e2;
}

.equipment-item .item-title {
    font-weight: bold;
    color: #fff;
    margin-bottom: 3px;
}

.equipment-item .item-slot {
    color: #4a90e2;
    font-size: 0.8em;
    margin-bottom: 2px;
}

.equipment-item .item-description {
    color: #bbb;
    font-size: 0.75em;
    font-style: italic;
    margin-bottom: 5px;
}

.equipment-item .equip-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 4px 10px;
    font-size: 0.8em;
    border-radius: 3px;
    cursor: pointer;
}

.equipment-item .equip-btn:hover {
    background: #2ecc71;
}

.equipment-item .equip-btn:disabled {
    background: #666;
    cursor: not-allowed;
}

/* Equipment Management Buttons */
.equipment-management-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
    flex-wrap: wrap;
}

.equipment-btn {
    background: #4a90e2;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background 0.2s ease;
}

.equipment-btn:hover {
    background: #357abd;
}

.equipment-btn.danger {
    background: #e74c3c;
}

.equipment-btn.danger:hover {
    background: #c0392b;
}

.equipment-btn.success {
    background: #27ae60;
}

.equipment-btn.success:hover {
    background: #2ecc71;
}

/* Mobile Responsiveness for Equipment */
@media (max-width: 768px) {
    .equipment-modal .modal-content {
        max-width: 95%;
        padding: 15px;
    }
    
    .equipment-modal .modal-content > div[style*="display: flex"] {
        flex-direction: column;
        gap: 15px;
    }
    
    .equipment-management-buttons {
        justify-content: center;
    }
    
    .equipment-item {
        padding: 10px;
    }
    
    .equipment-item .equip-btn {
        padding: 6px 12px;
    }
}

/* Skill Shortcuts Bar */
.skill-shortcuts {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    border: 1px solid #2c3e50;
}

.shortcut-slot {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border: 1px solid #4a90e2;
    border-radius: 6px;
    padding: 6px 8px;
    min-width: 65px;
    height: 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Orbitron', monospace;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shortcut-slot:hover {
    background: linear-gradient(145deg, #3498db, #2980b9);
    border-color: #5dade2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.shortcut-slot.empty {
    background: linear-gradient(145deg, #2c3e50, #34495e);
    border: 1px dashed #566573;
    opacity: 0.7;
}

.shortcut-slot.empty:hover {
    background: linear-gradient(145deg, #34495e, #2c3e50);
    border-color: #4a90e2;
    opacity: 0.9;
}

.shortcut-slot.cooldown {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(145deg, #5d4e75, #2c3e50) !important;
    border-color: #8e44ad !important;
}

.shortcut-slot.cooldown:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shortcut-icon {
    font-size: 1.1em;
    margin-bottom: 1px;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

.shortcut-name {
    font-size: 0.65em;
    color: #ecf0f1;
    text-align: center;
    font-weight: bold;
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.7);
}

.shortcut-cooldown {
    position: absolute;
    top: 1px;
    right: 1px;
    background: linear-gradient(145deg, #e74c3c, #c0392b);
    color: white;
    font-size: 0.6em;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: bold;
    border: 1px solid #922b21;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    min-width: 12px;
    text-align: center;
}

/* Settings cog for shortcuts */
.shortcut-settings {
    background: linear-gradient(145deg, #95a5a6, #7f8c8d);
    border: 1px solid #bdc3c7;
    border-radius: 6px;
    padding: 6px;
    width: 35px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.shortcut-settings:hover {
    background: linear-gradient(145deg, #bdc3c7, #95a5a6);
    border-color: #d5dbdb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

.settings-icon {
    font-size: 1.1em;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5));
}

/* Mobile Responsive for Skill Shortcuts */
@media (max-width: 768px) {
    .skill-shortcuts {
        gap: 4px;
        margin-top: 6px;
        padding: 4px;
    }
    
    .shortcut-slot {
        min-width: 58px;
        height: 50px;
        padding: 4px 6px;
    }
    
    /* Hide desktop-only slots on mobile */
    .shortcut-slot-desktop {
        display: none;
    }
    
    .shortcut-icon {
        font-size: 1em;
    }
    
    .shortcut-name {
        font-size: 0.6em;
    }
    
    .shortcut-cooldown {
        font-size: 0.55em;
        padding: 0px 2px;
        min-width: 10px;
    }
    
    .shortcut-settings {
        width: 30px;
        height: 50px;
        padding: 4px;
        margin-left: 3px;
    }
    
    .settings-icon {
        font-size: 1em;
    }
}

/* Mobile branding adjustments */
@media (max-width: 768px) {
    .branding-section {
        margin-top: 25px;
        padding-top: 15px;
    }
    
    .logo-container {
        gap: 8px;
        margin-bottom: 8px;
    }
    
    .logo-image {
        width: 28px;
        height: 28px;
    }
    
    .studio-text {
        font-size: 0.85em;
    }
    
    .version-number {
        font-size: 0.7em;
        padding: 2px 5px;
    }
}

/* Combat Settings Styles */
.combat-setting {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #666;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
    transition: all 0.2s ease;
}

.combat-setting:hover {
    border-color: #4a90e2;
    background: rgba(74, 144, 226, 0.05);
}

.setting-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.setting-name {
    color: #4a90e2;
    font-weight: bold;
    font-size: 1.1em;
}

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

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666;
    transition: 0.3s;
    border-radius: 24px;
    border: 2px solid #444;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

input:checked + .toggle-slider {
    background-color: #27ae60;
    border-color: #2ecc71;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-slider:hover {
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.4);
}

input:checked + .toggle-slider:hover {
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
}

/* Wimpy Controls */
.wimpy-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 5px;
    border: 1px solid #444;
}

.wimpy-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #666;
    outline: none;
    transition: all 0.2s ease;
}

.wimpy-slider::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.wimpy-slider::-webkit-slider-thumb:hover {
    background: #357abd;
    transform: scale(1.1);
}

.wimpy-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.wimpy-slider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wimpy-slider:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
    background: #666;
}

.wimpy-value {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.1em;
    min-width: 40px;
    text-align: center;
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

/* Mobile Combat Settings */
@media (max-width: 768px) {
    .combat-setting {
        padding: 12px;
        margin: 12px 0;
    }
    
    .setting-header {
        gap: 10px;
    }
    
    .setting-name {
        font-size: 1em;
    }
    
    .setting-description {
        font-size: 0.85em;
    }
    
    .wimpy-controls {
        gap: 10px;
        padding: 6px;
    }
    
    .toggle-switch {
        width: 45px;
        height: 22px;
    }
    
    .toggle-slider:before {
        height: 14px;
        width: 14px;
    }
    
    input:checked + .toggle-slider:before {
        transform: translateX(21px);
    }
}

/* Monster Inspection Button Styling */
.btn-inspect {
    background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
    border-color: #27ae60 !important;
    color: white !important;
    position: relative;
    overflow: hidden;
}

.btn-inspect:hover {
    background: linear-gradient(135deg, #2ecc71, #27ae60) !important;
    border-color: #229954 !important;
    box-shadow: 0 0 15px rgba(39, 174, 96, 0.6) !important;
    transform: translateY(-1px);
}

.btn-inspect::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #27ae60, #2ecc71, #27ae60);
    border-radius: 8px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-inspect:hover::before {
    opacity: 0.7;
    animation: inspectGlow 2s ease-in-out infinite alternate;
}

@keyframes inspectGlow {
    0% {
        box-shadow: 0 0 5px rgba(39, 174, 96, 0.5);
    }
    100% {
        box-shadow: 0 0 15px rgba(39, 174, 96, 0.8);
    }
}

/* Monster Inspection Modal Styles */
.monster-inspection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(3px);
}

.monster-name-clickable {
    cursor: pointer;
    text-decoration: underline;
    color: #f39c12;
    transition: all 0.2s ease;
    display: inline-block;
}

.monster-name-clickable:hover {
    color: #e67e22;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.6);
    transform: scale(1.05);
}

/* Shop Quantity Control Styles */
.shop-item-with-quantity {
    background: rgba(0,0,0,0.6);
    border: 1px solid #666;
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.2s ease;
}

.shop-item-with-quantity:hover {
    background: rgba(74,144,226,0.1);
    border-color: #4a90e2;
}

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

.item-header strong {
    color: #4a90e2;
    font-size: 1.1em;
}

.quantity-control {
    background: rgba(0,0,0,0.4);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}

.quantity-control label {
    color: #4a90e2;
    font-weight: bold;
    margin-right: 8px;
}

.quantity-control input[type="range"] {
    background: #666;
    height: 6px;
    border-radius: 3px;
    outline: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.quantity-control input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.quantity-control input[type="range"]::-webkit-slider-thumb:hover {
    background: #ffeb3b;
    transform: scale(1.1);
}

.quantity-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffd700;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mobile Shop Styles */
@media (max-width: 768px) {
    .shop-item-with-quantity {
        padding: 12px;
        margin: 8px 0;
    }
    
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .quantity-control {
        padding: 10px;
    }
    
    .quantity-control input[type="range"] {
        width: 100% !important;
        margin: 10px 0;
    }
}

/* Auth System - Spin Animation for Loading */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade In Animation for Password Field */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Damage Pulse Animation - Red pulsing border - SUBTLE */
@keyframes damagePulse {
    0% {
        border-color: #4a90e2;
        box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    }
    50% {
        border-color: #e74c3c;
        box-shadow: 0 0 15px rgba(231, 76, 60, 0.7), 0 0 30px rgba(231, 76, 60, 0.4);
    }
    100% {
        border-color: #4a90e2;
        box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    }
}

/* Healing Pulse Animation - Green pulsing border - SUBTLE */
@keyframes healingPulse {
    0% {
        border-color: #4a90e2;
        box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    }
    50% {
        border-color: #27ae60;
        box-shadow: 0 0 15px rgba(39, 174, 96, 0.7), 0 0 30px rgba(39, 174, 96, 0.4);
    }
    100% {
        border-color: #4a90e2;
        box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    }
}

/* Apply damage pulse to game-text - 0.6s total (golden ratio!) */
.game-text.damage-pulse {
    animation: damagePulse 0.6s ease-in-out;
}

/* Apply healing pulse to game-text - 0.6s total (golden ratio!) */
.game-text.healing-pulse {
    animation: healingPulse 0.6s ease-in-out;
}
