* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Main wrapper to constrain the entire website width */
.main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Loading Spinner */
.loading-spinner {
    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: 9999;
}

.spinner-content {
    text-align: center;
    color: white;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner-content p {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.9;
}

.container {
    margin: 0 auto;
    padding: 20px;
    z-index: 1;
}



.auth-status {
    color: white;
    font-size: 0.85rem;
    opacity: 0.8;
    white-space: nowrap;
}

.auth-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.auth-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.auth-btn.primary {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    font-weight: 600;
}

.auth-btn.primary:hover {
    background: white;
    transform: translateY(-2px);
}

/* Dynamic Content Styles */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: white;
    font-size: 1.2rem;
}

.back-to-hub {
    margin-bottom: 30px;
    text-align: left;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.error-message {
    text-align: center;
    padding: 60px 20px;
    color: white;
}

.error-message h3 {
    margin-bottom: 20px;
    color: #ff6b6b;
}

/* Navigation Button Styles */
.nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    min-width: 100px;
    margin: 0;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal h2 {
    color: #667eea;
    margin-bottom: 20px;
    text-align: center;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.field-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
}

.form-error {
    color: #ff6b6b;
    font-size: 14px;
    margin: 15px 0;
    padding: 10px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 5px;
    text-align: center;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.modal-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-btn.primary {
    background: #667eea;
    color: white;
}

.modal-btn.primary:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.modal-btn.secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e1e5e9;
}

.modal-btn.secondary:hover {
    background: #e9ecef;
}

.switch-mode {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.switch-mode a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

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

.quick-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 15px 20px;
    gap: 20px;
    overflow: visible;
}

.nav-section {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.auth-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    overflow: visible;
}


.footer {
    text-align: center;
    margin-top: 40px;
    color: white;
    opacity: 0.8;
}

/* Output Log Section */
.output-log-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.log-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 0 20px;
    min-height: 50px;
}

.log-tabs-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.log-tab {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
    margin: 0;
    height: 40px;
    display: flex;
    align-items: center;
}

.log-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.log-tab.active {
    color: white;
    border-bottom-color: #60a5fa;
    background: rgba(255, 255, 255, 0.1);
}

.log-content {
    display: none;
}

.log-content.active {
    display: block;
}

.output-log-section button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.output-log-section button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.clear-log-btn {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.clear-log-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    transform: scale(1.1);
}

.clear-log-btn:active {
    transform: scale(0.95);
}

.content-area {
    min-height: 10px;
    z-index: 1;
}

.output {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px;
    height: 600px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: white;
    border-radius: 10px;
    line-height: 1.4;
}

/* Colored text for status messages */
.output .success { color: #22c55e; font-weight: bold; }
.output .error { color: #ef4444; font-weight: bold; }
.output .warning { color: #f59e0b; font-weight: bold; }
.output .info { color: #3b82f6; font-weight: bold; }
.output .action { color: #a78bfa; font-weight: bold; }
.output .debug { color: #9ca3af; font-weight: normal; font-style: italic; }

/* Zone Map Styles */
.zone-map-container {
    position: relative;
    width: 100%;
    height: 500px;
    background: linear-gradient(135deg, #87CEEB 0%, #98FB98 100%);
    border: 2px solid #2c3e50;
    border-radius: 10px;
    overflow: visible;
    margin: 0;
}


/* Section Container Styles */
.section-container {
    width: 100%;
    transition: opacity 0.2s ease;
}

.section-container[style*="display: none"] {
    opacity: 0;
}

/* Combat Viewport Styles */
.combat-viewport-container {
    position: relative;
    width: 100%;
    min-height: 560px;
    background: linear-gradient(150deg, rgba(20,20,28,0.96), rgba(8,8,14,0.92));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 -1px 0 rgba(0, 0, 0, 0.4);
    padding: 24px;
    overflow: hidden;
    margin: 0;
    display: none; /* Initially hidden */
}

.combat-viewport-container.is-visible {
    display: block;
}

#combatViewport {
    height: 100%;
}

.combat-viewport-container canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.zone-node {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 10px;
    text-align: center;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 2;
    background: #6c757d;
    border: 3px solid #6c757d;
}

.zone-node:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.zone-node.current {
    background: #f39c12;
    border: 4px solid #f39c12;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.8);
    animation: pulse 2s infinite;
}

.zone-node.unlocked {
    background: #27ae60;
    border: 3px solid #27ae60;
}

.zone-node.connected {
    background: #3498db;
    border: 3px solid #3498db;
}

.zone-node.disconnected {
    background: #95a5a6;
    border: 3px solid #95a5a6;
    cursor: not-allowed;
}

.zone-node.non-adjacent {
    background: #bdc3c7;
    border: 3px solid #bdc3c7;
    cursor: not-allowed;
}

.zone-node.locked {
    background: #e74c3c;
    border: 3px solid #e74c3c;
    cursor: not-allowed;
}

/* Zone Connections */
.zone-connections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.zone-connection {
    stroke: #34495e;
    stroke-width: 3;
    opacity: 0.6;
}

.zone-connection.current {
    stroke: #f39c12;
    stroke-width: 4;
    opacity: 1;
}

.zone-connection.unlocked {
    stroke: #27ae60;
    stroke-width: 3;
    opacity: 0.8;
}

/* Section Styling */
.section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.section h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

/* Activity Cards */
.activity-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.activity-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.activity-card h4 {
    margin-bottom: 8px;
    color: #60a5fa;
}

.activity-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Loading state for activity cards */
.activity-card.loading {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.7;
    animation: pulse 2s infinite;
}

.activity-card.loading:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.activity-card.loading h4 {
    color: #f39c12;
}

/* Pulse Animation */
@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.8); }
    50% { box-shadow: 0 0 30px rgba(243, 156, 18, 1); }
    100% { box-shadow: 0 0 20px rgba(243, 156, 18, 0.8); }
}

/* Zone Map Header */
.zone-map-header {
    display: flex;
    justify-content: flex-end;
    margin: 0;
    height: 20px;
    align-items: center;
}

.toggle-btn {
    cursor: pointer;
    font-size: 12px;
    user-select: none;
    display: inline-block;
    background: none;
    border: none;
    color: white;
    transition: all 0.3s ease;
    padding: 2px;
    margin: 0;
    line-height: 1;
}

.toggle-btn:hover {
    transform: translateX(1px);
    opacity: 0.85;
}

/* Collapse the zone map container */
.zone-map-container.collapsed {
    display: none;
}

/* Map Toggle Button - positioned relative to map area */
.map-toggle-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a5568;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 16px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: #63b3ed;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile-friendly expand bar */
.map-expand-bar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #4299e1, #63b3ed);
    border: 2px solid #3182ce;
    border-radius: 12px;
    padding: 16px 24px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(66, 153, 225, 0.3);
    min-width: 200px;
    text-align: center;
    user-select: none;
}

.map-expand-bar:hover {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    border-color: #2c5282;
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 25px rgba(66, 153, 225, 0.4);
}

.map-expand-bar:active {
    transform: translateX(-50%) scale(0.98);
}

.expand-text {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    margin-bottom: 4px;
}

.keybind-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 400;
    display: block;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .map-expand-bar {
        padding: 20px 28px;
        min-width: 240px;
        border-radius: 16px;
    }
    
    .expand-text {
        font-size: 20px;
    }
    
    .keybind-text {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .map-expand-bar {
        padding: 18px 24px;
        min-width: 220px;
    }
    
    .expand-text {
        font-size: 18px;
    }
    
    .keybind-text {
        font-size: 14px;
    }
}


/* Map Overlay when collapsed */
.map-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 999;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #4a5568;
    border-radius: 12px;
    padding: 20px 30px;
    backdrop-filter: blur(4px);
}

.map-overlay-text {
    color: #e2e8f0;
    font-size: 24px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 1px;
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
    min-height: auto;
}

/* Ensure header and camps grid span full width in activities layout */
.activities-grid .camp-selection-header,
.activities-grid .camps-grid {
    grid-column: 1 / -1;
}

/* Camp Selection Styles */
.camp-selection-header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.camp-selection-header h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #60a5fa;
}

.character-level {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

.camps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.camp-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    color: white;
}

.camp-card:hover:not(.disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.camp-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.camp-header h4 {
    margin: 0;
    color: #60a5fa;
    font-size: 1.1rem;
}

.camp-level-range {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.camp-brackets {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bracket-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.bracket-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

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

.bracket-btn.active {
    background: rgba(96, 165, 250, 0.3);
    border-color: #60a5fa;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
}

.bracket-btn.loading {
    background: rgba(243, 156, 18, 0.2);
    border-color: #f39c12;
    cursor: not-allowed;
    animation: pulse 2s infinite;
}

/* Bracket-specific colors */
.bracket-btn.safe {
    border-left: 4px solid #27ae60;
}

.bracket-btn.safe:hover:not(:disabled) {
    background: rgba(39, 174, 96, 0.2);
}

.bracket-btn.standard {
    border-left: 4px solid #3498db;
}

.bracket-btn.standard:hover:not(:disabled) {
    background: rgba(52, 152, 219, 0.2);
}

.bracket-btn.risky {
    border-left: 4px solid #e74c3c;
}

.bracket-btn.risky:hover:not(:disabled) {
    background: rgba(231, 76, 60, 0.2);
}

.bracket-name {
    font-weight: 600;
    text-transform: capitalize;
}

.bracket-reward {
    font-size: 0.8rem;
    opacity: 0.8;
}

.camp-unavailable {
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #e74c3c;
    font-style: italic;
}

.loading-spinner-small {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.error-message {
    text-align: center;
    color: #e74c3c;
    padding: 20px;
    font-size: 0.9rem;
}

/* Button Styling */
button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    margin: 5px;
}

button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
}

.button:hover {
    background: #45a049;
}

.button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.log {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    max-height: 400px;
    overflow-y: auto;
    margin: 15px 0;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

/* Status Styles */
.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status.disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status.connecting {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Equipment Styles */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.equipment-slot {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: 2px solid #555;
    border-radius: 8px;
    overflow: visible;
}

.slot-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.empty-slot-text {
    color: #666;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

/* Tooltip */
.item-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #666;
    font-size: 12px;
    min-width: 140px;
    z-index: 1000;
    display: none;
}

.tooltip-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.tooltip-stat {
    margin: 2px 0;
    color: #ccc;
}

.tooltip-rarity.common   { color: #ccc; }
.tooltip-rarity.uncommon { color: #4caf50; }
.tooltip-rarity.rare     { color: #2196f3; }
.tooltip-rarity.epic     { color: #9c27b0; }
.tooltip-rarity.legendary{ color: #ff9800; }

.equipment-slot.equipped {
    border-color: #4CAF50;
    background-color: #f0f8f0;
}

/* Quality-based borders for equipped items */
.equipment-slot.rarity-common {
    border-color: #c0c0c0;
}

.equipment-slot.rarity-uncommon {
    border-color: #1eff00;
}

.equipment-slot.rarity-rare {
    border-color: #0070dd;
}

.equipment-slot.rarity-epic {
    border-color: #a335ee;
}

.equipment-slot.rarity-legendary {
    border-color: #ff8000;
}

.equipment-slot.empty {
    border-color: #ccc;
    background-color: #f9f9f9;
    color: #666;
}

.slot-name {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.item-name {
    font-size: 14px;
    margin-bottom: 5px;
}

.item-stats {
    font-size: 12px;
    color: #666;
}


/* Character Styles */
.character-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.character-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.character-item {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.character-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
}

.character-item.active {
    border-color: #28a745;
    background-color: #f0f8f0;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .quick-actions {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .nav-section {
        justify-content: center;
    }

    .auth-section {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .character-selection-inline {
        flex-direction: column;
        gap: 10px;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

/* Combat Log Styles */
.combat-log {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: 2px solid #34495e;
    border-radius: 15px;
    padding: 20px;
    margin: 0;
    color: #e2e8f0;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.combat-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a5568;
}

.combat-log-header h4 {
    color: #f7fafc;
    font-size: 1.5rem;
    margin: 0;
}

.combat-controls {
    display: flex;
    align-items: stretch;
    gap: 20px;
    flex-wrap: nowrap;
}

.combat-controls-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.combat-player-info {
    flex: 1;
    display: flex;
    justify-content: center;
}

.combat-enemy-info {
    flex: 1;
    display: flex;
    justify-content: center;
}

#player-frames-container, #enemy-frames-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.player-frame, .enemy-frame {
    position: relative;
    background: rgba(74, 85, 104, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    min-width: 180px;
    text-align: center;
    transition: all 0.3s ease;
}

.player-frame {
    background: rgba(74, 85, 104, 0.7);
    border: 2px solid rgba(72, 187, 120, 0.6);
    border-radius: 8px;
    padding: 10px;
    margin: 5px 0;
    position: relative;
}

.enemy-frame {
    background: rgba(74, 85, 104, 0.7);
    border: 2px solid rgba(245, 101, 101, 0.6);
    border-radius: 8px;
    padding: 10px;
    margin: 5px 0;
    position: relative;
}

.enemy-frame.defeated {
    opacity: 0.5;
    border-color: rgba(156, 163, 175, 0.6);
}

.player-frame:hover, .enemy-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Skill Cast Bar Styles */
.skill-cast-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 0 0 4px 4px;
    overflow: hidden;
    z-index: 5;
    border-top: 1px solid rgba(255, 107, 107, 0.6);
}

.skill-cast-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b 0%, #ff8e8e 50%, #ffa8a8 100%);
    width: 0%;
    transition: width 3000ms linear;
}

/* Cast rejection message styling */
.combat-action.cast-rejected {
    background: rgba(255, 0, 0, 0.1);
    border-left: 3px solid #ff6b6b;
    color: #ff6b6b;
}

.player-name, .enemy-name {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 8px;
    color: #f7fafc;
}

.player-hp, .enemy-hp {
    font-size: 0.9rem;
    margin-bottom: 6px;
    color: #e2e8f0;
}

.player-resource, .enemy-resource {
    font-size: 0.85rem;
    color: #cbd5e0;
    opacity: 0.9;
}

.pull-size-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pull-size-selector label {
    color: #cbd5e0;
    font-size: 0.9rem;
    font-weight: 500;
}

.pull-size-selector select {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: #f7fafc;
    border: 1px solid #4a5568;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pull-size-selector select:hover {
    border-color: #63b3ed;
    transform: translateY(-1px);
}

.pull-size-selector select:focus {
    outline: none;
    border-color: #63b3ed;
    box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.1);
}

#combat-log-display {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    min-height: 300px;
    height: calc(100% - 120px); /* Fill remaining space after header */
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

#combat-log-display p {
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(74, 85, 104, 0.3);
}

#combat-log-display p:last-child {
    border-bottom: none;
}

/* Combat Action Styles */
.combat-action {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 8px 12px;
    margin: 6px 0;
    border-left: 3px solid #4a5568;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #e2e8f0;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.combat-action:hover {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: #63b3ed;
    transform: translateX(2px);
}

.combat-action:last-child {
    margin-bottom: 0;
}

/* Specific action type styling */
.combat-action {
    border-left-color: #4a5568;
}

.combat-action.critical {
    border-left-color: #f56565;
    color: #fed7d7;
    font-weight: bold;
}

.combat-action.dodged {
    border-left-color: #38b2ac;
    color: #b2f5ea;
}

.combat-action.defeated {
    border-left-color: #ed8936;
    color: #fed7aa;
    background-color: rgba(170, 22, 92, 0.6);
}

.combat-action.level-up {
    border-left-color: #48bb78;
    color: #c6f6d5;
    font-weight: bold;
}

.combat-action.reward {
    border-left-color: #d69e2e;
    color: #fef5e7;
    background-color: rgba(214, 158, 46, 0.15);
    font-weight: bold;
}

.combat-action.item-reward {
    border-left-color: #9f7aea;
    color: #e9d8fd;
    background-color: rgba(159, 122, 234, 0.15);
    font-weight: bold;
    margin-left: 20px;
}

.combat-action.item-reward.no-indent {
    margin-left: 0;
}

.combat-action.spell-cast {
    border-left-color: #9f7aea;
    color: #e9d8fd;
    background-color: rgba(159, 122, 234, 0.15);
}

.combat-action.healing {
    border-left-color: #38a169;
    color: #c6f6d5;
}

.combat-action.auto-attack {
    border-left-color: #718096; /* blue-gray */
    color: #e2e8f0;
    background-color: rgba(113, 128, 150, 0.12); /* subtle blue-gray tint */
}

.combat-action.regen {
    border-left-color: #48bb78; /* green for health */
    color: #e6fffa; /* light mint text */
    background-color: rgba(72, 187, 120, 0.15); /* light green tint */
}

.combat-action.regen.health {
    border-left-color: #48bb78; /* green */
    color: #e6fffa; /* light mint text */
    background-color: rgba(72, 187, 120, 0.15); /* light green tint */
}

.combat-action.regen.mana {
    border-left-color: #4299e1; /* light blue */
    color: #e6f7ff; /* very light blue text */
    background-color: rgba(66, 153, 225, 0.15); /* light blue tint */
}

.combat-action.regen.energy {
    border-left-color: #ecc94b; /* light yellow */
    color: #fffbeb; /* very light yellow text */
    background-color: rgba(236, 201, 75, 0.15); /* light yellow tint */
}

.combat-action.regen.rage {
    border-left-color: #f56565; /* red */
    color: #fed7d7; /* light red text */
    background-color: rgba(245, 101, 101, 0.15); /* light red tint */
}

.combat-action.zone-no-spawns {
    border-left-color: #f6ad55;
    color: #fef5e7;
    font-style: italic;
}

/* Combat status display styles */
.combat-progress {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.combat-progress p {
    margin: 8px 0;
    color: #e2e8f0;
    font-weight: 500;
}

.mob-status, .player-status {
    background: rgba(74, 85, 104, 0.2);
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    border-left: 3px solid #4a5568;
}

.mob-status {
    border-left-color: #f56565;
}

.player-status {
    border-left-color: #48bb78;
}

.mob-status p, .player-status p {
    margin: 5px 0;
    color: #cbd5e0;
    font-size: 0.9rem;
}

.combat-controls-header {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Combat Skills Row */
.combat-skills-row {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skills-container {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.skill-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(74, 85, 104, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 80px;
    height: 80px;
    aspect-ratio: 1;
}

.skill-slot:hover {
    border-color: #63b3ed;
    background: rgba(74, 85, 104, 0.5);
    transform: translateY(-2px);
}

.skill-slot:active {
    transform: translateY(0);
}

.skill-slot.on-cooldown {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* Block clicks while cooling down */
}

.skill-icon {
    font-size: 1.5rem;
    line-height: 1;
    color: #e2e8f0;
    font-weight: 500;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.skill-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.skill-icon span {
    font-size: 0.75rem;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
}

.skill-cooldown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Radial progress using CSS variable --cd-pct (0..1) */
    background:
        conic-gradient(#63b3ed calc(var(--cd-pct, 0) * 360deg), rgba(255,255,255,0.08) 0),
        rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7fafc;
    font-size: 0.8rem;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.skill-slot.on-cooldown .skill-cooldown {
    opacity: 1;
}

/* Allow autocast toggle even when slot is on cooldown */
.skill-slot.on-cooldown .skill-autocast {
    pointer-events: auto;
}

.no-skills {
    color: #cbd5e0;
    font-size: 0.9rem;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.skill-autocast {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.3;
}

.skill-autocast.enabled {
    background: rgba(255, 215, 0, 0.8);
    opacity: 1;
}

.skill-autocast:hover {
    opacity: 1;
    transform: scale(1.1);
}

.autocast-icon {
    font-size: 10px;
    color: white;
    font-weight: bold;
}

.skill-slot.autocast-enabled {
    border: 1px solid #ffd700;
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

/* Disabled state when casting */
.skill-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background: rgba(74, 85, 104, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-slot.disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(74, 85, 104, 0.3);
}

/* Casting state */
.skill-slot.casting {
    border: 1px solid #ff6b6b;
    box-shadow: 0 0 8px rgba(255, 107, 107, 0.4);
    background: rgba(255, 107, 107, 0.1);
}

.skill-slot.casting::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 107, 107, 0.1) 50%, transparent 70%);
    animation: casting-shimmer 1.5s infinite;
    pointer-events: none;
}

@keyframes casting-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}



/* Combat Log Filters */
.combat-log-filters {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

.filter-checkbox:hover {
    opacity: 0.8;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #63b3ed;
    cursor: pointer;
}

.filter-label {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

/* Combat log scrollbar styling */
#combat-log-display::-webkit-scrollbar {
    width: 8px;
}

#combat-log-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

#combat-log-display::-webkit-scrollbar-thumb {
    background: rgba(74, 85, 104, 0.5);
    border-radius: 4px;
}

#combat-log-display::-webkit-scrollbar-thumb:hover {
    background: rgba(74, 85, 104, 0.7);
}

/* Auto-scroll indicator */
.auto-scroll-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffcc00;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.9;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.6; }
}

/* Resource Bar Styles - Reusable for HP and MP */
.resource-bar-container {
    width: 100%;
    height: 20px;
    background-color: #374151;
    border-radius: 10px;
    overflow: visible;
    position: relative;
    margin: 5px 0;
}

/* Experience bar (slimmer) */
.xp-bar-container {
    height: 6px; /* ~1/3 of 20px resource bars */
    margin-top: 6px;
}

.xp-bar {
    background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 100%); /* sky blue */
}

.xp-bar-container .resource-bar-text {
    font-size: 10px;
}

.resource-bar {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

.resource-bar-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

/* Specific bar types */
.health-bar {
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
}

.enemy-bar {
    background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.mana-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

/* Additional resource bars */
.energy-bar {
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.rage-bar {
    background: linear-gradient(90deg, #ef4444 0%, #b91c1c 100%);
}

/* Mobile-friendly tap/selection behavior for skills */
.skill-slot, .skill-slot *, .skill-button, .skills-panel, .skills-grid {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.skill-cooldown, .skill-cooldown * {
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

/* Damage Number Styles */
.damage-number {
    position: absolute;
    font-weight: bold;
    font-size: 18px;
    z-index: 9999;
    pointer-events: none;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background-color: red;
    color: white;
    border: 2px solid yellow;
    padding: 5px;
    border-radius: 4px;
}

@keyframes damageFloat {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
}

/* Admin Panel Styles */
.admin-section {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* Admin console theme (high-contrast, cohesive) */
.admin-section {
  background: #162132; /* softer dark slate */
  color: #e2e8f0;      /* light slate */
  border: 1px solid #253247;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.25) inset;
}
.admin-section h3, .admin-section h4 {
  color: #a5b4fc; /* indigo-300 for softer headings */
  margin-top: 0;
}
.admin-section label, .admin-section .status-message {
  color: #d1d5db; /* slate-300 */
}
.admin-section input,
.admin-section select,
.admin-section textarea {
  background: #0f1724 !important; /* very dark but not black */
  color: #e2e8f0 !important;
  border: 1px solid #334155;
  border-radius: 4px;
  padding: 6px 8px;
}
.admin-section select option {
  background: #0f1724;
  color: #e2e8f0;
}
.admin-section input:focus,
.admin-section select:focus,
.admin-section textarea:focus {
  outline: none;
  border-color: #64748b; /* muted slate */
  box-shadow: 0 0 0 2px rgba(100,116,139,0.25);
}
.admin-btn {
  background: #3b82f6; /* blue-500, a bit softer */
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.admin-btn:hover { background: #2563eb; }
.admin-btn.secondary {
  background: #475569; /* slate-600 */
  color: #f1f5f9;
}
.admin-btn.secondary:hover { background: #3f4a63; }
.admin-btn.danger { background: #b91c1c; }
.admin-btn.danger:hover { background: #991b1b; }

/* Compact stats table for admin metrics */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stats-table th, .stats-table td {
  border: 1px solid #253247;
  padding: 6px 8px;
}
.stats-table thead th {
  background: #1b2a40; /* cohesive with admin-section */
  color: #cfe8ff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.stats-table tbody tr:nth-child(odd) { background: #111b2b; }
.stats-table tbody tr:nth-child(even) { background: #0f1828; }
.stats-table td:last-child, .stats-table th:last-child { text-align: right; }
.form-actions .admin-btn { margin-right: 8px; }

.admin-subtabs { margin-bottom: 10px; display: flex; gap: 8px; align-items: center; }

/* Equipment admin grid */
.admin-equipment-container {
  border: 1px solid #253247;
  padding: 12px;
  border-radius: 6px;
  background: #121d2e;
}
.admin-equipment-container h3 { margin-top: 8px; }
.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.equipped-items, .unequipped-items {
  background: #132033;
  padding: 10px;
  border: 1px solid #253247;
  border-radius: 4px;
}

/* Admin metrics preformatted block */
#adminMetricsOutput {
  background: #101a2b !important;
  color: #dbeafe !important;
  border: 1px solid #253247;
}

/* Compact stats table for admin metrics */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.stats-table th, .stats-table td {
  border: 1px solid #2a2a2a;
  padding: 6px 8px;
}
.stats-table thead th {
  background: #1b1b1b;
  color: #cfe8ff;
  position: sticky;
  top: 0;
}
.stats-table tbody tr:nth-child(odd) {
  background: #111;
}
.stats-table tbody tr:nth-child(even) {
  background: #0e0e0e;
}
.stats-table td:last-child, .stats-table th:last-child {
  text-align: right;
}
.form-actions .admin-btn {
  margin-right: 8px;
}

/* Equipment admin grid */
.admin-equipment-container {
  border: 1px solid #2a2a2a;
  padding: 8px;
  border-radius: 4px;
  background: #0f0f0f;
}
.admin-equipment-container h3 {
  margin-top: 8px;
}
.equipment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.equipped-items, .unequipped-items {
  background: #121212;
  padding: 8px;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
}

.admin-section h3 {
    margin-top: 0;
    color: var(--text-primary);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: monospace;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.admin-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-right: 10px;
    margin-bottom: 10px;
}

.admin-btn:hover {
    background: var(--accent-hover);
}

.admin-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.admin-btn.secondary:hover {
    background: var(--border-color);
}

.admin-btn.danger {
    background: #dc3545;
}

.admin-btn.danger:hover {
    background: #c82333;
}

.mob-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
}

.mob-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.mob-item:hover {
    background: var(--bg-secondary);
}

.mob-item.selected {
    background: var(--accent-color);
    color: white;
}

.mob-item:last-child {
    border-bottom: none;
}

.loot-preview {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    font-family: monospace;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

.status-message {
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* Item Browser Styles */
.item-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    margin-top: 15px;
}

.item-entry {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.item-entry:hover {
    background: var(--bg-secondary);
}

.item-entry.selected {
    background: var(--accent-color);
    color: white;
}

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

.item-name {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.item-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.item-type, .item-level, .item-rarity {
    padding: 2px 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.item-id {
    font-size: 0.8em;
    color: var(--text-muted);
    font-family: monospace;
}

.item-details {
    margin-top: 15px;
    padding: 15px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.item-details h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
}

.item-detail-row {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.item-detail-row strong {
    color: var(--text-primary);
    margin-right: 8px;
}

.rarity-common { color: #9d9d9d; }
.rarity-uncommon { color: #1eff00; }
.rarity-rare { color: #0070dd; }
.rarity-epic { color: #a335ee; }
.rarity-legendary { color: #ff8000; }

.admin-btn.small {
    padding: 6px 12px;
    font-size: 0.9em;
    margin-top: 10px;
}

.loading, .no-items {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-style: italic;
}

/* Equipment Management Styles */
.equipment-layout {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    justify-content: center;
}

.equipment-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 200px;
}

.equipment-slot {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.equipment-slot:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.slot-header h5 {
    margin: 0 0 5px 0;
    color: white;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-weight: 600;
}
.equipped-item {
    text-align: center;
    width: 100%;
}

.equipped-item .item-name {
    font-weight: bold;
    font-size: 12px;
    color: white;
    margin-bottom: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.equipped-item .item-stat {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
}

.equipped-item .item-rarity {
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    padding: 1px 4px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    margin-top: 3px;
    display: inline-block;
}

.equipped-item .item-rarity.common { color: #9d9d9d; }
.equipped-item .item-rarity.uncommon { color: #1eff00; }
.equipped-item .item-rarity.rare { color: #0070dd; }
.equipped-item .item-rarity.epic { color: #a335ee; }
.equipped-item .item-rarity.legendary { color: #ff8000; }

.empty-slot {
    text-align: center;
    width: 100%;
}

.empty-slot .no-item {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 12px;
}

/* RPG-Style Equipment Layout */
.equipment-layout-rpg {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
}

/* Equipped items grid and combat stats panel */
.equipped-items-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: flex-start;
}

.equipped-items-wrapper .equipment-layout-rpg {
    flex: 1 1 600px;
    max-width: 700px;
    min-width: 500px;
    margin: 0;
}

.combat-stats-panel {
    flex: 0 1 320px;
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 18px 20px;
    color: #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
    min-width: 260px;
}

.combat-stats-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.combat-stats-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f8fafc;
}

.combat-stats-refresh {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    font-size: 0.9rem;
}

.combat-stats-refresh:hover,
.combat-stats-refresh:focus {
    background: rgba(148, 163, 184, 0.25);
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

.combat-stats-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.combat-stats-group {
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    padding: 12px 14px;
}

.combat-stats-group h5 {
    margin: 0 0 8px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.combat-stats-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.combat-resistances-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 10px;
}

.combat-resistance {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
    padding: 6px 10px;
}

.combat-resistance-label {
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
}

.combat-resistance-value {
    font-weight: 600;
    color: #f8fafc;
}

.combat-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.9rem;
    color: #e2e8f0;
}

.combat-stat-label {
    color: #cbd5f5;
    font-weight: 500;
    word-break: break-word;
}

.combat-stat-value {
    color: #f1f5f9;
    font-weight: 600;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.combat-stat-detail {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94a3b8;
}

.combat-stats-status {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.9rem;
    color: #cbd5f5;
    line-height: 1.4;
}

.combat-stats-status.loading {
    color: #bfdbfe;
}

.combat-stats-status.updating {
    color: #fbbf24;
}

.combat-stats-status.error {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.55);
}

.combat-stats-status.empty {
    color: #94a3b8;
}

.combat-stats-status.error p {
    margin: 0 0 8px;
}

.combat-stats-retry {
    background: rgba(248, 113, 113, 0.2);
    border: 1px solid rgba(248, 113, 113, 0.5);
    color: #fee2e2;
    border-radius: 6px;
    padding: 4px 12px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.combat-stats-retry:hover,
.combat-stats-retry:focus {
    background: rgba(248, 113, 113, 0.32);
}


/* Character Silhouette */
.character-silhouette {
    position: relative;
    width: 160px;
    height: 240px;
    z-index: 1;
}

.silhouette-body {
    position: relative;
    width: 100%;
    height: 100%;
}

.silhouette-head {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.silhouette-torso {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.silhouette-arms {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: 100px;
}

.silhouette-arm-left,
.silhouette-arm-right {
    position: absolute;
    top: 0;
    width: 30px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

.silhouette-arm-left {
    left: -20px;
}

.silhouette-arm-right {
    right: -20px;
}

.silhouette-legs {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 120px;
}

.silhouette-leg-left,
.silhouette-leg-right {
    position: absolute;
    top: 0;
    width: 30px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
}

.silhouette-leg-left {
    left: 5px;
}

.silhouette-leg-right {
    right: 5px;
}

/* Equipment Slots Container */
.equipment-slots-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.equipment-slot {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    padding: 6px;
    pointer-events: auto;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.equipment-slot:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* Position equipment slots around the character - armor on left side */
.equipment-slot-head {
    top: 5px;
    left: 35px;
}

.equipment-slot-neck {
    top: 60px;
    right: 35px;
}

.equipment-slot-shoulders {
    top: 95px;
    right: 35px;
}

.equipment-slot-chest {
    top: 130px;
    left: 35px;
}

.equipment-slot-hands {
    top: 185px;
    left: 35px;
}

.equipment-slot-waist {
    top: 220px;
    right: 35px;
}

.equipment-slot-legs {
    top: 255px;
    left: 35px;
}

.equipment-slot-feet {
    top: 320px;
    left: 35px;
}

/* Weapons moved to bottom center */
.equipment-slot-main_hand {
    top: 300px;
    left: calc(40% - 35px);
}

.equipment-slot-off_hand {
    top: 300px;
    left: calc(60% - 35px);
}

/* Accessories - all on right side */
.equipment-slot-ring1 {
    top: 130px;
    right: 35px;
}

.equipment-slot-ring2 {
    top: 165px;
    right: 35px;
}

.equipment-slot-relic1 {
    top: 200px;
    right: 35px;
}

.equipment-slot-relic2 {
    top: 235px;
    right: 35px;
}

/* Equipment slot content for RPG layout */
.equipment-layout-rpg .slot-header h5 {
    margin: 0;
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.equipment-slot {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    border: 2px solid #555;
    border-radius: 8px;
    overflow: visible;
}

.slot-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.empty-slot-text {
    color: #666;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

/* Tooltip */
.item-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #666;
    font-size: 12px;
    min-width: 140px;
    z-index: 1000;
    display: none;
}

.tooltip-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.tooltip-rarity.common   { color: #ccc; }
.tooltip-rarity.uncommon { color: #4caf50; }
.tooltip-rarity.rare     { color: #2196f3; }
.tooltip-rarity.epic     { color: #9c27b0; }
.tooltip-rarity.legendary{ color: #ff9800; }

.equipment-layout-rpg .equipped-item .item-name {
    font-weight: 600;
    color: #f7fafc;
    font-size: 10px;
    line-height: 1.2;
    margin-bottom: 2px;
}

.equipment-layout-rpg .equipped-item .item-stat {
    font-size: 8px;
    color: #a0aec0;
    margin-bottom: 1px;
}

.equipment-layout-rpg .equipped-item .item-rarity {
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 2px;
}

.equipment-layout-rpg .empty-slot {
    color: #718096;
    font-style: italic;
    text-align: center;
    font-size: 10px;
}

.equipment-layout-rpg .empty-slot .no-item {
    font-size: 10px;
}

/* Quality-based borders for equipped items in RPG layout */
.equipment-layout-rpg .equipment-slot.rarity-common {
    border-color: #c0c0c0;
}

.equipment-layout-rpg .equipment-slot.rarity-uncommon {
    border-color: #1eff00;
}

.equipment-layout-rpg .equipment-slot.rarity-rare {
    border-color: #0070dd;
}

.equipment-layout-rpg .equipment-slot.rarity-epic {
    border-color: #a335ee;
}

.equipment-layout-rpg .equipment-slot.rarity-legendary {
    border-color: #ff8000;
}

@media (max-width: 1024px) {
    .equipped-items-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .combat-stats-panel {
        width: 100%;
        min-width: 0;
    }
}

@media (min-width: 1024px) {
    .equipped-items-wrapper {
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .combat-stats-panel {
        align-self: stretch;
    }
}

/* Responsive design for equipment layout */
@media (max-width: 768px) {
    .equipment-layout {
        flex-direction: column;
        gap: 20px;
    }

    .equipment-column {
        min-width: auto;
    }

    .equipment-layout-rpg {
        padding: 20px;
        min-height: 400px;
    }

    .equipped-items-wrapper {
        gap: 20px;
    }

    .combat-stats-panel {
        padding: 16px;
    }

    .combat-stat-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .combat-stat-value {
        width: 100%;
        justify-content: space-between;
    }

    .combat-resistances-grid {
        grid-template-columns: 1fr;
    }

    .character-silhouette {
        width: 150px;
        height: 225px;
    }

    .equipment-slot {
        width: 60px;
        height: 60px;
        padding: 6px;
    }
}

/* Mobile Responsive Equipment Layout */
@media (max-width: 768px) {
    .equipment-layout-rpg {
        min-height: auto;
        padding: 20px;
    }

    .combat-stats-panel {
        padding: 16px;
    }

    .character-silhouette {
        display: none;
    }

    .equipment-slots-container {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        padding: 20px;
    }

    .equipment-slot {
        position: relative;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 100%;
        height: 70px;
        margin-bottom: 10px;
    }

    /* Mobile layout order: Left column (armor), Right column (accessories), Weapons at bottom */
    .equipment-slot-head,
    .equipment-slot-chest,
    .equipment-slot-hands,
    .equipment-slot-legs,
    .equipment-slot-feet {
        grid-column: 1;
    }

    .equipment-slot-neck,
    .equipment-slot-shoulders,
    .equipment-slot-ring1,
    .equipment-slot-ring2,
    .equipment-slot-waist,
    .equipment-slot-relic1,
    .equipment-slot-relic2 {
        grid-column: 2;
    }

    .equipment-slot-main_hand,
    .equipment-slot-off_hand {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 200px;
        margin: 10px auto;
    }

    .equipment-slot-main_hand {
        order: 1;
    }

    .equipment-slot-off_hand {
        order: 2;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .equipment-slots-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .equipment-slot {
        grid-column: 1;
    }

    .equipment-slot-main_hand,
    .equipment-slot-off_hand {
        max-width: 150px;
    }
}

/* Skills Panel Styles */
.skills-panel {
    padding: 20px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.skill-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skill-card.available {
    border-color: rgba(99, 179, 237, 0.6);
    background: rgba(99, 179, 237, 0.1);
}

.skill-card.locked {
    border-color: rgba(245, 101, 101, 0.6);
    background: rgba(245, 101, 101, 0.1);
    opacity: 0.7;
}

.skill-card.learned {
    border-color: rgba(72, 187, 120, 0.6);
    background: rgba(72, 187, 120, 0.1);
}

.skill-card h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: bold;
}

.skill-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skill-level {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.skill-cooldown {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.skill-info-cost {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.skill-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.skill-requirements-locked {
    margin-top: 10px;
}

.skill-requirements-locked span {
    background: rgba(245, 101, 101, 0.2);
    color: #f56565;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(245, 101, 101, 0.3);
}

.skill-autocast-requirements {
    margin-top: 8px;
}

.skill-autocast-requirements span {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

/* Currency styling */
.currency-gold {
    color: #ffd700;
    font-weight: 600;
}

.currency-silver {
    color: #c0c0c0;
    font-weight: 500;
}

.currency-separator {
    color: #ffffff;
    font-weight: normal;
}

.skill-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    flex-grow: 1;
}

.skill-requirements span {
    background: rgba(0, 0, 0, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
}

.skill-button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin-top: auto;
}

.skill-button.available {
    background: #63b3ed;
    color: white;
}

.skill-button.available:hover {
    background: #4299e1;
    transform: translateY(-2px);
}

.skill-button.locked {
    background: #f56565;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

.skill-button.learned {
    background: #48bb78;
    color: white;
    cursor: default;
}

.skill-button.learned:hover {
    background: #38a169;
}

.equipment-layout-rpg {
    display: flex;
    justify-content: center;
    padding: 20px;
    min-height: 525px;
}

.character-area {
    display: grid;
    grid-template-columns: auto 160px auto; /* left | silhouette | right */
    grid-template-rows: auto auto;
    gap: 8px;
    align-items: end;
}

/* Column of slots - curved layout */
.slot-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
}

/* Left side circular arc positioning - 5 slots */
.slot-col.left .equipment-slot:nth-child(1) { transform: translateY(-15px) translateX(10px); } /* Helm - near head */
.slot-col.left .equipment-slot:nth-child(2) { transform: translateY(-10px) translateX(-35px); } /* Armor - upper arc (closer to center) */
.slot-col.left .equipment-slot:nth-child(3) { transform: translateY(-10px) translateX(-70px); }  /* Gloves - middle arc (furthest) */
.slot-col.left .equipment-slot:nth-child(4) { transform: translateY(5px) translateX(-65px); } /* Pants - lower arc */
.slot-col.left .equipment-slot:nth-child(5) { transform: translateY(20px) translateX(-50px); } /* Boots - bottom arc */

/* Right side circular arc positioning - 5 slots (symmetrical) */
.slot-col.right .equipment-slot:nth-child(1) { transform: translateY(-15px) translateX(-10px); } /* Neck - top of arc (more centered) */
.slot-col.right .equipment-slot:nth-child(2) { transform: translateY(-10px) translateX(35px); }  /* Shoulders - upper arc (closer to center) */
.slot-col.right .equipment-slot:nth-child(3) { transform: translateY(-10px) translateX(70px); }  /* Ring 1 - middle arc (furthest) */
.slot-col.right .equipment-slot:nth-child(4) { transform: translateY(5px) translateX(65px); }  /* Ring 2 - lower arc */
.slot-col.right .equipment-slot:nth-child(5) { transform: translateY(20px) translateX(50px); }  /* Belt - bottom arc */

/* Left side circular arc positioning - 5 slots */
.slot-col.left .equipment-slot:nth-child(2) { transform: translateY(-10px) translateX(-45px); } /* Armor - upper arc (furthest) */
.slot-col.left .equipment-slot:nth-child(3) { transform: translateY(0px)   translateX(-65px); } /* Gloves - middle (closer in) */

/* Right side circular arc positioning - 5 slots (symmetrical) */
.slot-col.right .equipment-slot:nth-child(2) { transform: translateY(-10px) translateX(45px); }  /* Shoulders - upper arc (furthest) */
.slot-col.right .equipment-slot:nth-child(3) { transform: translateY(0px)   translateX(65px); }  /* Ring 1 - middle (closer in) */


/* Center silhouette */
.silhouette-col {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-row: 1 / 2;
    grid-column: 2;
}

.character-silhouette {
    width: 160px;
    height: 240px;
}

/* Weapons row spans all 3 columns */
.weapons-row {
    grid-column: 1 / 4;
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* Slot styling */
.equipment-slot {
    width: 64px;
    height: 64px;
    background: #222;
    border: 2px solid #555;
    border-radius: 8px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.equipment-slot-drop-hover {
    border-color: #ffd75f;
    box-shadow: 0 0 8px rgba(255, 215, 95, 0.7);
    background: rgba(255, 215, 95, 0.08);
}

.equipment-slot-drop-hover img {
    filter: brightness(1.1) saturate(1.05);
}

/* Relic slots - smaller and closer to weapons */
.equipment-slot[data-slot="SIGIL1"],
.equipment-slot[data-slot="SIGIL2"] {
    width: 48px;
    height: 48px;
    font-size: 10px;
}

/* Weapon slots - 20% taller and moved down */
.equipment-slot[data-slot="MAIN_HAND"],
.equipment-slot[data-slot="OFF_HAND"] {
    height: 77px; /* 64px * 1.2 = 76.8px, rounded to 77px */
    transform: translateY(20px);
}

/* Empty slot styling */
.equipment-slot .empty-slot-image {
    opacity: 0.35;
    filter: grayscale(100%) brightness(150%);
}

.equipment-slot .empty-slot-text {
    opacity: 0.6;
    color: #888;
    font-style: italic;
}

/* Alternative: if we add .empty class to the slot container */
.equipment-slot.empty {
    border: 2px dashed #666;
    background-color: rgba(20, 20, 20, 0.7);
}

.equipment-slot.empty img {
    opacity: 0.35;
    filter: grayscale(100%) brightness(150%);
}

/* Responsive: tablet → 2 columns side by side */
@media (max-width: 768px) {
    .character-silhouette {
        display: none;
    }
    .character-area {
        grid-template-columns: 1fr 1fr; /* left | right */
        grid-template-rows: auto auto; /* slots | weapons */
    }
    .slot-col.left {
        grid-column: 1;
        grid-row: 1;
    }
    .slot-col.right {
        grid-column: 2;
        grid-row: 1;
    }
    .weapons-row {
        grid-column: 1 / 3;
        grid-row: 2;
        display: flex;
        justify-content: center;
        gap: 40px;
    }
}

/* Responsive: mobile → single column */
@media (max-width: 480px) {
    .character-area {
        grid-template-columns: 1fr;
    }
    .weapons-row {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

/* Loading spinner for zone map */
.zone-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: zone-spin 1s linear infinite;
    margin-bottom: 10px;
}

.loading-text {
    font-size: 16px;
    color: #ecf0f1;
}

@keyframes zone-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error message styling */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #ecf0f1;
}

.error-message h3 {
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message p {
    margin-bottom: 10px;
    color: #bdc3c7;
}

.error-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.retry-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.retry-btn:hover {
    background: #229954;
}

/* Character gold display */
.character-gold-display {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
    padding: 6px 12px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.character-gold-display:hover::before {
    left: 100%;
}

.character-gold-display:hover {
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.1);
    transform: translateY(-1px);
}

.gold-label {
    display: none;
}

.gold-amount {
    color: #ffd700;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Currency styling */
.currency-gold {
    color: #ffd700;
    font-weight: bold;
}

.currency-silver {
    color: #c0c0c0;
    font-weight: bold;
}

.currency-copper {
    color: #cd7f32;
    font-weight: bold;
}

.currency-gold-compact {
    color: #ffd700;
    font-weight: bold;
    font-size: 0.9em;
}

.currency-silver-compact {
    color: #c0c0c0;
    font-weight: bold;
    font-size: 0.9em;
}

.currency-copper-compact {
    color: #cd7f32;
    font-weight: bold;
    font-size: 0.9em;
}

.currency-separator {
    color: #888;
    font-weight: normal;
}

/* Perfectly centered icon + label */
.discord-btn{
  width:100%;
  border:0;
  border-radius:12px;
  padding:14px 16px;
  background:#5865F2;
  color:#fff;
  font-weight:700;
  font-size:16px;
  cursor:pointer;

  /* center layout */
  display:grid;
  grid-auto-flow:column;
  align-items:center;
  justify-content:center;   /* centers the whole row */
  column-gap:10px;

  box-shadow:0 1px 2px rgba(0,0,0,.08);
}
.discord-btn:hover{ background:#4752C4; }
.discord-btn:active{ background:#3C45A5; transform:translateY(1px); }
.discord-btn:focus-visible{ outline:2px solid #fff; outline-offset:2px; }
.discord-icon{ width:22px; height:22px; display:block; }

/* phantom cell to balance the icon on the right side */
.discord-btn::after{ content:""; width:22px; }

/* nuke any inherited weird margins */
.discord-btn > *{ margin:0 !important; }

/* Debug buttons */
.debug-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin: 5px;
    font-size: 14px;
}

.debug-btn:hover {
    background: #0056b3;
}

.debug-btn:active {
    background: #004085;
}

/* Autocast Priority Section */
.autocast-priority-section {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.autocast-priority-section:hover {
    border-color: rgba(99, 179, 237, 0.6);
    background: rgba(99, 179, 237, 0.1);
}

.autocast-priority-section h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.priority-list {
    margin-bottom: 15px;
}

.priority-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.priority-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.priority-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #63b3ed 0%, #3182ce 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-name {
    flex: 1;
    font-weight: 500;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.priority-controls {
    display: flex;
    gap: 4px;
}

.priority-btn {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #ffffff;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.priority-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #63b3ed 0%, #3182ce 100%);
    border-color: rgba(99, 179, 237, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.priority-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
}

.priority-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.priority-action-btn {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.priority-action-btn.primary {
    background: linear-gradient(135deg, #63b3ed 0%, #3182ce 100%);
    color: white;
    border-color: rgba(99, 179, 237, 0.6);
}

.priority-action-btn.primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    border-color: rgba(99, 179, 237, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.priority-action-btn.secondary {
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.priority-action-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

