:root {
    --bg-dark: #1a1c20;
    --bg-panel: #23262b;
    --bg-header: #2c3036;
    --sidebar-bg: #15171a;
    --accent-color: #5c9b68;
    /* Melvor-ish Green */
    --accent-hover: #6db57a;
    --text-main: #e0e0e0;
    --text-muted: #9aa0a6;
    --border-color: #383c42;
    --gold-color: #ffd700;
    --danger-color: #d32f2f;
    --hp-color: #e53935;
    --exp-color: #fb8c00;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    cursor: url('assets/cursor_resized.png'), auto;
}

/* Mini Combat UI (shown when in other tabs) */
.mini-combat-ui {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    background: linear-gradient(135deg, #1a1d24 0%, #2a2d35 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mini-combat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-combat-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mini-combat-header span:first-child {
    font-weight: 600;
    color: var(--text-main);
    font-size: 14px;
}

.mini-combat-status {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--bg-header);
    color: var(--text-muted);
}

.mini-combat-status.active {
    background: var(--accent-color);
    color: white;
}

.mini-combat-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-combat-monster,
.mini-combat-player {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mini-combat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.mini-combat-hp-bar {
    width: 100%;
    height: 20px;
    background-color: #111;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.mini-combat-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff4444, #ff6666);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.mini-combat-hp-fill.player-hp {
    background: linear-gradient(90deg, #4caf50, #66bb6a);
}

.mini-combat-hp-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 1;
    white-space: nowrap;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

/* Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 32px;
    height: 32px;
}

.sidebar-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: var(--accent-color);
}

.sidebar-nav {
    flex: 1 1 auto;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: 100%;
}

.nav-category {
    padding: 15px 20px 8px 20px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-item {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-main);
    padding: 12px 20px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-item:hover:not(:disabled) {
    background-color: rgba(92, 155, 104, 0.1);
    color: var(--accent-color);
}

.nav-item.active {
    background-color: rgba(92, 155, 104, 0.2);
    color: var(--accent-color);
    border-left: 3px solid var(--accent-color);
}

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

.nav-level-req {
    font-size: 10px;
    color: var(--danger-color);
    font-weight: 600;
    margin-left: auto;
    padding-left: 8px;
}

.nav-icon {
    font-size: 16px;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-shrink: 0;
}

.user-info-container {
    display: none;
    padding: 8px;
    background: rgba(92, 155, 104, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(92, 155, 104, 0.2);
}

.user-info-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-align: left;
}

.username-display {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 13px;
    margin-bottom: 8px;
    text-align: left;
}

.logout-btn {
    margin-top: 4px;
    padding: 6px 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    width: 100%;
    transition: all 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

.logout-btn:active {
    transform: translateY(0);
}

.version-info {
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Header */
.top-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    gap: 30px;
    align-items: center;
}

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

.infinite-yang-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.infinite-yang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.infinite-yang-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.infinite-level-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.infinite-level-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.infinite-level-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.level-control-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.level-control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.level-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.level-reset-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.level-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ee5a6f 0%, #ff6b6b 100%);
}

.level-reset-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: white;
}

.gold-text {
    color: var(--gold-color);
}

.xp-stat {
    flex: 1;
    max-width: 300px;
}

.xp-bar-wrapper {
    position: relative;
    width: 100%;
    height: 20px;
    background-color: #111;
    border-radius: 10px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--exp-color) 0%, #ffb74d 100%);
    width: 0%;
    transition: width 0.3s;
}

.xp-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

/* Content Area */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Hide all panels by default - prevent flash on page load */
.game-panel {
    display: none;
}

/* Show active panel - use !important to ensure visibility */
.game-panel.active-panel {
    display: block !important;
}


.panel-header {
    margin-bottom: 20px;
}

.panel-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 24px;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.panel-header p,
.panel-description {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: normal;
    margin-top: 5px;
}

/* Blacksmith specific panel header styles */
#tab-blacksmith .panel-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

#tab-blacksmith .panel-header h2 {
    margin-bottom: 8px;
    margin-top: 0;
}

#tab-blacksmith .panel-header p,
#tab-blacksmith .panel-description {
    margin-top: 0;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Region Selector */
.region-selector-container {
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.region-selector-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.region-card {
    background: linear-gradient(135deg, var(--bg-header), var(--bg-panel));
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.region-card:hover:not(.locked):not(.active) {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(92, 155, 104, 0.3);
}

.region-card.active {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(92, 155, 104, 0.2), var(--bg-panel));
    box-shadow: 0 0 12px rgba(92, 155, 104, 0.4);
}

.region-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: linear-gradient(135deg, #1a1a1a, #0f0f0f);
}

.region-card.locked::before {
    content: '🔒';
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 16px;
}

.region-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.region-card.locked .region-name {
    color: var(--text-muted);
}

.region-level-range {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.region-card.active .region-level-range {
    color: var(--accent-color);
}

.region-unlock-info {
    font-size: 11px;
    color: var(--danger-color);
    margin-top: 4px;
    font-style: italic;
}

.region-card.active .region-unlock-info {
    display: none;
}

/* Monster List Container */
.monster-list-container {
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.monster-list-title {
    font-family: 'Cinzel', serif;
    font-size: 18px;
    color: var(--accent-color);
    margin-bottom: 12px;
    font-weight: 600;
}

.monster-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.monster-list-item {
    background: linear-gradient(135deg, var(--bg-header), var(--bg-panel));
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    min-height: 200px;
}

.monster-list-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(92, 155, 104, 0.3);
}

.monster-list-item.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(92, 155, 104, 0.2), var(--bg-panel));
    box-shadow: 0 0 12px rgba(92, 155, 104, 0.4);
}

.monster-list-item .monster-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 10px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.monster-list-item .monster-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.monster-list-item .monster-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.monster-list-item .monster-stats {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    text-align: center;
}

.monster-list-item .monster-stats > div {
    margin-bottom: 2px;
}

.monster-list-item.elite {
    border-color: var(--gold-color);
}

.monster-list-item.elite::before {
    content: '⭐';
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 14px;
}

.monster-list-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Combat Layout */
.combat-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    align-items: start;
}

/* Right side container for stats and quick slots */
.combat-layout > .stats-card {
    grid-column: 2;
    grid-row: 1;
}

.combat-layout > .quick-slot-container-combat {
    grid-column: 2;
    grid-row: 2;
    margin-top: 15px;
}

/* Dungeon Loot Panel */
.dungeon-loot-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
}

.dungeon-loot-panel h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--accent-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.dungeon-loot-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.dungeon-loot-empty {
    color: var(--text-muted);
    font-size: 12px;
    font-style: italic;
    text-align: center;
    padding: 10px;
}

.dungeon-loot-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 12px;
}

.dungeon-loot-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dungeon-loot-item-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.dungeon-loot-text {
    color: var(--text-main);
    flex: 1;
}

.monster-card,
.stats-card,
.shop-item,
.setting-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.monster-region {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.monster-region.elite {
    color: var(--gold-color);
    font-weight: 600;
}

.monster-region.elite::before {
    content: '⭐ ';
}

.monster-level {
    font-size: 11px;
    color: var(--accent-color);
    margin-top: 2px;
    font-weight: 600;
}

.monster-damage-info {
    font-size: 11px;
    color: var(--danger-color);
    margin-top: 4px;
    font-weight: 600;
}

.monster-warning {
    font-size: 10px;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Combat Toggle Switch */
.combat-toggle-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.combat-toggle-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.combat-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.combat-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-header);
    border: 2px solid var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.combat-toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-main);
    transition: 0.3s;
    border-radius: 50%;
}

.combat-toggle-switch input:checked + .combat-toggle-slider {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

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

.combat-toggle-switch input:disabled + .combat-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.hp-container {
    width: 200px;
    height: 20px;
    background-color: #111;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background-color: var(--hp-color);
    width: 100%;
    transition: width 0.2s;
}

/* Player HP and Mana Bars */
.player-hp-container,
.player-mana-container {
    width: 150px;
    height: 20px;
    background-color: #111;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.player-hp-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--hp-color), #ff6b6b);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.player-mana-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a90e2, #5ba3f5);
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.player-hp-text,
.player-mana-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    color: white;
    text-shadow: 1px 1px 2px black;
    z-index: 1;
    font-weight: 600;
}

#hp-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: white;
    text-shadow: 1px 1px 2px black;
}

.monster-view {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, #333 0%, #23262b 70%);
    border-radius: 8px;
    cursor: url('assets/cursor_final.png'), crosshair;
}

.monster-sprite {
    cursor: url('assets/cursor_resized.png'), auto;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.monster-sprite img {
    max-height: 200px;
    transition: transform 0.1s;
    pointer-events: none; /* Let clicks go through to parent */
}

/* Boss görseli için özel stil (daha büyük) */
.monster-sprite img[src*="gizemliboss1.png"] {
    max-height: 350px;
    max-width: 400px;
    width: auto;
    height: auto;
}

.monster-sprite:active {
    transform: scale(0.95);
}

.card-footer {
    text-align: center;
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 12px;
}

/* Stats Card */
.stats-card h3,
.equipment-card h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--accent-color);
}

/* Character Stats System (Metin2 Style) */
.stat-points-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 600;
}

.character-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.character-stat-row:last-child {
    border-bottom: none;
}

.stat-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.stat-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.stat-desc {
    font-size: 11px;
    color: var(--text-muted);
}

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

.stat-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 14px;
}

.stat-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--bg-header), var(--bg-panel));
    color: var(--text-main);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-btn:hover:not(:disabled) {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(92, 155, 104, 0.2), var(--bg-panel));
    transform: scale(1.05);
}

.stat-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.stat-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.stat-btn-plus {
    color: var(--accent-color);
}

.stat-btn-minus {
    color: var(--danger-color);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-val {
    font-weight: bold;
    color: white;
}

/* Equipment Card */
.equipment-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    height: fit-content;
}

.equipment-card h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--accent-color);
}

/* Blacksmith specific equipment card styles */
#tab-blacksmith .equipment-card {
    padding: 24px;
}

#tab-blacksmith .equipment-card h3 {
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Upgrade Section */
.upgrade-section {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    height: fit-content;
}

.upgrade-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
    color: var(--accent-color);
}

/* Blacksmith specific upgrade section styles */
#tab-blacksmith .upgrade-section {
    padding: 24px;
    margin-bottom: 0;
}

#tab-blacksmith .upgrade-section h3 {
    margin-bottom: 20px;
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.upgrade-slot-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upgrade-slots-row {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.material-slot {
    border-color: var(--gold-color);
    background-color: rgba(255, 215, 0, 0.05);
}

.material-slot.has-item {
    border-color: var(--gold-color);
    background-color: rgba(255, 215, 0, 0.15);
}

.material-slot.material-not-needed {
    opacity: 0.5;
    border-color: var(--text-muted);
    background-color: rgba(255, 255, 255, 0.02);
    cursor: not-allowed;
}

.blessing-slot {
    border-color: #9c27b0;
    background-color: rgba(156, 39, 176, 0.05);
}

.blessing-slot.has-item {
    border-color: #9c27b0;
    background-color: rgba(156, 39, 176, 0.15);
}

#tab-blacksmith .upgrade-slot-container {
    gap: 18px;
}

.upgrade-slot {
    width: 120px;
    height: 120px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.02);
    position: relative;
    transition: all 0.3s ease;
}

.upgrade-slot.has-item {
    border: 2px solid var(--accent-color);
    background-color: rgba(92, 155, 104, 0.1);
}

.upgrade-slot.drag-over {
    border-color: var(--accent-color);
    background-color: rgba(92, 155, 104, 0.2);
    transform: scale(1.05);
}

.upgrade-slot.drag-over-invalid {
    border-color: var(--danger-color);
    background-color: rgba(211, 47, 47, 0.1);
}

.upgrade-slot-label {
    color: var(--text-muted);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.upgrade-slot .item-icon-img,
.upgrade-slot .equipment-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.upgrade-slot .item-upgrade-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background-color: var(--accent-color);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

.btn-auto-click {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auto-click:hover {
    background: linear-gradient(135deg, #5a6578, #3d4758);
    transform: translateY(-1px);
}

.btn-auto-click.active {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    border-color: var(--accent-color);
}

.btn-auto-click.active:hover {
    background: linear-gradient(135deg, var(--accent-hover), var(--accent-color));
}

.btn-upgrade {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

.btn-upgrade:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(92, 155, 104, 0.4);
}

.btn-upgrade.missing-material:hover:not(:disabled) {
    box-shadow: 0 6px 12px rgba(211, 47, 47, 0.4);
}

.btn-upgrade:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-header);
}

.upgrade-icon {
    font-size: 18px;
}

.upgrade-info {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    max-width: 280px;
}

.upgrade-cost {
    margin-bottom: 10px;
    font-size: 14px;
}

.upgrade-cost span {
    color: var(--gold-color);
    font-weight: bold;
    font-size: 15px;
}

.upgrade-stats {
    color: #4caf50; /* Yeşil renk */
    line-height: 1.6; /* Satır aralığı */
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 8px;
}

/* Equipment Grid - Character Layout (Customizable via grid-template-areas) */
/* 
 * KONUMLANDIRMA: grid-template-areas değerini değiştirerek slotların konumlarını ayarlayabilirsiniz.
 * 
 * Mevcut slot isimleri:
 * - helmet (Kask)
 * - weapon (Kılıç)
 * - armor (Zırh)
 * - boots (Ayakkabı)
 * - earring-left (Küpe Sol)
 * - necklace (Kolye)
 * - bracelet (Bilezik)
 * - earring-right (Küpe Sağ)
 * 
 * Örnek: Bir slot'u 2x2 alan kaplamak için aynı ismi 4 kez yazın.
 * Örnek: "helmet helmet" = Kask 2 sütun kaplar
 */
.equipment-grid-character {
    display: grid;
    grid-template-columns: 90px 90px 50px 50px;
    grid-template-rows: 60px 80px 80px 60px;
    gap: 10px;
    margin-top: 15px;
    max-width: 300px;
    /* Çizimdeki düzen: Kask üstte, Silah solda, Zırh ortada, Ayakkabı altta, Sağda Kalkan/Küpe üstte, Kolye/Bilezik altta */
    grid-template-areas:
        "helmet helmet . ."
        "weapon armor shield earring"
        "weapon armor necklace bracelet"
        "boots boots . .";
}

/* Individual slot positioning via grid-area */
.equipment-slot[data-grid-area="helmet"] {
    grid-area: helmet;
}

.equipment-slot[data-grid-area="weapon"] {
    grid-area: weapon;
}

.equipment-slot[data-grid-area="armor"] {
    grid-area: armor;
}

.equipment-slot[data-grid-area="boots"] {
    grid-area: boots;
}

.equipment-slot[data-grid-area="shield"] {
    grid-area: shield;
}

.equipment-slot[data-grid-area="earring"] {
    grid-area: earring;
}

.equipment-slot[data-grid-area="necklace"] {
    grid-area: necklace;
}

.equipment-slot[data-grid-area="bracelet"] {
    grid-area: bracelet;
}

/* Equipment Slot */
.equipment-slot {
    background: linear-gradient(135deg, #1a1c20 0%, #23262b 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
    min-height: 50px;
}

.equipment-slot:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(92, 155, 104, 0.3);
}

.equipment-slot .slot-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    pointer-events: none;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.equipment-slot.has-item .slot-label {
    display: none;
}

.equipment-slot.has-item {
    background: linear-gradient(135deg, #2a2d35 0%, #1a1c20 100%);
    border-style: solid;
}

/* Equipment Drag & Drop Styles */
.equipment-slot.draggable {
    cursor: grab;
}

.equipment-slot.draggable:active {
    cursor: grabbing;
}

.equipment-slot.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.equipment-slot.drag-over {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #3a4d45 0%, #2a3d35 100%);
    box-shadow: 0 0 20px rgba(92, 155, 104, 0.5);
    transform: scale(1.1);
}

.equipment-slot.drag-over-invalid {
    border-color: #f44336;
    background: linear-gradient(135deg, #4d3a3a 0%, #3d2a2a 100%);
    box-shadow: 0 0 20px rgba(244, 67, 54, 0.5);
    transform: scale(1.1);
}

.equipment-icon {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}


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

.shop-item {
    display: flex;
    gap: 15px;
}

.item-icon {
    width: 64px;
    height: 64px;
    background-color: #111;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.item-icon img {
    width: 48px;
    height: 48px;
}

.item-details h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.item-details p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.btn-buy {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    transition: background 0.2s;
}

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

.btn-buy:disabled {
    background-color: #444;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Settings */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.btn-danger:hover {
    background-color: #b71c1c;
}

/* Damage Numbers */
.damage-number {
    position: absolute;
    color: white;
    font-weight: bold;
    font-size: 20px;
    pointer-events: none;
    animation: floatUp 0.8s ease-out forwards;
    text-shadow: 0 0 3px black;
}

.damage-crit {
    color: #ffeb3b;
    font-size: 26px;
    text-shadow: 0 0 5px #f57f17;
}

@keyframes floatUp {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(-40px) scale(1.2);
    }
}

/* ===== INVENTORY SYSTEM ===== */

/* Inventory Layout */
.inventory-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.inventory-layout > .upgrade-section,
.inventory-layout > .equipment-card {
    width: fit-content;
    max-width: 100%;
}

/* Blacksmith specific layout - Grid for side by side */
#tab-blacksmith .inventory-layout {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto 1fr;
    gap: 20px;
    padding: 20px;
    height: calc(100vh - 240px);
    overflow: hidden;
    align-content: start;
}

#tab-blacksmith .inventory-layout > .upgrade-section {
    grid-column: 1;
    grid-row: 1;
    width: fit-content;
    margin-bottom: 0;
}

#tab-blacksmith .inventory-layout > .equipment-card {
    grid-column: 2;
    grid-row: 1;
    width: fit-content;
    margin-bottom: 0;
}

#tab-blacksmith .inventory-layout > .inventory-container {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#tab-blacksmith .inventory-container h3 {
    margin-bottom: 12px;
    margin-top: 0;
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Inventory Container */
.inventory-container {
    padding: 0;
    width: 100%;
}

.inventory-container h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 16px;
}

/* Quick Slot Container */
.quick-slot-container {
    background-color: var(--bg-panel);
    border-radius: 8px;
    padding: 20px;
    min-width: 200px;
    height: fit-content;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.quick-slot-container h3 {
    margin-bottom: 15px;
    color: var(--accent-color);
    font-size: 16px;
    text-align: center;
}

.quick-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.quick-slot {
    position: relative;
    width: 60px;
    height: 60px;
    background-color: var(--bg-header);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-slot:hover {
    border-color: var(--accent-color);
    background-color: rgba(92, 155, 104, 0.1);
}

.quick-slot.draggable {
    cursor: grab;
}

.quick-slot.draggable:active {
    cursor: grabbing;
}

.quick-slot.has-item {
    border-color: var(--accent-color);
}

/* Drag & Drop Styles for Quick Slot */
.quick-slot.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.quick-slot.drag-over {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #3a4d45 0%, #2a3d35 100%);
    box-shadow: 0 0 20px rgba(92, 155, 104, 0.5);
    transform: scale(1.1);
}

.quick-slot.drag-over-invalid {
    border-color: var(--danger-color);
    background-color: rgba(211, 47, 47, 0.1);
    box-shadow: 0 0 10px rgba(211, 47, 47, 0.3);
}

.quick-slot-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.quick-slot img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.quick-slot-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 11px;
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Quick Slot Container for Combat Tab (Half size - compact) */
.quick-slot-container-combat {
    background-color: var(--bg-panel);
    border-radius: 6px;
    padding: 6px;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 100%;
}

.quick-slot-container-combat h4 {
    margin: 0 0 6px 0;
    color: var(--accent-color);
    font-size: 11px;
    text-align: center;
    font-weight: 600;
}

.quick-slot-grid-combat {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
}

.quick-slot-grid-combat .quick-slot {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 4px;
    border-width: 1px;
}

.quick-slot-grid-combat .quick-slot-number {
    top: 1px;
    left: 2px;
    font-size: 10px;
    font-weight: 700;
}

.quick-slot-grid-combat .quick-slot img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

.quick-slot-grid-combat .quick-slot-count {
    bottom: 1px;
    right: 2px;
    font-size: 8px;
    padding: 1px 3px;
    border-radius: 2px;
}

/* Inventory Grid - 15 columns x 2 rows = 30 slots */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(15, 1fr);
    gap: 8px;
    max-width: 100%;
}

#tab-blacksmith .inventory-grid {
    gap: 6px;
    flex-shrink: 1;
}

/* Individual Inventory Slot */
.inventory-slot {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #1a1c20 0%, #23262b 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    overflow: hidden;
}

.inventory-slot:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(92, 155, 104, 0.3);
}

.inventory-slot.empty {
    background: #1a1c20;
    border-style: dashed;
    opacity: 0.5;
}

.inventory-slot.has-item {
    background: linear-gradient(135deg, #2a2d35 0%, #1a1c20 100%);
    border-style: solid;
}

/* Drag & Drop Styles */
.inventory-slot.draggable {
    cursor: grab;
}

.inventory-slot.draggable:active {
    cursor: grabbing;
}

.inventory-slot.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.inventory-slot.drag-over {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, #3a4d45 0%, #2a3d35 100%);
    box-shadow: 0 0 20px rgba(92, 155, 104, 0.5);
    transform: scale(1.1);
}

/* Item Icon */
.item-icon-img {
    width: 70%;
    height: 70%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Item Upgrade Badge */
.item-upgrade-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Item Level Badge */
.item-level-badge {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: linear-gradient(135deg, #5c9b68 0%, #4a7a54 100%);
    color: white;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    z-index: 2;
}

.item-level-badge.cannot-equip {
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
}

/* Item Stack Count */
.item-count {
    position: absolute;
    bottom: 4px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* Tooltip */
.item-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    min-width: 200px;
    z-index: 1000;
    pointer-events: none;
    font-size: 13px;
    line-height: 1.6;
}

.tooltip-name {
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 6px;
}

.tooltip-type {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.tooltip-description {
    color: var(--text-main);
    margin-bottom: 8px;
    font-style: italic;
}

.tooltip-stats {
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    color: var(--accent-color);
}

/* Loot Notification */
.loot-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, rgba(92, 155, 104, 0.95) 0%, rgba(35, 38, 43, 0.95) 100%);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.loot-notification-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.loot-notification-text {
    font-weight: bold;
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ===== ADMIN PANEL STYLES ===== */
.admin-yang-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-yang-section h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.admin-yang-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.admin-yang-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-yang-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.admin-yang-btn-remove {
    background: var(--danger-color);
}

.admin-yang-btn-remove:hover {
    background: #b71c1c;
}

.admin-yang-btn-danger {
    background: var(--danger-color);
}

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

.admin-yang-display {
    color: var(--text-main);
    font-size: 16px;
}

.admin-yang-display strong {
    color: var(--gold-color);
    font-size: 18px;
}

.admin-quick-actions {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-quick-actions h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.admin-quick-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-quick-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-quick-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.admin-quick-btn-danger {
    background: var(--danger-color);
}

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

.admin-filters {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-search {
    margin-bottom: 15px;
}

.admin-search-input {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
}

.admin-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.admin-category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-category-btn {
    padding: 6px 12px;
    background: var(--bg-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.admin-category-btn:hover {
    background: var(--bg-header);
    color: var(--text-main);
}

.admin-category-btn.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.admin-item-list-container {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    max-height: 600px;
    overflow-y: auto;
}

.admin-item-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.admin-category-header {
    color: var(--accent-color);
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.admin-category-header:first-child {
    margin-top: 0;
}

.admin-item-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.admin-item-card:hover {
    border-color: var(--accent-color);
    transform: translateX(5px);
}

.admin-item-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.admin-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.admin-item-info {
    flex: 1;
    min-width: 0;
}

.admin-item-name {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.admin-item-type {
    color: var(--accent-color);
    font-size: 12px;
    margin-bottom: 4px;
}

.admin-item-desc {
    color: var(--text-muted);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-item-count-input {
    width: 60px;
    padding: 6px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    text-align: center;
    font-size: 14px;
}

.admin-item-count-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.admin-item-add-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-item-add-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.admin-no-items {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 16px;
}

/* Admin Page Navigation */
.admin-page-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.admin-page-btn {
    padding: 10px 20px;
    background: var(--bg-dark);
    color: var(--text-muted);
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.admin-page-btn:hover {
    background: var(--bg-header);
    color: var(--text-main);
}

.admin-page-btn.active {
    background: var(--bg-panel);
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}




/* Admin Stats Section */
.admin-stats-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.admin-stats-section h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 20px;
}

.admin-stats-description {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 14px;
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.admin-stat-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.admin-stat-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.admin-stat-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.admin-stat-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
    border-radius: 8px;
}

.admin-stat-info {
    flex: 1;
}

.admin-stat-name {
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.admin-stat-value {
    color: var(--accent-color);
    font-size: 24px;
    font-weight: 700;
}

.admin-stat-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-stat-input {
    width: 100px;
    padding: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    text-align: center;
    font-size: 14px;
}

.admin-stat-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.admin-stat-btn {
    padding: 8px 16px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-size: 14px;
}

.admin-stat-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

.admin-stat-btn-remove {
    background: var(--danger-color);
}

.admin-stat-btn-remove:hover {
    background: #b71c1c;
}



/* ===== DUNGEON PANEL STYLES ===== */
.dungeon-cooldown-display {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.dungeon-cooldown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.cooldown-dungeon-name {
    color: var(--text-main);
    font-weight: 500;
}

.cooldown-time {
    color: var(--accent-color);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.dungeon-cooldown-none {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.dungeon-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dungeon-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.dungeon-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.dungeon-card-header h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 20px;
}

.dungeon-card-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
}

.dungeon-requirements {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.dungeon-req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.req-label {
    color: var(--text-muted);
    min-width: 60px;
}

.req-value {
    font-weight: 500;
}

.req-value.req-met {
    color: var(--accent-color);
}

.req-value.req-not-met {
    color: var(--danger-color);
}

.dungeon-cooldown-status {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.dungeon-cooldown-status.cooldown-active {
    background: rgba(211, 47, 47, 0.2);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.dungeon-cooldown-status.cooldown-ready {
    background: rgba(92, 155, 104, 0.2);
    color: var(--accent-color);
    border: 1px solid var(--accent-color);
}

.dungeon-enter-btn {
    width: 100%;
    padding: 12px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.dungeon-enter-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

.dungeon-in-progress {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
}

.dungeon-progress-info {
    margin-bottom: 20px;
}

.dungeon-progress-info h3 {
    color: var(--accent-color);
    margin-bottom: 15px;
    font-size: 20px;
}

.dungeon-floor-info {
    display: flex;
    gap: 20px;
    color: var(--text-main);
    font-size: 16px;
}

.dungeon-floor-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dungeon-floor-info span span {
    color: var(--accent-color);
    font-weight: 600;
}

#dungeon-exit-btn {
    width: 100%;
    padding: 12px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

#dungeon-exit-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
}

/* Dungeon Rewards Section */
.dungeon-rewards-section {
    margin: 15px 0;
    padding: 15px;
    background: rgba(92, 155, 104, 0.1);
    border: 1px solid rgba(92, 155, 104, 0.3);
    border-radius: 6px;
}

.dungeon-rewards-title {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--accent-color);
    font-weight: 600;
}

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

.dungeon-reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-main);
}

.dungeon-reward-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.dungeon-reward-item-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.dungeon-reward-text {
    flex: 1;
}

/* ===== AUTH MODAL ===== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.auth-modal-content {
    background: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 450px;
    padding: 40px;
    border: 2px solid var(--border-color);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.auth-tab:hover {
    color: var(--text-main);
}

.auth-tab.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block !important;
}

.auth-form h2 {
    color: var(--text-main);
    margin-bottom: 25px;
    text-align: center;
    font-size: 24px;
}

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

.auth-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-main);
    font-weight: 500;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.3s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.auth-form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-error {
    margin-top: 15px;
    padding: 12px;
    background: rgba(211, 47, 47, 0.2);
    border: 1px solid var(--danger-color);
    border-radius: 6px;
    color: var(--danger-color);
    font-size: 14px;
    text-align: center;
}

.auth-success {
    margin-top: 15px;
    padding: 12px;
    background: rgba(92, 155, 104, 0.2);
    border: 1px solid var(--accent-color);
    border-radius: 6px;
    color: var(--accent-color);
    font-size: 14px;
    text-align: center;
}

/* ===== PATCH NOTES SYSTEM ===== */

/* Patch Notes Button */
.patch-notes-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.patch-notes-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.patch-notes-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.patch-notes-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--bg-dark);
}

/* Patch Notes Modal */
.patch-notes-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.patch-notes-modal-content {
    background: var(--bg-panel);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 2px solid var(--border-color);
    animation: slideUp 0.3s ease;
}

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

.patch-notes-modal-header {
    padding: 20px 25px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.patch-notes-modal-header h2 {
    margin: 0;
    color: var(--accent-color);
    font-size: 24px;
    font-weight: 600;
}

.patch-notes-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.patch-notes-close-btn:hover {
    background: rgba(211, 47, 47, 0.2);
    color: var(--danger-color);
}

.patch-notes-modal-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.patch-notes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.patch-notes-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-size: 16px;
}

/* Patch Note Item */
.patch-note-item {
    background: var(--bg-header);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s;
}

.patch-note-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(92, 155, 104, 0.2);
}

.patch-note-item.patch-note-latest {
    border-color: var(--accent-color);
    border-width: 2px;
    background: rgba(92, 155, 104, 0.05);
}

.patch-note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.patch-note-version {
    margin: 0;
    color: var(--accent-color);
    font-size: 20px;
    font-weight: 600;
}

.patch-note-item.patch-note-latest .patch-note-version {
    color: var(--accent-color);
}

.patch-note-date {
    color: var(--text-muted);
    font-size: 14px;
}

.patch-note-changes {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.patch-note-changes li {
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.patch-note-changes li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-size: 18px;
    line-height: 1.4;
}

.patch-note-item.patch-note-latest .patch-note-changes li::before {
    color: var(--accent-color);
}