/* style.css (COMPLETE & CORRECTED) */
html {
  font-size: 80%;
}
:root {
    --bg-color: #151518;
    --card-bg: #1c1c20;
    --card-bg-transparent: rgba(28, 28, 32, 0.92);
    --border-color: #35353d;
    --text-color: #d8d8dc;
    --primary-color: #4CAF50;
    --secondary-color: #f44336;
    --accent-color: #ffd700;
    --input-bg: #232328;
}

/* Global select and option styling */
select {
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    padding: 6px 10px;
}

select option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 6px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: url('assets/images/maelstrom.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}
.main-content {
    max-width: 1850px;
    margin: 0 auto;
}
.header-main {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Center column top row layout */
.center-top-row {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    align-items: stretch;
}

/* Magic EHP Row - 1x6 grid below character status bar */
.magic-ehp-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

.magic-ehp-stat-item {
    min-width: 80px;
    height: 42px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 3px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.magic-ehp-stat-item h4 {
    font-size: 0.75em;
    margin: 0 0 2px 0;
    padding: 0 2px;
    color: var(--accent-color);
    font-weight: bold;
    line-height: 1.2;
    white-space: nowrap;
}

.magic-ehp-stat-item .value {
    font-size: 0.95em;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

/* EHP Stats Grid - 2x2 grid in right column, fills vertical space */
.status-bar-info .ehp-stats-grid {
    display: grid;
    grid-template-columns: 129px 129px;
    gap: 5px;
    flex: 0 0 auto;
    width: 263px; /* 129px + 5px + 129px */
    height: 121px; /* 58px + 5px + 58px */
    align-self: flex-start;
}

.ehp-stat-item {
    width: 129px;
    height: 58px;
    min-width: 129px;
    min-height: 58px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 4px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.ehp-stat-item h4 {
    font-size: 0.85em;
    margin: 0 0 3px 0;
    padding: 0 2px;
    color: var(--accent-color);
    font-weight: bold;
    line-height: 1.2;
}

.ehp-stat-item .value {
    font-size: 1.1em;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1.2;
}

.ehp-stat-item .sub-value {
    font-size: 0.7em;
    color: var(--secondary-color);
    margin-top: 2px;
}


/* Selectors container */
.selectors-container {
    flex: 1 1 auto;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Character Status Bar - wider to accommodate stats on the right */
.character-status-bar {
    flex: 0 0 auto;
    min-width: 680px;
    max-height: fit-content;
    background: var(--card-bg-transparent);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* Build title display (when editing or loading a build) */
.build-title-display {
    margin-bottom: 8px;
    padding: 0 calc(56px + 15px); /* Left padding = gear icon width (56px) + gap (15px) */
    overflow-x: visible;
    overflow-y: hidden;
}

.build-tabs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: visible;
    overflow-y: hidden;
}

/* List only as wide as its tabs so + sits right after them */
.build-tabs-list {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
}

.build-tab-add-btn.hidden {
    display: none;
}

/* Inactive build names as clickable green text (no pills) */
.build-tab-label {
    flex-shrink: 0;
    padding: 0 8px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--primary-color);
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 5px rgba(30, 255, 0, 0.5);
}

.build-tab-label:hover {
    opacity: 0.9;
    text-decoration: underline;
}

.build-tab-add-btn {
    flex-shrink: 0;
    width: auto;
    min-width: 1em;
    height: auto;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--accent-color);
    font-size: 2.1em;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5), 0 0 16px rgba(255, 215, 0, 0.25);
}

.build-tab-add-btn:hover {
    opacity: 1;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7), 0 0 24px rgba(255, 215, 0, 0.35);
}

.build-tab-add-btn:active {
    transform: scale(0.95);
}

/* Build tab context menu */
.build-tab-context-menu {
    position: fixed;
    z-index: 10000;
    min-width: 160px;
    padding: 4px 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.build-tab-context-menu button {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: none;
    background: none;
    color: var(--text-color);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.build-tab-context-menu button:hover {
    background: rgba(255, 215, 0, 0.12);
    color: var(--accent-color);
}

/* Close build dialog (three options) */
.build-close-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.build-close-dialog {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    min-width: 280px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.build-close-dialog h4 {
    margin: 0 0 12px 0;
    color: var(--accent-color);
    font-size: 14px;
}

.build-close-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.build-close-dialog-actions button {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
}

.build-close-dialog-actions button.primary {
    border-color: var(--accent-color);
    background: rgba(255, 215, 0, 0.2);
    color: var(--accent-color);
}

.build-name-input {
    width: 100%;
    max-width: 100%;
    background: transparent;
    border: 1px solid transparent;
    color: var(--primary-color) !important;
    font-size: 1.3em;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.2s;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 5px rgba(30, 255, 0, 0.8), 1px 1px 2px rgba(0, 0, 0, 1);
    font-family: inherit;
    box-shadow: none;
}

/* In tab row: dynamic width from content (see build-tab-active-wrap / mirror) */
.build-tabs-row .build-name-input.build-name-input-in-row {
    flex: 0 0 auto;
    box-sizing: border-box;
}

/* Wrapper so glow sits behind the text; width comes from mirror */
.build-tab-active-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: max-content;
    min-width: 8ch;
    max-width: 50ch;
}
/* Mirror span drives wrapper width (same font/padding as input) */
.build-tab-input-mirror {
    display: inline-block;
    visibility: hidden;
    white-space: pre;
    min-width: 1ch;
    font-size: 1.3em;
    font-weight: bold;
    padding: 6px 10px;
    font-family: inherit;
    width: max-content;
    height: 1.2em;
    line-height: 1.2;
}
/* Input overlays mirror so wrapper width = text width */
.build-tab-active-wrap .build-name-input {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
}

/* Oval glow behind the text (sun-from-behind, soft edges); height kept within row to avoid scrollbar */
.build-tab-glow {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 140%;
    border-radius: 50%;
    background: radial-gradient(ellipse 80% 50% at 50% 50%, rgba(255, 215, 0, 0.35) 0%, rgba(255, 215, 0, 0.08) 50%, transparent 72%);
    filter: blur(6px);
    pointer-events: none;
    z-index: -1;
}

.build-tabs-row .build-name-input.build-tab-active {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}
.build-tabs-row .build-name-input.build-tab-active:focus {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.build-name-input::placeholder {
    color: var(--secondary-color);
    font-style: normal;
    opacity: 0.4;
    text-shadow: none;
}

.build-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(30, 255, 0, 0.05);
}

.build-name-input:hover:not(:focus) {
    background-color: rgba(255, 215, 0, 0.05);
}

/* Slick input fields (hidden borders, like build name field) */
.slick-input {
    background: transparent !important;
    border: 1px solid transparent !important;
    color: white !important;
    transition: all 0.2s;
}

.slick-input:hover:not(:focus) {
    background-color: rgba(255, 215, 0, 0.05) !important;
}

.slick-input:focus {
    outline: none !important;
    border-color: rgba(255, 215, 0, 0.5) !important;
    background: rgba(255, 215, 0, 0.1) !important;
}

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

/* Top row: portrait and status info */
.status-bar-top-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
}

.status-bar-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}

.portrait-frame {
    width: 90px;
    height: 121px;
    border: none;
    border-radius: 0;
    background: none;
    padding: 0;
    box-shadow: none;
}

.portrait-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
}

.portrait-label {
    font-size: 0.75em;
    color: #ffd700;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    text-transform: uppercase;
}

.status-bar-info {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    min-width: 350px;
    align-items: flex-start;
}

.status-bar-left {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

/* Character name controls container */
.character-name-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    flex-shrink: 0;
}

.character-name-display-text,
.server-display-text {
    font-size: 1em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

.character-name-display-text:hover,
.server-display-text:hover {
    background-color: rgba(255, 215, 0, 0.15);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.character-name-display {
    font-size: 1em;
    font-weight: bold;
    color: #ffd700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
    text-align: left;
}

.status-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    height: auto;
    justify-content: flex-end;
    min-width: 200px;
}

.bar-container {
    position: relative;
    height: 35px;
    flex: 0 0 35px;
    background: linear-gradient(to bottom, #18181a 0%, #252528 100%);
    border: 1px solid #333;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transition: width 0.3s ease;
}

.health-fill {
    background: linear-gradient(to bottom, #00ff00 0%, #008800 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.mana-fill {
    background: linear-gradient(to bottom, #4169e1 0%, #00008b 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.rage-fill {
    background: linear-gradient(to bottom, #ff0000 0%, #8b0000 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Empty rage bar background */
.rage-bar-container {
    background: linear-gradient(to bottom, #2d0000 0%, #1a0000 100%);
}

.bar-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: bold;
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9), -1px -1px 2px rgba(0, 0, 0, 0.9);
    z-index: 1;
}
.card {
    background: var(--card-bg-transparent);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: padding 0.3s ease-in-out;
}
.card:last-child {
    margin-bottom: 0;
}
.card h2, .card h3 {
    margin-top: 0;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
input, select {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- MAIN GEAR LAYOUT --- */
.gear-character-sheet {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0 15px;
    align-items: start;
}
.gear-icon-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Explicitly position left gear column in grid */
#gear-icons-left {
    grid-column: 1;
}

/* Explicitly position center column in grid */
.gear-center {
    grid-column: 2;
}

/* Explicitly position right gear column in grid */
#gear-icons-right {
    grid-column: 3;
}

.icon-frame {
    position: relative; /* Crucial for positioning child elements */
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}
.icon-frame::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.2s ease-in-out;
    pointer-events: none;
	z-index: 1; /* Add this line */
}
.icon-image-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transition: transform 0.2s ease-in-out;
	z-index: 1; /* Add this line */
}
.icon-frame:hover {
    z-index: 10;
}
.icon-frame:has(> .icon-image-container:hover)::before,
.icon-frame:has(> .icon-image-container:hover) .icon-image-container {
    transform: scale(1.1);
}
.icon-frame img {
    width: 100%; height: 100%; border-radius: 4px; padding: 2px; box-sizing: border-box;
}
.placeholder-icon {
    filter: brightness(0.7) sepia(1) hue-rotate(220deg) saturate(0.6);
    opacity: 0.8;
}
#gear-card-content {
    transition: transform 0.3s ease-in-out;
}
#gear-card {
    padding: 20px 60px;
    overflow: visible;
    /* Fixed width to maintain consistent outer boundary */
    max-width: 1850px;
    /* Remove border and background */
    background: none;
    border: none;
    box-shadow: none;
}
/* ======================================================= */
/* ===         CORRECTED ENCHANT UI STYLES             === */
/* ======================================================= */

/* This is the single container for the button, line, and text */
.enchant-container {
    position: absolute;
    display: flex;
    align-items: center;
    top: 50%;
    transform: translateY(-50%);
    gap: 6px;
    pointer-events: none; /* Container isn't clickable, only the button inside */
}

/* --- Positioning for LEFT side icons --- */
/* GOAL: UI should appear to the LEFT of the icon, pointing outwards. */
#gear-icons-left .enchant-container {
    right: calc(100% + 10px); /* Positions the UI to the LEFT */
    flex-direction: row-reverse; /* Layout: [Text] [Line] [Button] */
}

/* --- Positioning for RIGHT side icons --- */
/* GOAL: UI should appear to the RIGHT of the icon, pointing outwards. */
#gear-icons-right .enchant-container {
    left: calc(100% + 10px); /* Positions the UI to the RIGHT */
    flex-direction: row; /* Layout: [Button] [Line] [Text] */
}

/* The Button */
.enchant-btn {
    width: 24px; height: 24px;
    flex-shrink: 0; /* Prevent the button from shrinking */
    padding: 0;
    background-image: url('https://wow.zamimg.com/images/wow/icons/small/inventoryslot_enchant.jpg');
    background-size: cover;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px #000;
    transition: all 0.2s ease;
    pointer-events: all; /* VERY IMPORTANT: Makes the button clickable */
	position: relative; /* Allows z-index to work reliably */
	transition: transform 0.3s ease-in-out;
    z-index: 2;
	transform: translateX(0px);
    filter: brightness(0.7) sepia(1) hue-rotate(220deg) saturate(0.6);
    opacity: 0.8;
}
.icon-frame.is-enchanted .enchant-btn {
    /*
      This tells the button to slide horizontally.
      The JavaScript calculates the width of the text and connector,
      and this 'translateX' will push the button by that same amount.
      We use a CSS variable that will be set by the JavaScript.
    */
    transform: translateX(var(--enchant-slide-distance, 0px));
}
#gear-icons-right .icon-frame.is-enchanted .enchant-btn {
    transform: translateX(0px);
}

/* For LEFT-SIDE icons, we slide the DETAILS block to the left */
#gear-icons-left .icon-frame.is-enchanted .enchant-btn {
    transform: translateX(0px);
}
.enchant-btn:hover {
    transform: scale(1.15);
    z-index: 11;
}
/* When the PARENT FRAME is enchanted, style the button */
.icon-frame.is-enchanted .enchant-btn {
    background-image: url('https://database.turtlecraft.gg/images/icons/medium/inv_scroll_05.png');
    border-color: #ffd700;
    box-shadow: 0 0 8px #ffd700;
    filter: none;
    opacity: 1;
}

/* The Line and Text (Hidden by default) */
.enchant-connector,
.enchant-name-display {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out, width 0.3s ease-in-out;
}

.enchant-connector {
    position: absolute;
    bottom: 11px; /* <-- ADD THIS. Increase to move the line further up. */
    height: 2px;
    opacity: 1;
    width: 30px; /* A fixed width to connect icon to button */
    background-color: var(--border-color);
    box-shadow: 0 0 4px var(--border-color); /* The subtle glow */
    transition: all 0.3s ease-in-out; /* Transition all properties */
}

.enchant-name-display {
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.3s ease-in-out, width 0.3s ease-in-out;
    overflow: hidden; /* ADD THIS to hide text as the element shrinks */
    color: #ffd700;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    margin-bottom: 8px; 
    
    /* ADD THIS LINE to move the text up */
    transform: translateY(-4px);  
}

/* Visibility and style when enchanted */
.icon-frame.is-enchanted .enchant-connector,
.icon-frame.is-enchanted .enchant-name-display {
    opacity: 1;
}

.icon-frame.is-enchanted .enchant-connector {
    background-color: #ffd700;
	box-shadow: 0 0 8px #ffd700;
}

#gear-icons-right .enchant-connector {
    left: -10px; /* Anchor to the left, will grow rightwards */
    width: 22px; /* Default width to span the gap to the button */
}

/* Default state + growth direction for LEFT side icons */
#gear-icons-left .enchant-connector {
    right: -10px; /* Anchor to the right, will grow leftwards */
    width: 22px; /* Default width to span the gap to the button */
}

/* ======================================================= */
/* ===       END OF CORRECTED ENCHANT UI STYLES        === */
/* ======================================================= */


/* --- Center Content & Other Styles --- */
.gear-center {
}
.character-options-grid {
    display: block;
    margin-bottom: 20px;
}
.class-selector-container, .race-selector-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px;
    background: var(--card-bg-transparent);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.class-icon, .race-icon {
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease-in-out;
    border: 2px solid var(--border-color);
}
.class-icon img, .race-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
#racials-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.racial-bonus-item {
    background-color: var(--input-bg);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--primary-color);
    font-weight: bold;
}
#buffs-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Horizontal layout for main buff categories */
.buff-categories-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.buff-main-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

/* Consumables section spans 2 columns */
.buff-consumables-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 2;
    min-width: 400px;
}

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

.buff-main-header {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

.buff-subcategories {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.buff-category {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.buff-category-header {
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
}

/* Empty header for categories without subcategory names */
.buff-category-header:empty {
    display: none;
}

.buff-category-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.class-icon { width: 60px; height: 60px; border-width: 3px; border-radius: 50%; filter: saturate(0.5); transform: scale(0.95); }
.class-icon img { border-radius: 50%; }
.class-icon.active { border-color: #ffd700; filter: saturate(1); transform: scale(1.1); box-shadow: 0 0 15px rgba(255, 215, 0, 0.5); }
.race-icon { width: 50px; height: 50px; border-radius: 6px; filter: saturate(0.5); transform: scale(0.95); }
.race-icon img { border-radius: 4px; }
.race-icon.active { border-color: var(--accent-color); filter: saturate(1); transform: scale(1.1); }
#talents-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}
.talent-row {
    display: flex;
    align-items: center;
    gap: 15px;
}
.talent-icon-container {
    position: relative;
    cursor: pointer;
    user-select: none;
    width: 45px;
    height: 45px;
    flex-shrink: 0;
    z-index: 1;
}

.talent-icon-container:hover {
    z-index: 10000;
}
.talent-icon-container img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    transition: filter 0.2s;
}
.talent-icon-container[data-points="0"] img {
    filter: grayscale(80%) brightness(0.7);
    opacity: 0.8;
}
.talent-icon-container[data-points="0"]:hover img {
    filter: grayscale(0%) brightness(1);
}
.talent-counter {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 5px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 4px;
}
/* Green color for talents with points (not maxed) */
.talent-icon-container.has-points .talent-counter {
    color: var(--primary-color);
}
/* Yellow color for maxed talents - !important to ensure it overrides */
.talent-icon-container.maxed .talent-counter {
    color: #ffd700 !important;
}
.talent-info {
    display: flex;
    flex-direction: column;
}
.talent-name {
    font-weight: bold;
}
.talent-description {
    font-size: 0.9em;
    color: #a0a0a0;
}

/* Talent Tree Grid Layout */

/* Main container with left (trees) and right (bonuses) layout */
.talent-main-container {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

/* Wrapper for the three talent trees */
.talent-trees-wrapper {
    display: flex;
    gap: 30px;
    justify-content: flex-start;
    flex-wrap: nowrap;
    flex: 1;
    min-width: 0;
}

/* Legacy container name for backwards compatibility */
.talent-trees-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.talent-tree {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    width: fit-content;
    gap: 0;
    overflow: visible;
    position: relative;
}

/* Raise this tree above siblings when a tooltip is shown so it isn't covered */
.talent-tree:has(.talent-icon-container:hover) {
    z-index: 100;
}

.clear-tree-button {
    padding: 8px 16px;
    background-color: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s, border-color 0.2s;
}

.clear-tree-button:hover {
    background-color: rgba(255, 50, 50, 0.2);
    border-color: #ff3232;
    color: #ff6666;
}

.talent-tree-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: -15px -15px 0 -15px;
    padding: 15px 15px 10px 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-bottom: 2px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.talent-tree-icon {
    width: 48px;
    height: 48px;
    border: 2px solid var(--accent-color);
    border-radius: 6px;
    flex-shrink: 0;
}

.talent-tree-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 4px;
}

.talent-tree-info {
    flex: 1;
}

.talent-tree-name,
.tree-name {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 4px;
}

.talent-tree-points,
.tree-points {
    font-size: 0.9em;
    color: var(--primary-color);
}

.talent-tree-talents {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0 -15px -15px -15px;
    padding: 8px 15px 15px 15px;
    border-radius: 0 0 8px 8px;
    background-color: rgba(0, 0, 0, 0.3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.talent-grid-container {
    position: relative;
}

/* Talent tree backgrounds - Shaman (on .talent-tree-talents only) */
[data-class="shaman"] .talent-tree[data-tree="elemental"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Shaman/Elemental.jpg');
}

[data-class="shaman"] .talent-tree[data-tree="enhancement"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Shaman/Enhancement.jpg');
}

[data-class="shaman"] .talent-tree[data-tree="restoration"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Shaman/Restoration.jpg');
}

/* Talent tree backgrounds - Druid */
[data-class="druid"] .talent-tree[data-tree="balance"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Druid/Balance.jpg');
}

[data-class="druid"] .talent-tree[data-tree="feralcombat"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Druid/FeralCombat.jpg');
}

[data-class="druid"] .talent-tree[data-tree="restoration"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Druid/Restoration.jpg');
}

/* Talent tree backgrounds - Hunter */
[data-class="hunter"] .talent-tree[data-tree="beastmastery"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Hunter/BeastMastery.jpg');
}

[data-class="hunter"] .talent-tree[data-tree="marksmanship"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Hunter/Marksmanship.jpg');
}

[data-class="hunter"] .talent-tree[data-tree="survival"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Hunter/Survival.jpg');
}

/* Talent tree backgrounds - Mage */
[data-class="mage"] .talent-tree[data-tree="arcane"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Mage/Arcane.jpg');
}

[data-class="mage"] .talent-tree[data-tree="fire"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Mage/Fire.jpg');
}

[data-class="mage"] .talent-tree[data-tree="frost"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Mage/Frost.jpg');
}

/* Talent tree backgrounds - Paladin */
[data-class="paladin"] .talent-tree[data-tree="holy"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Paladin/Holy.jpg');
}

[data-class="paladin"] .talent-tree[data-tree="protection"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Paladin/Protection.jpg');
}

[data-class="paladin"] .talent-tree[data-tree="retribution"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Paladin/Retribution.jpg');
}

/* Talent tree backgrounds - Priest */
[data-class="priest"] .talent-tree[data-tree="discipline"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Priest/Discipline.jpg');
}

[data-class="priest"] .talent-tree[data-tree="holy"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Priest/Holy.jpg');
}

[data-class="priest"] .talent-tree[data-tree="shadow"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Priest/Shadow.jpg');
}

/* Talent tree backgrounds - Rogue */
[data-class="rogue"] .talent-tree[data-tree="assassination"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Rogue/Assassination.jpg');
}

[data-class="rogue"] .talent-tree[data-tree="combat"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Rogue/Combat.jpg');
}

[data-class="rogue"] .talent-tree[data-tree="subtlety"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Rogue/Subtlety.jpg');
}

/* Talent tree backgrounds - Warlock */
[data-class="warlock"] .talent-tree[data-tree="affliction"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warlock/Affliction.jpg');
}

[data-class="warlock"] .talent-tree[data-tree="demonology"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warlock/Demonology.jpg');
}

[data-class="warlock"] .talent-tree[data-tree="destruction"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warlock/Destruction.jpg');
}

/* Talent tree backgrounds - Warrior */
[data-class="warrior"] .talent-tree[data-tree="arms"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warrior/Arms.jpg');
}

[data-class="warrior"] .talent-tree[data-tree="fury"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warrior/Fury.jpg');
}

[data-class="warrior"] .talent-tree[data-tree="protection"] .talent-tree-talents {
    background-image: url('/assets/talent%20tree%20backgrounds/Warrior/Protection.jpg');
}

.talent-grid {
    display: grid;
    grid-template-columns: repeat(4, 45px);
    grid-template-rows: repeat(7, 45px);
    gap: 16px; /* Increased from 8px for more room for connections */
    position: relative;
}

.talent-arrows-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.talent-cell {
    position: relative;
}

.talent-cell.empty {
    /* Empty cells are just spacing */
}

/* Talent prerequisite arrows */
.talent-arrow {
    position: absolute;
    pointer-events: none;
    z-index: 10; /* Higher z-index to appear above empty cells and talent icons */
}

/* Vertical arrow (same column, different rows) */
.talent-arrow.vertical {
    width: 4px; /* Doubled from 2px */
    background: linear-gradient(to bottom, #666, #999);
    left: 50%;
    transform: translateX(-2px);
    /* Add padding at bottom to prevent line showing through arrow tip */
    padding-bottom: 2px;
    box-sizing: border-box;
}

/* Horizontal arrow (same row, different columns) */
.talent-arrow.horizontal {
    height: 4px; /* Doubled from 2px */
    background: linear-gradient(to right, #666, #999);
    top: 50%;
    transform: translateY(-2px);
    /* Add padding at right to prevent line showing through arrow tip */
    padding-right: 2px;
    box-sizing: border-box;
}

/* Diagonal arrows (corner connections) - removed, now using 90-degree pipes */
.talent-arrow.diagonal {
    background: #888;
    transform-origin: top left;
}

/* Arrow head indicator */
.talent-arrow::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent; /* Increased from 4px */
}

/* No arrow tip for intermediate segments */
.talent-arrow.no-tip::after {
    display: none;
}

.talent-arrow.vertical::after {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #999;
}

.talent-arrow.horizontal::after {
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left-color: #999;
}

/* Grayed out talent when prerequisites not met */
.talent-icon-container.locked {
    cursor: not-allowed;
}

.talent-icon-container.locked img {
    filter: grayscale(100%);
    opacity: 0.8;
}

.talent-icon-container.locked .talent-counter {
    opacity: 0.8;
}

/* Fully saturated available talent (unselected: 80% opacity) */
.talent-icon-container.available img {
    filter: none;
    opacity: 0.8;
}

/* Unlocked arrow state (golden brown parchment color) */
.talent-arrow.unlocked line {
    stroke: #d4a564 !important; /* More golden brown */
}

.talent-arrow.unlocked polygon {
    fill: #d4a564 !important; /* More golden brown */
}

.talent-tooltip {
    position: absolute;
    left: 70px;
    top: 0;
    background-color: var(--card-bg) !important;
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 12px;
    min-width: 250px;
    max-width: 350px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
}

.talent-icon-container:hover .talent-tooltip {
    opacity: 1;
}

.talent-tooltip-header {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--accent-color);
    margin-bottom: 8px;
}

.talent-tooltip-rank {
    font-size: 0.9em;
    color: #ffd700;
    margin-bottom: 8px;
}

.talent-tooltip-description {
    font-size: 0.9em;
    line-height: 1.4;
    color: #e0e0e0;
}

.talent-tooltip-requires {
    font-size: 0.85em;
    color: #ff6666;
    margin-top: 8px;
    font-style: italic;
}

/* Tooltip content styles */
.tooltip-name {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--accent-color);
    margin-bottom: 8px;
}

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

.tooltip-desc {
    font-size: 0.9em;
    line-height: 1.4;
    color: #e0e0e0;
    white-space: pre-line;
}
.buff-icon {
    position: relative;
    cursor: pointer;
    user-select: none;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    border-width: 2px;
    border-style: solid;
    border-color: var(--border-color);
}
.buff-icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    filter: grayscale(80%) brightness(0.7);
    transition: filter 0.2s;
}
.buff-icon:hover img {
    filter: grayscale(50%) brightness(0.9);
}
.buff-icon.active {
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.buff-icon.active img {
    filter: grayscale(0%) brightness(1);
}
.buff-icon.is-improved {
    border-color: #ffd700;
}
/* Removed simple name tooltip - now using proper tooltip system */
.buff-upgrade-toggle {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 18px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transform: scale(0);
    transition: transform 0.2s ease-out;
    z-index: 5;
}
.buff-icon.active .buff-upgrade-toggle {
    transform: scale(1);
}
.buff-icon.is-improved .buff-upgrade-toggle {
    background-color: #4CAF50;
    color: #fff;
}
.buff-icon.active:not(.is-improved) .buff-upgrade-toggle {
    background-color: #f44336;
    color: #fff;
}
.stats-grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 15px;
}

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

/* Compact stats grid - 5 columns, 2 rows; full center column */
.stats-grid-compact {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    margin-top: 15px;
    overflow: hidden;
}

.detailed-stats-compact {
    min-width: 0;
    overflow: hidden;
}
.stat-column {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    padding: 10px;
    min-width: 0;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}
.stat-column:hover {
    border-color: #5a5a62;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.4);
}
.stat-column h4 {
    margin: 0 0 8px 0;
    text-align: center;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 6px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 4px;
    font-size: 0.85em;
    border-bottom: 1px solid #4a4a5233;
    transition: background-color 0.15s ease;
}
.stat-item:hover {
    background-color: rgba(76, 175, 80, 0.05);
}
.stat-column .stat-item:last-child {
    border-bottom: none;
}
.stat-item span {
    color: #b0b0b0;
}
.stat-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

.spell-strike-sources-list {
    margin-top: 4px;
    padding-left: 8px;
    border-left: 2px solid var(--border-color);
}
.spell-strike-source {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.85em;
    color: var(--secondary-color);
    margin-bottom: 2px;
}
.spell-strike-source-name { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; }
.spell-strike-source-value { color: var(--primary-color); flex-shrink: 0; }

.stat-item strong.stat-value-stacked {
    text-align: right;
    line-height: 1.5;
}
.enchant-item {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}
.enchant-item:hover {
    background-color: var(--accent-color);
}
.item-tooltip { position: absolute; z-index: 3000; background-color: var(--card-bg); border: 1px solid var(--border-color); padding: 10px; border-radius: 4px; max-width: 350px; font-family: Arial, sans-serif; font-size: 14px; line-height: 1.5; pointer-events: none; }
.item-tooltip b.q0, .q0 { color: #9d9d9d; }
.item-tooltip b.q1, .q1 { color: #ffffff; }
.item-tooltip b.q2, .q2 { color: #1eff00; }
.item-tooltip b.q3, .q3 { color: #0070dd; }
.item-tooltip b.q4, .q4 { color: #a335ee; }
.item-tooltip b.q5, .q5 { color: #ff8000; }
.item-tooltip b.q6, .q6 { color: #e6cc80; }
.tooltip-white { color: #ffffff; }
.tooltip-green { color: #1eff00; }
.tooltip-gold { color: #ffd100; }
.tooltip-set-name { color: #ffd100; }
.tooltip-set-grey { color: #808080; }
.tooltip-set-equipped { color: #ffffff; }
.tooltip-split-line { display: flex; justify-content: space-between; width: 100%; }
.tooltip-name-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tooltip-sim-star {
    color: #ffd700;
    font-size: 16px;
    flex-shrink: 0;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 215, 0, 0.4);
    animation: simStarPulse 2s ease-in-out infinite;
}
@keyframes simStarPulse {
    0%, 100% { text-shadow: 0 0 6px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 215, 0, 0.4); }
    50% { text-shadow: 0 0 10px rgba(255, 215, 0, 1), 0 0 20px rgba(255, 215, 0, 0.7), 0 0 30px rgba(255, 215, 0, 0.3); }
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; width: 90%; max-width: 1200px; height: 80vh; display: flex; flex-direction: column; box-shadow: 0 5px 25px rgba(0,0,0,0.5); font-size: 1.1em; }
.bug-report-modal-content { height: auto; max-height: 90vh; min-height: 400px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 25px; border-bottom: 1px solid var(--border-color); }
.modal-header h2 { margin: 0; border: none; padding: 0; }
.modal-close { background: none; border: none; color: var(--text-color); font-size: 2.5rem; font-weight: bold; line-height: 1; cursor: pointer; opacity: 0.7; }
.modal-close:hover { opacity: 1; }
.modal-body { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; overflow: hidden; }
.modal-filters { margin-bottom: 20px; }
#modal-search-input { width: 100%; padding: 12px; font-size: 1.15em; }
#enchant-search-input { width: 100%; padding: 12px; font-size: 1.15em; margin-bottom: 0; }
.filter-row { margin-top: 15px; }
.filter-group { display: flex; flex-direction: column; gap: 8px; }
.filter-group label { font-weight: bold; font-size: 1em; color: var(--text-color); }
.filter-group input[type="text"] { padding: 8px; font-size: 1.05em; background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 4px; }
.quality-checkboxes { display: flex; flex-wrap: wrap; gap: 12px; }
.quality-filter { display: flex; align-items: center; gap: 5px; cursor: pointer; font-size: 1em; }
.quality-filter input[type="checkbox"] { cursor: pointer; width: 16px; height: 16px; }

/* Item Level Slider */
.ilvl-slider-container { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ilvl-input { width: 60px; padding: 6px; text-align: center; background-color: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-color); border-radius: 4px; }
.ilvl-slider { flex: 1; min-width: 100px; }
.ilvl-separator { font-weight: bold; color: var(--text-color); }

/* Stat Filter Dropdowns */
.stat-filters-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Custom dropdown containers */
.stat-dropdown-container { position: relative; }

.stat-dropdown-header {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-size: 1em;
    user-select: none;
}

.stat-dropdown-header:hover {
    border-color: var(--accent-color);
    background-color: rgba(139, 195, 74, 0.1);
}

.stat-dropdown-header .dropdown-arrow {
    font-size: 0.8em;
    transition: transform 0.2s;
}

.stat-dropdown-header.open .dropdown-arrow {
    transform: rotate(180deg);
}

.stat-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.stat-dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.9em;
    transition: background-color 0.15s;
}

.stat-dropdown-menu label:hover {
    background-color: rgba(139, 195, 74, 0.2);
}

.stat-dropdown-menu input[type="checkbox"] {
    display: none; /* Hide the actual checkbox */
}

/* Custom checkmark */
.stat-dropdown-menu label::before {
    content: '✓';
    font-size: 1.1em;
    font-weight: bold;
    color: transparent;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-dropdown-menu input[type="checkbox"]:checked + span::before {
    color: #8bc34a;
}

/* Alternative: add ::before to the label when checkbox is checked */
.stat-dropdown-menu label:has(input[type="checkbox"]:checked)::before {
    color: #8bc34a;
}

/* Reset Filters Button */
.reset-filters-btn {
    width: 100%;
    padding: 10px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: 1px solid #c0392b;
    border-radius: 4px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-filters-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    box-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
    transform: translateY(-1px);
}

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

.modal-item-list { flex-grow: 1; overflow-y: auto; margin-right: -15px; padding-right: 15px; }
.modal-item { display: flex; align-items: center; gap: 15px; padding: 10px; border-bottom: 1px solid var(--border-color); cursor: pointer; transition: background-color 0.2s; }
.modal-item:hover { background-color: var(--accent-color); }
.modal-item img { width: 48px; height: 48px; border-radius: 4px; border: 1px solid #000; }
.modal-item-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.item-stat-preview { font-size: 0.95em; color: #8bc34a; opacity: 0.9; }

/* Ultrawide adjustments - keep proportions correct */
@media (min-width: 3000px) {
    /* Ensure modal stays properly sized */
    .modal-content {
        max-width: 1400px; /* Constrain modal width */
        width: 80%; /* Responsive */
    }
}

.results-card {
    padding: 15px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    min-width: 0;
}

.results-top-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: start;
    min-width: 0;
}

.results-summary h2,
.set-bonuses-panel h2 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.2em;
}

.results-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: center;
}

.results-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; text-align: center; }

.set-bonuses-panel {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.set-bonuses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.set-bonus-item {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 1px solid #4CAF50;
    border-radius: 6px;
    padding: 10px;
    color: #1eff00;
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.set-bonus-header {
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 4px;
}

.set-bonus-description {
    color: #1eff00;
    font-size: 0.95em;
}

.no-set-bonuses {
    text-align: center;
    color: #808080;
    font-style: italic;
    padding: 20px;
}

/* Talent Bonuses Panel (similar to set bonuses) */
.talent-bonuses-panel {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
    min-width: 500px;
    max-width: 700px;
}

.talent-bonuses-panel h2 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    font-size: 1.2em;
}

.talent-bonuses-categories {
    display: flex;
    gap: 15px;
}

.talent-bonuses-category {
    flex: 1;
}

.talent-bonuses-category h3 {
    margin: 0 0 10px 0;
    color: var(--accent-color);
    font-size: 1em;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.talent-bonuses-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.talent-bonus-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    color: var(--text-color);
    font-size: 0.9em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.bonus-source {
    color: #808080;
    font-size: 0.85em;
    font-style: italic;
}

.no-talent-bonuses {
    text-align: center;
    color: #808080;
    font-style: italic;
    padding: 20px;
}
.result-item {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    padding: 10px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}
.result-item h4 { margin: 0 0 5px 0; font-size: 0.9em; color: var(--accent-color); }
.result-item .value { font-size: 1.5em; font-weight: bold; color: var(--primary-color); }
.result-item .sub-value { font-size: 0.8em; opacity: 0.8; }
.attacker-level-group { margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 10px; }

/* Character Header - Export Controls */
.character-header {
    position: relative;
    margin-bottom: 10px;
    min-height: 30px;
}
.character-name-input {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    width: 180px;
    flex-shrink: 0;
}
.character-name-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Hide input styling when imported */
.character-name-input.imported,
.server-select.imported {
    background: none;
    border: none;
    padding: 4px 8px;
    pointer-events: none;
    color: #ffd700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.server-select {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-color);
    border-radius: 4px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    width: 120px;
    flex-shrink: 0;
}
.server-select:focus {
    outline: none;
    border-color: var(--accent-color);
}
.import-armory-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, #45a049 100%);
    color: white;
    border: 1px solid #4a4a52;
    padding: 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    margin-left: auto;
}

.import-armory-btn svg {
    width: 16px;
    height: 16px;
}

/* Hide import button when character is imported */
.import-armory-btn.imported {
    display: none;
}
.import-armory-btn:hover {
    background: linear-gradient(135deg, #45a049 0%, var(--primary-color) 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}
.import-armory-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}
.import-armory-btn .spinner {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
.save-build-btn {
    background: transparent;
    color: #5865F2;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0.8;
}
.save-build-btn svg {
    color: #5865F2;
    fill: none;
    stroke: #5865F2;
}
.save-build-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.save-build-btn:hover svg {
    filter: drop-shadow(0 0 4px rgba(88, 101, 242, 0.6));
}
.save-build-btn:active {
    transform: scale(0.95);
}
.export-build-btn {
    background: transparent;
    color: #ffd700;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0.8;
}
.export-build-btn svg {
    color: #ffd700;
    fill: none;
    stroke: #ffd700;
}
.export-build-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}
.export-build-btn:hover svg {
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}
.export-build-btn:active {
    transform: scale(0.95);
}
.armory-status {
    position: absolute;
    top: 30px;
    left: 0;
    text-align: left;
    font-size: 0.85em;
    min-height: 20px;
}
.armory-status.success { 
    color: var(--primary-color); 
}
.armory-status.error { 
    color: #ff6b6b; 
}
.armory-status.loading { 
    color: var(--accent-color); 
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInUp 0.3s ease-out, fadeOut 0.3s ease-out 2.7s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    border-color: var(--primary-color);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

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

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
.detailed-stats { margin-top: 20px; }

/* Tab Styles */
.tab-header {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tab-btn:hover {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--input-bg) 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.tab-content {
    display: none;
}

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

/* Only when Talents tab is active: use flex layout. When inactive, .tab-content { display: none } applies. */
#talents-tab.active {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    align-items: flex-start;
}

/* Column 1: Talents get priority, left-aligned, no scroll */
#talents-tab.active #talents-list {
    display: block;
    flex: 0 0 auto;
}

/* Column 2: Gear bonuses fill remaining space, grows down as content stacks */
#talents-tab.active .set-bonuses-panel {
    flex: 1 1 0%;
    min-width: 0;
}

/* Gear Compare Styles */
.gear-compare-container {
    padding: 15px 0;
}

.compare-slot-selector {
    margin-bottom: 20px;
    text-align: center;
}

.compare-slot-selector label {
    font-weight: bold;
    margin-right: 10px;
    color: var(--text-color);
}

.compare-dropdown {
    min-width: 200px;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
}

.compare-dropdown:focus {
    outline: none;
    border-color: var(--accent-color);
}

.compare-dropdown option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* Tank Simulator Subtabs */
.tank-sim-subtabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tank-sim-subtab-btn {
    flex: 1;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tank-sim-subtab-btn:hover {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--input-bg) 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.tank-sim-subtab-btn.active {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.tank-sim-subtab-content {
    display: none;
}

.tank-sim-subtab-content.active {
    display: block;
}

/* DPS Simulator Subtabs */
.dps-sim-subtabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.dps-sim-subtab-btn {
    flex: 1;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dps-sim-subtab-btn:hover {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--input-bg) 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.dps-sim-subtab-btn.active {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border-bottom-color: var(--accent-color);
    color: var(--accent-color);
}

.dps-sim-subtab-content {
    display: none;
}

.dps-sim-subtab-content.active {
    display: block;
}

.compare-items-container {
    display: grid;
    grid-template-columns: 1fr 300px 1fr;
    gap: 20px;
    align-items: start;
}

.compare-item-panel {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.compare-item-panel h3 {
    margin: 0 0 15px 0;
    text-align: center;
    color: var(--accent-color);
    font-size: 1.1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.compare-item-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.compare-icon-frame {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.compare-icon-frame.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-icon-frame.clickable:hover {
    border-color: var(--accent-color);
    transform: scale(1.05);
}

#compare-new-icon,
#compare-equipped-icon {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

#compare-new-icon:hover,
#compare-equipped-icon:hover {
    transform: scale(1.05);
}

#compare-new-icon img,
#compare-equipped-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.15); /* Scale up to account for removed border/background space */
}

.compare-icon-frame.drop-zone {
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-icon-frame.drop-zone.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.compare-icon-frame img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

/* Apply same styling as gear icons to placeholder compare icons */
.compare-icon-frame img[src*="gearcompare.png"] {
    filter: brightness(0.7) sepia(1) hue-rotate(220deg) saturate(0.6);
    opacity: 0.8;
}

/* Radial Menu Styles */
.radial-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    pointer-events: none;
}

.radial-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: all;
    animation: fadeIn 0.2s ease;
}

.radial-menu-wheel {
    position: fixed;
    width: 500px;
    height: 500px;
    pointer-events: none;
}

.radial-menu-item {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -28px;
    margin-top: -28px;
    pointer-events: all;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    animation: radialItemFadeIn 0.3s ease forwards;
    opacity: 0;
}

@keyframes radialItemFadeIn {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(var(--rotation)) translateY(var(--distance)) rotate(calc(-1 * var(--rotation)));
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(var(--rotation)) translateY(var(--distance)) rotate(calc(-1 * var(--rotation)));
    }
}

.radial-menu-item:hover {
    z-index: 10;
    filter: brightness(1.2);
}

.radial-menu-item:hover .radial-menu-icon-frame {
    transform: scale(1.15);
}

.radial-menu-icon-frame {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    transition: border-color 0.2s ease;
}

.radial-menu-item:hover .radial-menu-icon-frame {
    border-color: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.radial-menu-icon-frame img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: contain;
}

.radial-menu-slot-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: bold;
    color: var(--text-color);
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

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

.compare-item-tooltip {
    min-height: 200px;
}

.item-tooltip-static {
    font-size: 0.9em;
    line-height: 1.5;
}

.no-item-message {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px;
}

/* Tank Simulator Styles */
.tank-sim-container {
    padding: 15px 0;
}

.tank-sim-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.sim-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-control-group label {
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9em;
}

.sim-dropdown,
.sim-input {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1em;
    min-width: 200px;
}

.sim-input {
    min-width: 120px;
}

.sim-dropdown:focus,
.sim-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.sim-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1aff00 100%);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 255, 0, 0.3);
}

.sim-button:hover {
    background: linear-gradient(135deg, #1aff00 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px rgba(30, 255, 0, 0.5);
    transform: translateY(-2px);
}

.simulation-results {
    margin-top: 25px;
}

.sim-summary {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sim-summary h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.sim-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.sim-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sim-label {
    font-size: 0.9em;
    color: var(--secondary-color);
}

.sim-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
}

.sim-stat-weights {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sim-stat-weights h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

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

.stat-weight-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.weight-label {
    font-size: 0.9em;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.weight-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color);
    min-width: 60px;
    text-align: right;
}

.weight-unit {
    font-size: 0.85em;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.sim-breakdown {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.sim-breakdown h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.sim-breakdown-content {
    display: block;
}

.sim-breakdown-table {
    min-width: 0;
}

.sim-breakdown-chart {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sim-proc-uptime {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sim-proc-uptime h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1em;
}

.sim-breakdown-chart h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1em;
}

.sim-breakdown-chart canvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    width: 100%;
    height: auto;
}

.sim-table {
    width: 100%;
    border-collapse: collapse;
}

.sim-table thead {
    background: var(--input-bg);
}

.sim-table th {
    padding: 12px;
    text-align: left;
    color: var(--accent-color);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
}

.sim-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.sim-table tbody tr:hover {
    background: var(--input-bg);
}

.sim-table tbody tr:last-child td {
    border-bottom: none;
}

/* Raid Simulator Styles */
.raid-sim-container {
    padding: 0;
}

.raid-sim-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.raid-sim-results {
    margin-top: 25px;
    position: relative;
}

.raid-sim-results h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

#raid-sim-table-container {
    overflow-x: auto;
}

.raid-sim-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.raid-sim-table thead {
    background: var(--input-bg);
}

.raid-sim-table th {
    padding: 12px;
    text-align: left;
    color: var(--accent-color);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.raid-sim-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.raid-sim-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.raid-sim-table tbody tr:last-child td {
    border-bottom: none;
}

.raid-sim-table .boss-name {
    font-weight: 500;
    color: var(--text-color);
}

.raid-sim-table .damage-range {
    color: var(--secondary-color);
}

.raid-sim-table .sim-value {
    color: var(--primary-color);
    font-weight: 500;
}

.raid-sim-table .sim-loading {
    color: #888;
    font-style: italic;
}

/* Raid Sim Loading States */
.raid-sim-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: var(--text-color);
}

.raid-sim-loading p {
    margin-top: 15px;
    font-size: 1.1em;
    color: var(--accent-color);
}

.raid-sim-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.raid-sim-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    z-index: 10;
    color: var(--text-color);
}

.raid-sim-overlay .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 12px;
}

.raid-sim-overlay p {
    margin: 0;
    font-size: 1.1em;
    color: var(--accent-color);
}

.raid-sim-overlay #raid-sim-progress-text {
    color: var(--primary-color);
    font-weight: bold;
}

.raid-sim-overlay #raid-sim-total-bosses {
    color: var(--accent-color);
    font-weight: bold;
}

.raid-sim-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 500;
}

.raid-sim-progress span {
    display: flex;
    align-items: center;
    gap: 8px;
}

#raid-sim-progress-text {
    color: var(--primary-color);
    font-weight: bold;
}

#raid-sim-total-bosses {
    color: var(--accent-color);
    font-weight: bold;
}

.loading-spinner-small {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.compare-stats-diff {
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compare-stats-diff h3 {
    margin: 0 0 15px 0;
    text-align: center;
    color: var(--accent-color);
    font-size: 1.1em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 8px;
}

.stat-diff-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-diff-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.95em;
    transition: background-color 0.15s ease;
}

.stat-diff-item:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

.stat-diff-positive {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
    border-left: 3px solid #4CAF50;
}

.stat-diff-positive .stat-diff-value {
    color: #4CAF50;
    font-weight: bold;
}

.stat-diff-negative {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.05) 100%);
    border-left: 3px solid #f44336;
}

.stat-diff-negative .stat-diff-value {
    color: #f44336;
    font-weight: bold;
}

.stat-diff-ehp {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.05) 100%);
    border-left: 3px solid var(--accent-color);
    margin-top: 10px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.stat-diff-ehp .stat-diff-name {
    font-weight: bold;
    color: var(--accent-color);
}

.stat-diff-ehp .stat-diff-value {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.1em;
}

.stat-diff-name {
    color: var(--text-color);
}

.stat-diff-value {
    font-family: 'Courier New', monospace;
}

.no-comparison, .no-stat-changes {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px 20px;
}

.compare-enchant-selector {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.compare-enchant-dropdown {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid #FFD700;
    color: var(--text-color);
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-enchant-dropdown:hover {
    border-color: #FFC107;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.compare-enchant-dropdown:focus {
    outline: none;
    border-color: #FFC107;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.compare-enchant-dropdown option {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px;
}

/* ======================================================= */
/* ===            LOADING SCREEN STYLES                === */
/* ======================================================= */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #1e1e22 0%, #0a0a0c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    max-width: 500px;
    padding: 40px;
}

.loading-icon {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

.loading-spinner {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 20px rgba(30, 255, 0, 0.6));
    animation: spin 2s linear infinite, pulse 1.5s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% {
        filter: drop-shadow(0 0 20px rgba(30, 255, 0, 0.6));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(30, 255, 0, 0.9));
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.loading-title {
    font-size: 2.5em;
    color: var(--accent-color);
    margin: 0 0 20px 0;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

.loading-text {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 30px;
    animation: fadeInOut 2s ease-in-out infinite;
}

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

.loading-bar-container {
    width: 100%;
    height: 8px;
    background: rgba(30, 255, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.loading-bar {
    height: 100%;
    background: linear-gradient(90deg,
        rgba(30, 255, 0, 0.8) 0%,
        rgba(30, 255, 0, 1) 50%,
        rgba(30, 255, 0, 0.8) 100%);
    border-radius: 10px;
    animation: loadingProgress 2s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(30, 255, 0, 0.8);
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-subtitle {
    font-size: 0.9em;
    color: var(--secondary-color);
    font-style: italic;
    animation: fadeInOut 2.5s ease-in-out infinite;
}

/* ======================================================= */
/* ===       SIMULATION PROGRESS MODAL STYLES          === */
/* ======================================================= */

.sim-progress-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sim-progress-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.sim-progress-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 450px;
    padding: 40px 50px;
    background: linear-gradient(145deg, rgba(30, 30, 34, 0.95), rgba(20, 20, 24, 0.98));
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 0 40px rgba(30, 255, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.sim-progress-icon {
    margin-bottom: 20px;
}

.sim-progress-spinner {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    animation: simSpinnerPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px rgba(30, 255, 0, 0.4);
}

@keyframes simSpinnerPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 30px rgba(30, 255, 0, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 50px rgba(30, 255, 0, 0.6);
    }
}

.sim-progress-title {
    font-family: 'Cinzel', 'Georgia', serif;
    font-size: 1.5em;
    color: var(--accent-color);
    margin: 0 0 10px 0;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.sim-progress-text {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 20px;
    min-height: 24px;
}

.sim-progress-bar-container {
    width: 100%;
    height: 10px;
    background: rgba(30, 255, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.sim-progress-bar {
    height: 100%;
    background: linear-gradient(90deg,
        rgba(30, 255, 0, 0.8) 0%,
        rgba(30, 255, 0, 1) 50%,
        rgba(30, 255, 0, 0.8) 100%);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(30, 255, 0, 0.8);
    transition: width 0.3s ease;
}

.sim-progress-percent {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(30, 255, 0, 0.5);
}

/* Animation for showing the modal */
.sim-progress-modal.show .sim-progress-content {
    animation: simModalSlideIn 0.3s ease;
}

@keyframes simModalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ======================================================= */
/* ===         END OF LOADING SCREEN STYLES            === */
/* ======================================================= */

/* ======================================================= */
/* ===         RESPONSIVE SCALING FOR ALL RESOLUTIONS   === */
/* ======================================================= */

/* Designed for 2560x1440 (2K) - scale DOWN for smaller resolutions */
/* Use CSS zoom for uniform scaling that maintains aspect ratios */

/* Default for 2K and larger - NO SCALING */
body {
    zoom: 1;
}

/* Ultrawide resolutions (3440x1440, 3840x1600, etc.) - NO SCALING, just constrain width */
@media (min-width: 3000px) {
    body {
        zoom: 1; /* No zoom */
    }
    .main-content {
        max-width: 2400px; /* Constrain width, center content */
        margin: 0 auto;
    }
}

/* Standard 2K (2560x1440) - NO SCALING, original design size */
@media (min-width: 2560px) and (max-width: 2999px) {
    body {
        zoom: 1; /* No zoom */
    }
}

/* Between 2K and 1080p (2200-2559px) - slight scale down */
@media (max-width: 2559px) and (min-width: 2200px) {
    body {
        zoom: 0.88; /* Scale down to 88% */
    }
}

/* 1080p range (1920px-2199px) - scale DOWN to fit */
@media (max-width: 2199px) and (min-width: 1920px) {
    body {
        zoom: 0.75; /* Scale down to 75% - this is the key for 1080p */
    }
}

/* Below 1080p (1600px-1919px) - scale down more */
@media (max-width: 1919px) and (min-width: 1600px) {
    body {
        zoom: 0.65; /* Scale down to 65% */
    }
}

/* Smaller displays (1366px-1599px) - scale down further */
@media (max-width: 1599px) and (min-width: 1366px) {
    body {
        zoom: 0.55; /* Scale down to 55% */
    }
}

/* Very small displays (below 1366px) - minimum scale */
@media (max-width: 1365px) {
    body {
        zoom: 0.50; /* Scale down to 50% */
    }
}

/* ======================================================= */
/* ===         END OF RESPONSIVE SCALING                === */
/* ======================================================= */

/* Tank Simulator Styles */
.tank-sim-container {
    padding: 15px 0;
}

.tank-sim-controls {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.sim-control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-control-group label {
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9em;
}

.sim-dropdown,
.sim-input {
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1em;
    min-width: 200px;
}

.sim-input {
    min-width: 120px;
}

.sim-dropdown:focus,
.sim-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.sim-button {
    padding: 10px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1aff00 100%);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 255, 0, 0.3);
}

.sim-button:hover {
    background: linear-gradient(135deg, #1aff00 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px rgba(30, 255, 0, 0.5);
    transform: translateY(-2px);
}

.simulation-results {
    margin-top: 25px;
}

.sim-summary {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sim-summary h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.sim-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.sim-summary-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sim-label {
    font-size: 0.9em;
    color: var(--secondary-color);
}

.sim-value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--accent-color);
}

.sim-stat-weights {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sim-stat-weights h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

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

.stat-weight-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px;
    background: var(--input-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.weight-label {
    font-size: 0.9em;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.weight-value {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color);
    min-width: 60px;
    text-align: right;
}

.weight-unit {
    font-size: 0.85em;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.sim-breakdown {
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.sim-breakdown h3 {
    margin: 0 0 15px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.sim-breakdown-content {
    display: block;
}

.sim-breakdown-table {
    min-width: 0;
}

.sim-breakdown-chart {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sim-proc-uptime {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.sim-proc-uptime h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1em;
}

.sim-breakdown-chart h4 {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1em;
}

.sim-breakdown-chart canvas {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    width: 100%;
    height: auto;
}

.sim-table {
    width: 100%;
    border-collapse: collapse;
}

.sim-table thead {
    background: var(--input-bg);
}

.sim-table th {
    padding: 12px;
    text-align: left;
    color: var(--accent-color);
    font-weight: bold;
    border-bottom: 2px solid var(--border-color);
}

.sim-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
}

.sim-table tbody tr:hover {
    background: var(--input-bg);
}

.sim-table tbody tr:last-child td {
    border-bottom: none;
}/* Boss Search Styles */
.sim-search-group {
    width: 100%;
    margin-bottom: 15px;
}

.boss-search-container {
    display: flex;
    gap: 10px;
}

.sim-search-input {
    flex: 1;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1em;
}

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

.sim-search-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--input-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s ease;
}

.sim-search-btn:hover {
    background: linear-gradient(135deg, var(--input-bg) 0%, var(--card-bg) 100%);
    border-color: var(--accent-color);
}

.boss-search-results {
    margin-top: 10px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.search-loading,
.search-error,
.search-no-results {
    padding: 15px;
    text-align: center;
    color: var(--secondary-color);
}

.search-error {
    color: #ff6b6b;
}

.search-results-list {
    padding: 5px;
}

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

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

.search-result-item:hover {
    background: var(--input-bg);
}

.search-result-item.is-boss {
    border-left: 3px solid var(--accent-color);
}

.search-result-item.is-boss .result-name {
    color: var(--accent-color);
    font-weight: bold;
}

.result-name {
    font-size: 1em;
    color: var(--text-color);
    margin-bottom: 4px;
}

.result-meta {
    font-size: 0.85em;
    color: var(--secondary-color);
}

/* Quick Sim Prompt Styles */
.quick-sim-prompt {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px dashed var(--border-color);
    border-radius: 12px;
}

.quick-sim-prompt-header h4 {
    margin: 0 0 10px 0;
    color: var(--accent-color);
    font-size: 1.2em;
}

.quick-sim-prompt-header p {
    margin: 0 0 20px 0;
    color: var(--secondary-color);
    font-size: 0.95em;
}

.quick-sim-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1aff00 100%);
    color: var(--bg-color);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 255, 0, 0.3);
}

.quick-sim-btn:hover {
    background: linear-gradient(135deg, #1aff00 0%, var(--primary-color) 100%);
    box-shadow: 0 4px 12px rgba(30, 255, 0, 0.5);
    transform: translateY(-2px);
}

.quick-sim-container {
    margin-top: 20px;
    padding: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
}

.quick-sim-search-group {
    margin-bottom: 15px;
}

.quick-sim-search-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-color);
}

.quick-sim-search-input {
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 8px;
    font-size: 1em;
}

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

.quick-sim-run-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.quick-sim-run-btn:hover {
    background: linear-gradient(135deg, #1976D2 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
}

.quick-sim-reset-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
    margin-bottom: 10px;
    margin-right: 10px;
    display: inline-block;
}

.quick-sim-reset-btn:hover {
    background: linear-gradient(135deg, #d32f2f 0%, #f44336 100%);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5);
    transform: translateY(-2px);
}

.current-boss-info {
    color: var(--text-color);
    margin-top: 10px;
    font-size: 0.9em;
}

.current-boss-info strong {
    color: var(--accent-color);
}

.tank-score-container {
    margin-top: 15px;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9em;
}

.tank-score-display {
    width: 100%;
}

.tank-score-header {
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
    color: var(--accent-color);
    font-size: 1.1em;
}

.tank-score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tank-score-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: var(--text-color);
}

.tank-score-item.total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    font-weight: bold;
    color: var(--accent-color);
}

.tank-score-label {
    flex: 1;
    text-align: left;
}

.tank-score-value {
    flex: 0 0 auto;
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

.tank-score-multiplier-info {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    margin-bottom: 8px;
    font-size: 0.9em;
    color: var(--secondary-color);
    border-bottom: 1px dashed var(--border-color);
}

.tank-score-stat-weight {
    font-size: 0.85em;
    color: var(--secondary-color);
    font-weight: normal;
    font-style: italic;
}

.quick-sim-run-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.quick-sim-status {
    margin-top: 15px;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-weight: bold;
}



/* Stat Weight Formula Styles */
.stat-weight-item.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-weight-item.clickable:hover {
    background: rgba(30, 255, 0, 0.1);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.stat-weight-formula {
    margin-top: 20px;
    padding: 20px;
    background: rgba(30, 255, 0, 0.05);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
}

.stat-weight-formula h4 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1em;
}

.stat-weight-formula .formula-section {
    margin-bottom: 15px;
}

.stat-weight-formula .formula-section:last-child {
    margin-bottom: 0;
}

.stat-weight-formula .formula-label {
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.stat-weight-formula .formula-text {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    margin-bottom: 8px;
    line-height: 1.6;
}

.stat-weight-formula .formula-explanation {
    color: var(--secondary-color);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Bug Report Button - Fixed in top left corner */
.bug-report-button {
    position: fixed;
    left: 20px;
    top: 20px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: var(--accent-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.bug-report-button:hover {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(30, 255, 0, 0.4);
}

.view-reports-btn {
    top: 80px; /* Position below the bug report button */
}

.bug-report-button svg {
    display: block;
}

.view-reports-btn {
    top: 80px; /* Position below the bug report button */
    position: relative; /* Allow badge positioning */
}

.bug-report-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid var(--bg-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.bug-report-notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(30, 255, 0, 0.3);
    z-index: 1001;
    max-width: 400px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.bug-report-notification-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
}

.bug-report-notification-icon {
    background: var(--primary-color);
    color: var(--bg-color);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.bug-report-notification-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bug-report-notification-text strong {
    color: var(--primary-color);
    font-size: 14px;
}

.bug-report-notification-text span {
    color: var(--text-color);
    font-size: 12px;
}

.bug-report-notification-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bug-report-notification-close:hover {
    opacity: 1;
    color: var(--secondary-color);
}

/* Bug Report Modal */
.bug-report-modal-content {
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    min-height: 400px;
    height: auto; /* Override the default 80vh from .modal-content */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bug-report-modal-content .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Allows flex child to shrink below content size */
    /* padding is already set by .modal-body, don't override */
}

/* Custom scrollbar for bug report modal */
.bug-report-modal-content .modal-body::-webkit-scrollbar {
    width: 8px;
}

.bug-report-modal-content .modal-body::-webkit-scrollbar-track {
    background: var(--input-bg);
    border-radius: 4px;
}

.bug-report-modal-content .modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.bug-report-modal-content .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.bug-report-modal-content .form-group {
    margin-bottom: 20px;
}

.bug-report-modal-content label {
    display: block;
    margin-bottom: 8px;
    color: var(--accent-color);
    font-weight: bold;
    font-size: 14px;
}

.bug-report-modal-content input[type="text"],
.bug-report-modal-content input[type="file"],
.bug-report-modal-content textarea {
    width: 100%;
    padding: 12px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

.bug-report-modal-content textarea {
    resize: vertical;
    min-height: 120px;
}

.bug-report-modal-content input[type="text"]:focus,
.bug-report-modal-content textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 255, 0, 0.1);
}

.bug-report-modal-content .form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.bug-report-modal-content .btn-primary,
.bug-report-modal-content .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bug-report-modal-content .btn-primary {
    background: var(--primary-color);
    color: var(--bg-color);
}

.bug-report-modal-content .btn-primary:hover {
    background: #17cc00;
    transform: translateY(-1px);
}

.bug-report-modal-content .btn-secondary {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.bug-report-modal-content .btn-secondary:hover {
    background: var(--border-color);
}

#bug-report-status.success {
    background: rgba(30, 255, 0, 0.1);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

#bug-report-status.error {
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
}

.view-reports-btn {
    top: 80px; /* Position below the bug report button */
}

/* Bug Reports Viewer */
.bug-reports-viewer-content {
    max-width: 1200px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.bug-reports-viewer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

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

.bug-report-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--secondary-color);
    padding: 12px 24px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
}

.bug-report-tab:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.bug-report-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.bug-report-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.bug-report-item:hover {
    border-color: var(--accent-color);
}

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

.bug-report-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color);
    margin: 0;
    flex: 1;
}

.bug-report-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.bug-report-timestamp {
    white-space: nowrap;
}

.bug-report-contact {
    white-space: nowrap;
}

.bug-report-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.bug-report-screenshot {
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    max-width: 100%;
}

.bug-report-screenshot img {
    width: 100%;
    height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.bug-report-screenshot img:hover {
    transform: scale(1.02);
}

/* Shaman DPS Simulation - 3 Column Layout */
.dps-ability-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.dps-ability-column {
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--card-bg) 0%, var(--bg-color) 100%);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.dps-column-header {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

.ability-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ability-row {
    display: flex;
    gap: 12px;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ability-row:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.ability-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
}

.ability-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ability-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ability-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95em;
    cursor: pointer;
}

.ability-name:hover {
    color: var(--primary-color);
}

.ability-damage {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.9em;
}

.ability-interval {
    font-size: 0.85em;
    color: var(--text-color);
    opacity: 0.8;
}

.sub-ability {
    margin-top: 8px;
    padding-left: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-ability .ability-name {
    font-size: 0.85em;
    color: var(--text-color);
    opacity: 0.9;
}

.sub-ability .ability-damage {
    font-size: 0.85em;
}

.sub-ability .ability-interval {
    font-size: 0.8em;
}

.bug-report-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85em;
    color: var(--secondary-color);
}

.bug-report-detail-row {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.bug-report-detail-label {
    font-weight: bold;
    min-width: 100px;
}

.bug-report-detail-value {
    flex: 1;
    word-break: break-all;
}

.bug-report-url {
    color: var(--primary-color);
    text-decoration: none;
}

.bug-report-url:hover {
    text-decoration: underline;
}

.bug-report-mark-fixed {
    margin-top: 15px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bug-report-mark-fixed:hover {
    background: #17cc00;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(30, 255, 0, 0.3);
}
