/* Background gradient */
QWidget#central {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
    color: #dfeefc;
    font-family: "Segoe UI", Roboto, Arial;
}

/* Version chip */
QLabel#versionChip {
    background: rgba(125,211,252,0.08);
    border: 1px solid rgba(125,211,252,0.12);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 17px;
    color: #7DD3FC;
}

/* PULSE STYLE: Applied when the pulse="true" dynamic property is set */
QLabel#versionChip[pulse="true"] {
    background: #FFD24D; /* Bright Gold/Amber for pulsing */
    border: 1px solid #FFD24D;
    color: #000000; /* Contrast text color */
}

/* Game version chip */
QLabel#gameVersionChip {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.12);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 17px;
    color: #22C55E;
}

/* Menu chip button */
QPushButton#menuChip {
    background: rgba(167,139,250,0.08);
    border: 1px solid rgba(167,139,250,0.15);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 17px;
    color: #A78BFA;
}
QPushButton#menuChip:hover {
    background: rgba(167,139,250,0.15);
    border: 1px solid rgba(167,139,250,0.25);
    color: #C4B5FD;
}
QPushButton#menuChip:pressed {
    background: rgba(167,139,250,0.25);
}

/* Control chips */
QPushButton#controlChip {
    background: rgba(128,128,128,0.1);
    border: 1px solid rgba(128,128,128,0.2);
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 20px;
    color: #ffffff;
    text-align: center;
}
QPushButton#controlChip:hover {
    background: rgba(128,128,128,0.2);
    border: 1px solid rgba(128,128,128,0.3);
}

/* Sidebar collapse chip */
QPushButton#sidebarChip {
    background: rgba(255,210,77,0.08);
    border: 1px solid rgba(255,210,77,0.12);
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 17px;
    color: #FFD24D;
}
QPushButton#sidebarChip:hover {
    background: rgba(255,210,77,0.15);
    border: 1px solid rgba(255,210,77,0.25);
    color: #FFE89D;
}
QPushButton#sidebarChip:pressed {
    background: rgba(255,210,77,0.20);
    border: 1px solid rgba(255,210,77,0.30);
}

/* Theme toggle chip */
QPushButton#themeChip {
    background: transparent;
    border: none;
    padding: 8px 12px;
    font-size: 20px;
    color: #f2e558;
    text-align: center;
}
QPushButton#themeChip:hover {
    color: #fffba8;
}

/* Discord chip */
QPushButton#discordChip {
    border: 1px solid rgba(88,101,242,0.3);
    background: rgba(88,101,242,0.1);
    border-radius: 10px;
    padding: 0px;
    color: #818CF8;
}
QPushButton#discordChip:hover {
    background: rgba(88,101,242,0.2);
    border-color: rgba(88,101,242,0.5);
    color: #A5B4FC;
}
QPushButton#discordChip:pressed {
    background: rgba(88,101,242,0.3);
}

/* Scroll area */
QScrollArea {
    border-radius: 10px;
}

QScrollArea#subPopupScroll,
QScrollArea#contextMenuScroll {
    background: transparent;
    border: none;
    border-radius: 0px;
}

/* Card */
QFrame#glass {
    background: rgba(18,20,24,0.65);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    padding: 10px;
}

/* Content widget */
QWidget#contentWidget {
    background: rgba(18,20,24,0.65);
    border-radius: 10px;
}

/* Title area */
QLabel#title {
    font-size: 20px;
    font-weight: 800;
    color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #7DD3FC, stop:1 #A78BFA);
    letter-spacing: 1px;
}

/* Tool card (card layout) */
QFrame#toolCard {
    background: rgba(18, 20, 24, 0.55);
    border: 1px solid rgba(125, 211, 252, 0.08);
    border-radius: 10px;
    min-height: 64px;
}

QFrame#toolCard:hover {
    background: rgba(37, 150, 190, 0.10);
    border: 1px solid rgba(125, 211, 252, 0.20);
}

QLabel#toolCardIcon {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(125, 211, 252, 0.10);
    border-radius: 8px;
}

QLabel#toolCardTitle {
    color: #E6EEF6;
    font-size: 12px;
    font-weight: 700;
}

QLabel#toolCardDesc {
    color: #A6B8C8;
    font-size: 9px;
}

/* Tool widget (composite row) - kept for compatibility */
QWidget.toolRow {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 4px;
    margin: 4px 0px;
}
QWidget.toolRow:hover {
    background: rgba(37,150,190,0.08);
    border: 2px solid rgba(125,211,252,0.2);
}

/* Tool button tightened */
QPushButton.toolCard {
    background: transparent;
    border: none;
    text-align: left;
    padding: 4px 6px;
    font-weight: 600;
    min-height: 40px;
    color: #E6EDF3;
}
QPushButton.toolCard:hover {
    background: transparent;
    color: #AEE9FF;
}

/* Icon label */
QLabel.toolIcon {
    background: rgba(255,255,255,0.02);
    border-radius: 6px;
    padding: 4px;
    min-width: 30px;
    min-height: 30px;
    max-width: 30px;
    max-height: 30px;
}

/* Category title */
QLabel.categoryTitle {
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
}

/* Tools header bar */
QFrame#toolsHeader {
    background: transparent;
}

QPushButton#loadSaveBtn {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    color: #22C55E;
    font-weight: 600;
    min-width: 120px;
}

QPushButton#loadSaveBtn:hover {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.30);
    color: #4ADE80;
}

QPushButton#loadSaveBtn:pressed {
    background: rgba(34, 197, 94, 0.25);
}

QLabel#savePathLabel {
    color: #A6B8C8;
    font-size: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
}

/* Header toolbox button */
QPushButton#hdrBtn {
    border: 1px solid rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.1);
    border-radius: 10px;
    padding: 0px;
    color: #60A5FA;
}
QPushButton#hdrBtn:hover {
    background: rgba(59,130,246,0.2);
    border-color: rgba(59,130,246,0.5);
    color: #93C5FD;
}
QPushButton#hdrBtn:pressed {
    background: rgba(59,130,246,0.3);
}
/* Header info button */
QPushButton#infoBtn {
    border: 1px solid rgba(59,130,246,0.3);
    background: rgba(59,130,246,0.1);
    border-radius: 10px;
    padding: 0px;
    color: #60A5FA;
}
QPushButton#infoBtn:hover {
    background: rgba(59,130,246,0.2);
    border-color: rgba(59,130,246,0.5);
    color: #93C5FD;
}
QPushButton#infoBtn:pressed {
    background: rgba(59,130,246,0.3);
}
/* Header warning button */
QPushButton#warnBtn {
    border: 1px solid rgba(234,179,8,0.3);
    background: rgba(234,179,8,0.1);
    border-radius: 10px;
    padding: 0px;
    color: #FBBF24;
}
QPushButton#warnBtn:hover {
    background: rgba(234,179,8,0.2);
    border-color: rgba(234,179,8,0.5);
    color: #FDE68A;
}
QPushButton#warnBtn:pressed {
    background: rgba(234,179,8,0.3);
}
/* Header discord button */
QPushButton#discordChip {
    border: 1px solid rgba(88,101,242,0.3);
    background: rgba(88,101,242,0.1);
    border-radius: 10px;
    padding: 0px;
    color: #818CF8;
}
QPushButton#discordChip:hover {
    background: rgba(88,101,242,0.2);
    border-color: rgba(88,101,242,0.5);
    color: #A5B4FC;
}
QPushButton#discordChip:pressed {
    background: rgba(88,101,242,0.3);
}

/* Footer */
QStatusBar {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
    color: #dfeefc;
    border-top: 1px solid rgba(255,255,255,0.02);
}

/* Menu */
QMenu {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 rgba(10,12,16,0.95), stop:0.5 rgba(12,16,22,0.95), stop:1 rgba(8,10,14,0.95));
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 16px;
    color: #dfeefc;
}
QMenu::item {
    padding: 8px 12px;
    background: transparent;
    border-radius: 4px;
    color: #dfeefc;
}
QMenu::item:selected {
    background: rgba(125,211,252,0.3);
    color: #ffffff;
}
QMenu::item:disabled {
    color: rgba(255,255,255,0.4);
}
QMenu::separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 0px;
}

/* General QPushButton */
QPushButton {
    background-color: rgba(125,211,252,0.12);
    color: #7DD3FC;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 4px;
    padding: 6px 16px;
    font-weight: 600;
}
QPushButton:hover {
    background-color: rgba(125,211,252,0.2);
    color: #FFFFFF;
    border-color: rgba(125,211,252,0.4);
}
QPushButton:pressed {
    background-color: rgba(125,211,252,0.3);
}
QPushButton:disabled {
    background-color: rgba(255,255,255,0.03);
    color: rgba(148,163,184,0.4);
    border-color: rgba(255,255,255,0.06);
}

/* QFileDialog */
QFileDialog {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
    color: #dfeefc;
}
QFileDialog QLabel { color: #dfeefc; }
QFileDialog QLineEdit {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 6px 10px;
}
QFileDialog QTreeView {
    background: rgba(255,255,255,0.03);
    color: #e2e8f0;
    border: 1px solid rgba(125,211,252,0.15);
}
QFileDialog QComboBox {
    background: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 4px;
    padding: 4px 8px;
}

/* QLineEdit */
QLineEdit {
    background-color: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 6px 10px;
}
QLineEdit:focus {
    border-color: rgba(125,211,252,0.4);
}

/* QLabel */
QLabel {
    color: #dfeefc;
}

/* QComboBox */
QComboBox {
    background-color: #444444;
    color: #dfeefc;
    border: 1px solid #555555;
    padding: 4px;
    border-radius: 4px;
}
QComboBox::drop-down {
    border: none;
}

/* QTreeWidget */
QTreeWidget {
    background: transparent;
    color: #dfeefc;
}
QTreeWidget QHeaderView::section {
    background-color: #2a2d33;
    color: #dfeefc;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    height: 28px;
}
QFrame#treePanel {
    background-color: transparent;
}

QTreeWidget QHeaderView::section:hover {
    background-color: rgba(37,99,235,0.35);
    color: #B8E4FF;
}

/* QProgressBar */
QProgressBar {
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 8px;
    height: 14px;
    text-align: center;
    background: rgba(18,20,24,0.60);
    color: #dfeefc;
}
QProgressBar::chunk {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #7DD3FC, stop:1 #A78BFA);
    border-radius: 8px;
}

/* QCheckBox */
QCheckBox {
    color: #dfeefc;
}

/* QDialog */
QDialog {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
    color: #dfeefc;
    font-family: "Segoe UI", Roboto, Arial;
}

/* QMessageBox / QInputDialog */
QMessageBox, QInputDialog {
    background: qlineargradient(spread:pad, x1:0.0, y1:0.0, x2:1.0, y2:1.0,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
    color: #dfeefc;
    font-family: "Segoe UI", Roboto, Arial;
}
QMessageBox QLabel, QInputDialog QLabel {
    color: #dfeefc;
}
QMessageBox QPushButton, QInputDialog QPushButton {
    background-color: rgba(125,211,252,0.12);
    color: #7DD3FC;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 4px;
    padding: 6px 16px;
    min-width: 70px;
}
QMessageBox QPushButton:hover, QInputDialog QPushButton:hover {
    background-color: rgba(125,211,252,0.2);
    color: #FFFFFF;
}

/* Conversion Dialog Styling */
QDialog QLabel#dialogTitle {
    font-size: 13px;
    font-weight: 600;
    color: #7DD3FC;
    padding-bottom: 4px;
}

QFrame#dialogSeparator {
    background: rgba(125,211,252,0.2);
    max-height: 1px;
    border: none;
}

QPushButton#dialogOption {
    background: rgba(125,211,252,0.06);
    border: 1px solid rgba(125,211,252,0.12);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 11px;
    color: #E6EEF6;
}

QPushButton#dialogOption:hover {
    background: rgba(125,211,252,0.12);
    border-color: rgba(125,211,252,0.25);
    color: #FFFFFF;
}

QPushButton#dialogCancel {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 5px;
    padding: 6px 12px;
    font-size: 10px;
    color: #A6B8C8;
}

QPushButton#dialogCancel:hover {
    background: rgba(255,255,255,0.06);
    color: #FFFFFF;
}

/* Results widget container */
QWidget#resultsWidget {
    background: rgba(18,20,24,0.85);
    border-left: 1px solid rgba(255,255,255,0.04);
}

/* Splitter handle */
QSplitter::handle:horizontal {
    background: rgba(255,255,255,0.02);
    width: 2px;
}

QSplitter::handle:horizontal:hover {
    background: rgba(125,211,252,0.3);
    width: 4px;
}

/* Context Menu Styling */
QMenu {
    background-color: rgba(18,20,24,0.95);
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 4px;
}

QMenu::item {
    background-color: transparent;
    padding: 6px 20px;
    border-radius: 4px;
    color: #E6EEF6;
}

QMenu::item:selected {
    background-color: rgba(125,211,252,0.15);
    color: #FFFFFF;
}

QMenu::item:selected:!enabled {
    background-color: transparent;
}

QMenu::separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 10px;
}

/* Modern Futuristic Tab Styling */
QTabWidget::pane {
    background: rgba(18,20,24,0.85);
    border: 1px solid rgba(125,211,252,0.1);
    border-radius: 10px;
    padding: 12px;
    margin-top: -1px;
}

QTabBar::tab {
    background: rgba(30,33,40,0.7);
    border: 1px solid rgba(125,211,252,0.1);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 10px 18px;
    margin-right: 2px;
    color: #A6B8C8;
    font-weight: 600;
    font-size: 11px;
}

QTabWidget#inventoryTabs::pane {
    border: 1px solid rgba(125, 211, 252, 0.10);
    border-radius: 6px;
    background: transparent;
}

QTabWidget#inventoryTabs QTabBar::tab {
    background: rgba(255, 255, 255, 0.04);
    color: #A6B8C8;
    padding: 6px 14px;
    margin-right: 2px;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    font-weight: 600;
}

QTabWidget#inventoryTabs QTabBar::tab:selected {
    background: rgba(125, 211, 252, 0.10);
    color: #7DD3FC;
}

QTabWidget#inventoryTabs QTabBar::tab:hover:!selected {
    background: rgba(125, 211, 252, 0.05);
    color: #E6EEF6;
}

QTabWidget#mapSidebarTabs::pane {
    border: none;
    background: transparent;
    padding: 0px;
    margin: 0px;
}

QTabWidget#mapSidebarTabs QTabBar::tab {
    background: rgba(255, 255, 255, 0.04);
    color: #A6B8C8;
    padding: 6px 0px;
    margin: 0px 2px;
    border-bottom: 2px solid transparent;
    border-radius: 4px;
    font-weight: 600;
}

QTabWidget#mapSidebarTabs QTabBar::tab:selected {
    background: rgba(125, 211, 252, 0.10);
    color: #7DD3FC;
    border-bottom: 2px solid #7DD3FC;
}

QTabWidget#mapSidebarTabs QTabBar::tab:hover:!selected {
    background: rgba(125, 211, 252, 0.05);
    color: #E6EEF6;
}

QTreeWidget#baseTree,
QTreeWidget#playerTree {
    border: none;
    background: transparent;
}

QTreeWidget#baseTree::item,
QTreeWidget#playerTree::item {
    padding: 2px 4px;
}

QTreeWidget#baseTree QHeaderView::section,
QTreeWidget#playerTree QHeaderView::section {
    background: rgba(255, 255, 255, 0.05);
    color: #A6B8C8;
    padding: 4px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
}

QWidget#sideBar {
    background-color: rgba(10, 12, 16, 0.95);
    border-right: 1px solid rgba(125, 211, 252, 0.08);
}

QPushButton[sidebarItem="true"] {
    background: transparent;
    color: #A6B8C8;
    border: none;
    border-radius: 6px;
    font-size: 18px;
    text-align: center;
    padding: 0px;
}

QPushButton[sidebarItem="true"]:hover {
    background: rgba(125, 211, 252, 0.08);
    color: #E6EEF6;
}

QPushButton[sidebarItem="true"][active="true"] {
    color: #7DD3FC;
    background: transparent;
}

QPushButton[sidebarItem="true"][active="true"]:hover {
    background: rgba(125, 211, 252, 0.12);
    color: #AEE9FF;
}

QToolTip {
    background-color: rgba(18, 22, 28, 0.95);
    color: #E6EEF6;
    border: 1px solid rgba(125, 211, 252, 0.25);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
}

/* Tab Content Widgets - Ensure proper theming for all tab content */
QWidget#playersTab, QWidget#guildsTab, QWidget#basesTab, QWidget#mapTab, QWidget#toolsTab, QWidget#exclusionsTab {
    background: rgba(18,20,24,0.65);
    border-radius: 10px;
    color: #dfeefc;
}

/* Stacked Widget and Tab Content Body */
QStackedWidget {
    background: rgba(18,20,24,0.65);
    border-radius: 10px;
    color: #dfeefc;
    padding: 10px;
    margin: 10px;
    border: 2px solid rgba(125,211,252,0.2);
}

/* Ensure all tab content widgets inherit theme colors */
QStackedWidget QWidget {
    background: transparent;
    color: #dfeefc;
}

QStackedWidget QLabel {
    color: #dfeefc;
}

QStackedWidget QLineEdit {
    background-color: rgba(255,255,255,0.06);
    color: #e2e8f0;
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 6px 10px;
}
QStackedWidget QLineEdit:focus {
    border-color: rgba(125,211,252,0.4);
}

QStackedWidget QComboBox {
    background-color: #444444;
    color: #dfeefc;
    border: 1px solid #555555;
    padding: 4px;
    border-radius: 4px;
}

QStackedWidget QPushButton {
    background-color: #555555;
    color: white;
    padding: 6px;
    border-radius: 4px;
}

QScrollArea#toolsScrollArea {
    background: transparent;
    border: none;
}

/* ===== Results Panel Refinement ===== */

/* Glass Panel Effect */
QFrame#glassPanel {
    background: rgba(18,20,24,0.65);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.04);
    padding: 12px;
    margin: 4px 0px;
}

/* Section Headers (Chip Style) */
QLabel#sectionHeader {
    background: rgba(125,211,252,0.08);
    border: 2px solid rgba(125,211,252,0.12);
    padding: 8px 12px;
    border-radius: 8px;
    color: #7DD3FC;
    margin: 0px 10px;
}

/* Value Cards */
QFrame#valueCard {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 6px;
    padding: 8px 10px;
    margin: 2px 0px;
}

QFrame#valueCard:hover {
    background: rgba(37,150,190,0.08);
    border-color: rgba(125,211,252,0.2);
}

/* Gradient Separator */
QFrame#gradientSeparator {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,
                stop:0 rgba(125,211,252,0),
                stop:0.5 rgba(125,211,252,0.3),
                stop:1 rgba(125,211,252,0));
    border: none;
}

/* Stats Grid Enhancement */
QWidget#statsGrid {
    background: rgba(18,20,24,0.5);
    border-radius: 8px;
    padding: 10px;
}

QLabel#statsHeader {
    color: #7DD3FC;
    font-weight: 700;
    font-size: 11px;
    padding: 6px;
}

QLabel#statsField {
    color: #A6B8C8;
    font-weight: 600;
    font-size: 10px;
}

QLabel#statsValue {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 12px;
}

/* Icon Button (Copy button in stats) */
QPushButton#iconButton {
    background: rgba(125,211,252,0.08);
    border: 1px solid rgba(125,211,252,0.15);
    border-radius: 6px;
    padding: 6px 10px;
    color: #7DD3FC;
    font-size: 14px;
}

QPushButton#iconButton:hover {
    background: rgba(125,211,252,0.15);
    border-color: rgba(125,211,252,0.3);
    color: #AEE9FF;
}

QPushButton#iconButton:pressed {
    background: rgba(125,211,252,0.25);
}

/* Results Widget Container with Gradient */
QWidget#resultsWidget {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1,
                stop:0 rgba(18,20,24,0.95),
                stop:1 rgba(12,14,18,0.95));
    border-left: 2px solid rgba(125,211,252,0.1);
    border-radius: 0px 10px 10px 0px;
}

/* ===== Collapsible Splitter Styles ===== */

/* Collapsible Splitter Handle */
QSplitter#collapsibleSplitter::handle:horizontal {
    background: rgba(255,255,255,0.02);
    width: 16px;
}

/* Collapse Toggle Button */
QPushButton#collapseToggle {
    background: rgba(125,211,252,0.15);
    border: 1px solid rgba(125,211,252,0.3);
    border-radius: 4px;
    padding: 8px 2px;
    color: #7DD3FC;
    font-size: 12px;
    min-width: 14px;
    max-width: 14px;
}

QPushButton#collapseToggle:hover {
    background: rgba(125,211,252,0.25);
    border-color: rgba(125,211,252,0.5);
    color: #AEE9FF;
}

QPushButton#collapseToggle:pressed {
    background: rgba(125,211,252,0.35);
}

/* ===== Detach/Attach Button Styles ===== */

/* Detach Button */
QPushButton#detachButton {
    background: rgba(125,211,252,0.08);
    border: 1px solid rgba(125,211,252,0.15);
    border-radius: 6px;
    padding: 4px 8px;
    color: #7DD3FC;
    font-size: 10px;
}

QPushButton#detachButton:hover {
    background: rgba(125,211,252,0.15);
    border-color: rgba(125,211,252,0.3);
    color: #AEE9FF;
}

QPushButton#detachButton:pressed {
    background: rgba(125,211,252,0.25);
}

/* Attach Button (in floating window) */
QPushButton#attachButton {
    background: rgba(125,211,252,0.08);
    border: 1px solid rgba(125,211,252,0.15);
    border-radius: 6px;
    padding: 6px 12px;
    color: #7DD3FC;
    font-size: 12px;
}

QPushButton#attachButton:hover {
    background: rgba(125,211,252,0.15);
    border-color: rgba(125,211,252,0.3);
    color: #AEE9FF;
}

/* Detached Map Window */
QMainWindow#detachedMapWindow {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1,
                stop:0 #07080a, stop:0.5 #08101a, stop:1 #05060a);
}

/* ===== Base Hover Overlay Styles ===== */

/* Hover Overlay Container */
QFrame#hoverOverlayContainer {
    background: rgba(18,20,24,0.95);
    border: 1px solid rgba(125,211,252,0.3);
    border-radius: 8px;
}

/* Hover Overlay Guild Label */
QLabel#hoverGuildLabel {
    color: #7DD3FC;
    font-weight: bold;
}

/* Hover Overlay Detail Labels */
QLabel#hoverDetailLabel {
    color: #a0aec0;
}

/* ===== Search Panel Styling ===== */

/* Search input styling */
QLineEdit#searchInput {
    background-color: rgba(18,20,24,0.65);
    color: #dfeefc;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 13px;
}

QLineEdit#searchInput:focus {
    border: 1px solid rgba(125,211,252,0.5);
    background-color: rgba(18,20,24,0.85);
}

/* Search tree widget styling */
QTreeWidget#searchTree {
    background-color: rgba(18,20,24,0.65);
    color: #dfeefc;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    alternate-background-color: rgba(255,255,255,0.02);
}

QTreeWidget#searchTree::item {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    color: #dfeefc;
}

QTreeWidget#searchTree::item:selected {
    background-color: rgba(125,211,252,0.2);
    color: #7DD3FC;
}

QTreeWidget#searchTree::item:hover {
    background-color: rgba(37,150,190,0.12);
}

QTreeWidget#searchTree QHeaderView::section {
    background-color: rgba(30,33,40,0.9);
    color: #7DD3FC;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    font-weight: bold;
}

QTreeWidget#searchTree QHeaderView::section:hover {
    background-color: rgba(37,99,235,0.25);
    color: #AEE9FF;
}

/* ===== Loading Window Styles ===== */

/* Main container (glass panel) */
QFrame#mainContainer {
    background: rgba(18,20,24,0.95);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.08);
}

/* Close button */
QPushButton#closeBtn {
    background: transparent;
    color: #dfeefc;
    font-size: 20px;
    font-weight: bold;
    border: none;
    margin-top: 10px;
    margin-right: 10px;
}

QPushButton#closeBtn:hover {
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}

/* Loading text label */
QLabel#loadingLabel {
    color: #dfeefc;
    font-family: 'Segoe UI';
    font-size: 15px;
    font-weight: 700;
    background: transparent;
    border: none;
}

/* Icon label */
QLabel#iconLabel {
    background: transparent;
    border: none;
}

/* Loading progress bar */
QProgressBar#loadingProgress {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    background: rgba(18,20,24,0.95);
    color: #dfeefc;
    height: 8px;
}

QProgressBar#loadingProgress::chunk {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #7DD3FC, stop:1 #A78BFA);
    border-radius: 4px;
}

/* Timer label */
QLabel#timerLabel {
    color: #7DD3FC;
    font-family: 'Consolas';
    font-size: 18px;
    font-weight: bold;
    background: transparent;
    border: none;
}

/* ===== Detached Console Window Styles ===== */

/* Console close button */
QPushButton#consoleCloseBtn {
    background: transparent;
    color: #dfeefc;
    font-size: 16px;
    font-weight: bold;
    border: none;
    padding: 5px;
}

QPushButton#consoleCloseBtn:hover {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: #ffffff;
}

/* Console text edit */
QTextEdit#consoleTextEdit {
    background: rgba(18,20,24,0.95);
    color: #dfeefc;
    border: 2px solid rgba(125,211,252,0.3);
    border-radius: 6px;
    padding: 8px;
    selection-background-color: rgba(125,211,252,0.3);
}

/* ===== Unified Scrollbars ===== */
QScrollBar:vertical, QScrollBar:horizontal {
    background: rgba(255,255,255,0.02);
    width: 12px;
    height: 12px;
    border-radius: 6px;
    margin: 0px;
}
QScrollBar::handle:vertical, QScrollBar::handle:horizontal {
    background: rgba(125,211,252,0.2);
    min-height: 30px;
    min-width: 30px;
    border-radius: 6px;
}
QScrollBar::handle:vertical:hover, QScrollBar::handle:horizontal:hover {
    background: rgba(125,211,252,0.35);
}
QScrollBar::add-line:vertical, QScrollBar::add-line:horizontal,
QScrollBar::sub-line:vertical, QScrollBar::sub-line:horizontal {
    height: 0px;
    width: 0px;
    background: none;
    border: none;
}
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical,
QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal {
    background: none;
}

/* ===== Edit Pals Frameless Dialog Styles ===== */

/* Dialog container */
QWidget#editPalsContainer {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1,
                stop:0 rgba(12,14,18,0.98), stop:0.5 rgba(10,16,22,0.98), stop:1 rgba(8,12,18,0.98));
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 12px;
}

/* Title bar */
QWidget#editPalsTitleBar {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,
                stop:0 rgba(125,211,252,0.08), stop:1 rgba(167,139,250,0.08));
    border: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

QLabel#titleBarIcon {
    font-size: 20px;
    padding: 0px 4px;
}

QLabel#titleBarTitle {
    font-size: 14px;
    font-weight: 700;
    color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0,
                stop:0 #7DD3FC, stop:1 #A78BFA);
    padding: 0px 8px;
}

QPushButton#titleBarMinimize, QPushButton#titleBarMaximize {
    background: transparent;
    border: none;
    color: #A6B8C8;
    font-size: 16px;
    font-weight: bold;
    border-radius: 4px;
}

QPushButton#titleBarMinimize:hover, QPushButton#titleBarMaximize:hover {
    background: rgba(255,255,255,0.1);
    color: #FFFFFF;
}

QPushButton#titleBarClose {
    background: transparent;
    border: none;
    color: #FB7185;
    font-size: 20px;
    font-weight: bold;
    border-radius: 4px;
}

QPushButton#titleBarClose:hover {
    background: rgba(251,113,133,0.2);
    color: #FFFFFF;
}

/* Content area */
QWidget#editPalsContent {
    background: transparent;
}

/* Section headers in edit pals */
QLabel#editPalsSection {
    background: rgba(125,211,252,0.08);
    border: 1px solid rgba(125,211,252,0.15);
    border-radius: 8px;
    padding: 8px 16px;
    color: #7DD3FC;
    font-weight: 700;
    font-size: 12px;
}

/* Pal card widgets */
QFrame#palCard {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px;
}

QFrame#palCard:hover {
    background: rgba(125,211,252,0.08);
    border-color: rgba(125,211,252,0.2);
}

QFrame#palCard[selected="true"] {
    background: rgba(125,211,252,0.15);
    border-color: rgba(125,211,252,0.4);
}

/* Skill badges */
QLabel#skillBadge {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 4px;
    padding: 3px 8px;
    color: #22C55E;
    font-size: 10px;
}

QLabel#skillBadge:hover {
    background: rgba(34,197,94,0.25);
}

/* Stats display */
QLabel#statsValue {
    color: #FFFFFF;
    font-weight: 700;
}

QLabel#statsLabel {
    color: #A6B8C8;
    font-size: 11px;
}

/* Spin boxes */
QSpinBox#editPalsSpin {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px;
    color: #dfeefc;
}

QSpinBox#editPalsSpin:focus {
    border-color: rgba(125,211,252,0.3);
}

/* Combo boxes */
QComboBox#editPalsCombo {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px 8px;
    color: #dfeefc;
}

QComboBox#editPalsCombo:hover {
    border-color: rgba(125,211,252,0.2);
}

QComboBox#editPalsCombo::drop-down {
    border: none;
    padding-right: 20px;
}

/* Action buttons */
QPushButton#editPalsActionButton {
    background: rgba(125,211,252,0.12);
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 8px 16px;
    color: #7DD3FC;
    font-weight: 600;
    font-size: 11px;
}

QPushButton#editPalsActionButton:hover {
    background: rgba(125,211,252,0.2);
    border-color: rgba(125,211,252,0.4);
    color: #FFFFFF;
}

QPushButton#editPalsActionButton:pressed {
    background: rgba(125,211,252,0.3);
}

/* Danger button */
QPushButton#editPalsDangerButton {
    background: rgba(251,113,133,0.12);
    border: 1px solid rgba(251,113,133,0.2);
    border-radius: 6px;
    padding: 8px 16px;
    color: #FB7185;
    font-weight: 600;
    font-size: 11px;
}

QPushButton#editPalsDangerButton:hover {
    background: rgba(251,113,133,0.2);
    border-color: rgba(251,113,133,0.4);
    color: #FFFFFF;
}

/* Success button */
QPushButton#editPalsSuccessButton {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.2);
    border-radius: 6px;
    padding: 8px 16px;
    color: #22C55E;
    font-weight: 600;
    font-size: 11px;
}

QPushButton#editPalsSuccessButton:hover {
    background: rgba(34,197,94,0.2);
    border-color: rgba(34,197,94,0.4);
    color: #FFFFFF;
}

/* Group boxes */
QGroupBox#editPalsGroup {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    margin-top: 8px;
    padding: 12px;
    font-size: 11px;
    color: #A6B8C8;
}

QGroupBox#editPalsGroup::title {
    subcontrol-origin: margin;
    subcontrol-position: top left;
    padding: 2px 8px;
    color: #7DD3FC;
    font-weight: 600;
}

/* Frame containers for talents/souls sections */
QFrame#editPalsFrame {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px;
}

/* Scroll areas */
QScrollArea#editPalsScroll {
    background: transparent;
    border: none;
}

QScrollArea#editPalsScroll > QWidget > QWidget {
    background: transparent;
}

/* Pal selector widget */
QFrame#palSelectorWidget {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
}

QFrame#palSelectorWidget:hover {
    border-color: rgba(125,211,252,0.2);
}

QFrame#palSelectorWidget[selected="true"] {
    background: rgba(125,211,252,0.12);
    border-color: rgba(125,211,252,0.4);
}

/* Enhanced tab styling for Edit Pals */
QTabWidget#editPalsTab::pane {
    background: rgba(18,20,24,0.85);
    border: 1px solid rgba(125,211,252,0.1);
    border-radius: 10px;
    padding: 12px;
    margin-top: -1px;
}

/* Context menu for edit pals */
QMenu#editPalsContextMenu {
    background: rgba(12,14,18,0.98);
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 8px;
    padding: 4px;
}

QMenu#editPalsContextMenu::item {
    padding: 8px 20px;
    border-radius: 4px;
    color: #E6EEF6;
}

QMenu#editPalsContextMenu::item:selected {
    background: rgba(125,211,252,0.15);
    color: #FFFFFF;
}

QMenu#editPalsContextMenu::separator {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 4px 10px;
}

/* ===== Edit Pals Tab Widget Styles ===== */

QTabWidget#editPalsTab::pane {
    background: rgba(18,20,24,0.85);
    border: 1px solid rgba(125,211,252,0.1);
    border-radius: 10px;
    padding: 12px;
    margin-top: -1px;
}

QTabWidget#editPalsTab::tab-bar {
    left: 10px;
}

QTabWidget#editPalsTab QTabBar::tab {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    padding: 10px 20px;
    color: #A6B8C8;
    font-weight: 600;
    font-size: 12px;
    margin-right: 4px;
}

QTabWidget#editPalsTab QTabBar::tab:hover {
    background: rgba(125,211,252,0.08);
    color: #7DD3FC;
}

QTabWidget#editPalsTab QTabBar::tab:selected {
    background: rgba(125,211,252,0.15);
    border: 1px solid rgba(125,211,252,0.3);
    border-bottom: none;
    color: #7DD3FC;
}

/* Save and Cancel tabs special styling */
QTabWidget#editPalsTab QTabBar::tab:last {
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.25);
    color: #22C55E;
}

QTabWidget#editPalsTab QTabBar::tab:last:hover {
    background: rgba(34,197,94,0.2);
}

QTabWidget#editPalsTab QTabBar::tab:nth-of-type(5) {
    background: rgba(251,113,133,0.12);
    border-color: rgba(251,113,133,0.25);
    color: #FB7185;
}

QTabWidget#editPalsTab QTabBar::tab:nth-of-type(5):hover {
    background: rgba(251,113,133,0.2);
}

/* ===== Section Labels ===== */

QLabel#sectionLabel {
    color: #7DD3FC;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 0px;
}

/* ===== Slot Count Label ===== */

QLabel#slotCountLabel {
    color: #A6B8C8;
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
}

QLabel#slotCountLabel[warning="true"] {
    color: #FB7185;
    font-weight: bold;
}

/* ===== Pal Name Label ===== */

QLabel#palNameLabel {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 14px;
}

/* ===== Stats Display Label ===== */

QLabel#statsDisplay {
    color: #dfeefc;
    font-size: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    padding: 8px 12px;
    line-height: 1.4;
}

/* ===== Gender Icon Label ===== */

QLabel#genderIconLabel {
    font-size: 16px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
}

/* ===== Skill Buttons ===== */

QPushButton#skillButton {
    text-align: left;
    padding: 6px 10px;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    color: #dfeefc;
    font-size: 11px;
    font-weight: 500;
    min-width: 150px;
}

QPushButton#skillButton:hover {
    background: rgba(125,211,252,0.12);
    border-color: rgba(125,211,252,0.3);
    color: #7DD3FC;
}

QPushButton#skillButton:pressed {
    background: rgba(125,211,252,0.2);
}

/* ===== Star Buttons ===== */

QPushButton#starButton {
    font-size: 16px;
    color: #FFD700;
    border: none;
    background: transparent;
    padding: 0px;
    min-width: 24px;
    max-width: 24px;
    border-radius: 4px;
}

QPushButton#starButton:hover {
    background: rgba(255,215,0,0.15);
    color: #FFA500;
}

QPushButton#starButton:pressed {
    background: rgba(255,215,0,0.25);
}

/* ===== Pal Icon ===== */

QFrame#palIcon {
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 40px;
    background-color: rgba(30,35,45,0.8);
}

QFrame#palIcon:hover {
    border: 2px solid #7DD3FC;
    background-color: rgba(40,45,55,0.9);
}

/* ===== Pal Card (Enhanced) ===== */

QFrame#palCard {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 8px;
}

QFrame#palCard:hover {
    background: rgba(125,211,252,0.08);
    border-color: rgba(125,211,252,0.2);
}

QFrame#palCard[selected="true"] {
    background: rgba(125,211,252,0.15);
    border-color: rgba(125,211,252,0.4);
}

/* ===== Skills Scroll Area ===== */

QScrollArea#skillsScrollArea {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 6px;
}

QScrollArea#skillsScrollArea > QWidget > QWidget {
    background: transparent;
}

/* ===== Pal Container ===== */

QWidget#palContainer {
    background: transparent;
}

/* ===== Combo Box Drop-down Items ===== */

QComboBox#editPalsCombo QAbstractItemView {
    background: rgba(18,20,24,0.98);
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 6px;
    padding: 4px;
    selection-background-color: rgba(125,211,252,0.2);
    selection-color: #FFFFFF;
    color: #dfeefc;
}

QComboBox#editPalsCombo QAbstractItemView::item {
    padding: 6px 12px;
    border-radius: 4px;
    min-height: 24px;
}

QComboBox#editPalsCombo QAbstractItemView::item:hover {
    background: rgba(125,211,252,0.15);
}

QComboBox#editPalsCombo QAbstractItemView::item:selected {
    background: rgba(125,211,252,0.25);
    color: #7DD3FC;
}

/* ===== Spin Box Enhancements ===== */

QSpinBox#editPalsSpin::up-button,
QSpinBox#editPalsSpin::down-button {
    background: rgba(255,255,255,0.05);
    border: none;
    width: 20px;
    border-radius: 3px;
}

QSpinBox#editPalsSpin::up-button:hover,
QSpinBox#editPalsSpin::down-button:hover {
    background: rgba(125,211,252,0.15);
}

QSpinBox#editPalsSpin::up-arrow {
    image: none;
    border: 5px solid transparent;
    border-bottom: 5px solid #7DD3FC;
    margin: 1px;
}

QSpinBox#editPalsSpin::down-arrow {
    image: none;
    border: 5px solid transparent;
    border-top: 5px solid #7DD3FC;
    margin: 1px;
}

/* ===== List Widget for Skill Select Dialog ===== */

QListWidget {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    color: #dfeefc;
    font-size: 12px;
    padding: 4px;
}

QListWidget::item {
    padding: 8px 12px;
    border-radius: 4px;
    margin: 2px;
}

QListWidget::item:hover {
    background: rgba(125,211,252,0.12);
}

QListWidget::item:selected {
    background: rgba(125,211,252,0.2);
    color: #7DD3FC;
}

QListWidget::item:selected:!active {
    background: rgba(125,211,252,0.15);
}

/* ===== Dialog Enhancement for Skill Select ===== */

QDialog[dialogType="skillSelect"] {
    background: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1,
                stop:0 rgba(12,14,18,0.98), stop:1 rgba(8,12,18,0.98));
    border: 1px solid rgba(125,211,252,0.2);
    border-radius: 12px;
}



/* Dashboard Save Card */
QFrame#saveCard {
    background: rgba(18,20,24,0.95);
    border: 1px solid rgba(125,211,252,0.12);
    border-radius: 12px;
}

/* ===== Global Tree/Table Scrollbars ===== */


