* {
  font-family: Arial, Verdana, sans-serif;
  font-size: 14px;
  line-height: 19px;
  color: #e1f2f5;
  font-weight: 400;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #303030;
  overflow-x: hidden;
}

.container {
  display: flex;
  height: 100vh;
}

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

/* Header */
.header {
  background: #252525;
  padding: 15px 20px;
  border-bottom: 1px solid #404040;
}

.header-title {
  font-size: 18px;
  margin: 0 0 5px 0;
}

.header-subtitle {
  color: #8899a6;
  font-size: 12px;
}

.header-info {
  float: right;
  text-align: right;
}

.header-info a {
  color: #368bd6;
  text-decoration: none;
}

.header-info a:hover {
  text-decoration: underline;
}

/* Controls */
.controls {
  background: #2a2a2a;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid #404040;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 5px;
}

select,
input[type="text"],
input[type="file"] {
  background: #404040;
  border: 1px solid #505050;
  color: #e1f2f5;
  padding: 8px 12px;
  border-radius: 4px;
  min-width: 150px;
}

select:focus,
input:focus {
  outline: none;
  border-color: #368bd6;
}

.btn {
  background: #368bd6;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.btn:hover {
  background: #4a9be8;
}

/* Content Area */
.content-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  padding: 20px;
  gap: 20px;
}

/* Meter Panels */
.meter-panel {
  flex: 1;
  background: #252525;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.meter-header {
  background: #2a2a2a;
  padding: 10px 15px;
  border-bottom: 1px solid #404040;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.meter-header select {
  min-width: 160px;
  padding: 5px 10px;
}

.meter-total {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
}

.meter-list {
  flex: 1;
  overflow-y: auto;
  padding: 5px;
}

/* Player Row */
.player-row {
  display: flex;
  align-items: center;
  padding: 6px 10px;
  margin: 2px 0;
  position: relative;
  border-radius: 3px;
  cursor: pointer;
}

.player-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

.player-row .bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  opacity: 0.6;
  z-index: 0;
}

.player-row .content {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  align-items: center;
}

.player-rank {
  width: 25px;
  color: #8899a6;
}

.player-class-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 3px;
  background: #404040;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
}

.player-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-stats {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.player-percent {
  width: 50px;
  text-align: right;
  color: #8899a6;
}

/* Class Colors */
.class-WARRIOR {
  color: #c79c6e;
}
.class-PALADIN {
  color: #f58cba;
}
.class-HUNTER {
  color: #abd473;
}
.class-ROGUE {
  color: #fff569;
}
.class-PRIEST {
  color: #ffffff;
}
.class-SHAMAN {
  color: #0070de;
}
.class-MAGE {
  color: #69ccf0;
}
.class-WARLOCK {
  color: #9482c9;
}
.class-DRUID {
  color: #ff7d0a;
}

.bar-WARRIOR {
  background-color: #c79c6e;
}
.bar-PALADIN {
  background-color: #f58cba;
}
.bar-HUNTER {
  background-color: #abd473;
}
.bar-ROGUE {
  background-color: #fff569;
}
.bar-PRIEST {
  background-color: #ffffff;
}
.bar-SHAMAN {
  background-color: #0070de;
}
.bar-MAGE {
  background-color: #69ccf0;
}
.bar-WARLOCK {
  background-color: #9482c9;
}
.bar-DRUID {
  background-color: #ff7d0a;
}
.bar-UNKNOWN {
  background-color: #808080;
}

/* Special bars for utility meters */
.bar-dispel {
  background-color: #00d1ff;
}
.bar-death {
  background-color: #ff4444;
}
.bar-resurrect {
  background-color: #85ff85;
}
.bar-interrupt {
  background-color: #ff9933;
}
.bar-absorb {
  background-color: #ffcc00;
}

/* Item quality colors */
.item-poor {
  color: #9d9d9d;
}
.item-common {
  color: #ffffff;
}
.item-uncommon {
  color: #1eff00;
}
.item-rare {
  color: #0070dd;
}
.item-epic {
  color: #a335ee;
}
.item-legendary {
  color: #ff8000;
}

/* Loot panel styles */
.loot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 15px;
  background: #2a2a2a;
  border-bottom: 1px solid #404040;
}

.loot-header h3 {
  margin: 0;
  font-size: 16px;
}

.loot-search {
  flex: 1;
  max-width: 300px;
}

.loot-btn {
  background: #404040;
  border: none;
  color: #e1f2f5;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.loot-btn:hover {
  background: #505050;
}

.loot-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.loot-boss-section {
  margin-bottom: 10px;
}

.loot-boss-header {
  background: #1a1a1a;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.loot-boss-header:hover {
  background: #222222;
}

.loot-boss-arrow {
  transition: transform 0.2s;
  color: #8899a6;
}

.loot-boss-header.collapsed .loot-boss-arrow {
  transform: rotate(-90deg);
}

.loot-boss-name {
  font-weight: bold;
  color: #ffcc00;
}

.loot-boss-count {
  color: #8899a6;
  font-size: 12px;
}

.loot-items {
  margin-top: 5px;
}

.loot-boss-header.collapsed + .loot-items {
  display: none;
}

.loot-item {
  background: #252525;
  padding: 10px 15px;
  margin: 3px 0;
  border-radius: 4px;
  border-left: 3px solid #404040;
}

.loot-item.item-epic {
  border-left-color: #a335ee;
}

.loot-item.item-rare {
  border-left-color: #0070dd;
}

.loot-item.item-uncommon {
  border-left-color: #1eff00;
}

.loot-item.item-legendary {
  border-left-color: #ff8000;
}

.loot-item-name {
  font-weight: bold;
  margin-bottom: 3px;
}

.loot-item-player {
  color: #8899a6;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.loot-traded-tag {
  background: #ff6b6b;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
}

.loot-empty {
  padding: 40px 20px;
  text-align: center;
  color: #8899a6;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed #505050;
  border-radius: 8px;
  padding: 60px 20px;
  text-align: center;
  margin: 20px;
  transition: all 0.2s;
  flex: 1;
}

.drop-zone.dragover {
  border-color: #368bd6;
  background: rgba(54, 139, 214, 0.1);
}

.drop-zone h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

.drop-zone p {
  color: #8899a6;
  margin-bottom: 20px;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 5px;
  padding: 10px 20px 0;
  background: #252525;
}

.tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  color: #8899a6;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tab:hover {
  color: #e1f2f5;
}

.tab.active {
  color: #e1f2f5;
  border-bottom-color: #368bd6;
}

/* Log View */
.log-view {
  flex: 1;
  background: #252525;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.log-header {
  padding: 10px;
  border-bottom: 1px solid #333;
  display: flex;
  gap: 10px;
  align-items: center;
}

.log-header select {
  background: #1a1a1a;
  color: #ccc;
  border: 1px solid #444;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 13px;
  min-width: 150px;
}

.log-entries {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  font-family: monospace;
  font-size: 12px;
  line-height: 18px;
}

.log-entry {
  padding: 2px 5px;
  border-radius: 2px;
}

.log-entry:hover {
  background: rgba(255, 255, 255, 0.05);
}

.log-timestamp {
  color: #666;
  margin-right: 10px;
}

.log-damage {
  color: #ff6b6b;
}
.log-heal {
  color: #85ff85;
}
.log-cast {
  color: #69ccf0;
}
.log-death {
  color: #ff4444;
  font-weight: bold;
}
.log-dispel {
  color: #00d1ff;
}
.log-resurrect {
  color: #f58cba;
}
.log-interrupt {
  color: #ff9933;
}
.log-absorb {
  color: #ffcc00;
}

/* Hidden */
.hidden {
  display: none !important;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #252525;
}

::-webkit-scrollbar-thumb {
  background: #505050;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #606060;
}

/* Encounter selector */
.encounter-selector {
  max-width: 300px;
}

.encounter-selector optgroup {
  background: #353535;
  color: #e1f2f5;
  font-weight: bold;
  padding: 4px 0;
}

.encounter-selector option {
  background: #404040;
  color: #e1f2f5;
  padding: 4px 8px;
}

.encounter-selector option:hover {
  background: #505050;
}

/* Encounter indicator */
.encounter-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #1a1a1a 0%, #252525 100%);
  border: 1px solid #404040;
  border-radius: 4px;
  font-size: 14px;
  color: #e1f2f5;
  white-space: nowrap;
}

.encounter-indicator .boss-name {
  color: #ffcc00;
  font-weight: 600;
}

.encounter-indicator .result-tag {
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.encounter-indicator .result-tag.kill {
  background: linear-gradient(135deg, #2d5a2d 0%, #1e3d1e 100%);
  color: #85ff85;
  border: 1px solid #3d7a3d;
}

.encounter-indicator .result-tag.wipe {
  background: linear-gradient(135deg, #5a2d2d 0%, #3d1e1e 100%);
  color: #ff8585;
  border: 1px solid #7a3d3d;
}

/* Detail modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: #303030;
  border-radius: 8px;
  max-width: 800px;
  max-height: 80vh;
  width: 90%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  background: #252525;
  padding: 15px 20px;
  border-bottom: 1px solid #404040;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  color: #8899a6;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #e1f2f5;
}

.modal-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.ability-row {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  margin: 2px 0;
  background: #252525;
  border-radius: 4px;
}

.ability-name {
  flex: 1;
}

.ability-stats {
  display: flex;
  gap: 20px;
}

.ability-stat {
  text-align: right;
  min-width: 80px;
}

.ability-stat-label {
  color: #8899a6;
  font-size: 11px;
}

/* Info note */
.info-note {
  background: #1a1a1a;
  border-left: 3px solid #368bd6;
  padding: 8px 12px;
  margin: 10px 0;
  font-size: 12px;
  color: #8899a6;
}

/* Opener sequence display */
.opener-section {
  background: linear-gradient(135deg, #1a2a1a 0%, #1a1a2a 100%);
  border: 1px solid #3a4a3a;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 15px;
}

.opener-header {
  color: #7fff7f;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.opener-sequence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.opener-spell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #252525;
  border: 1px solid #404040;
  border-radius: 4px;
  padding: 6px 10px;
  min-width: 80px;
}

.opener-spell.crit {
  border-color: #ff9933;
  background: linear-gradient(135deg, #2a2520 0%, #252525 100%);
}

.opener-index {
  background: #404040;
  color: #8899a6;
  font-size: 10px;
  font-weight: bold;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.opener-name {
  color: #e1f2f5;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  word-break: break-word;
}

.opener-amount {
  color: #8899a6;
  font-size: 11px;
  margin-top: 2px;
}

.opener-spell.crit .opener-amount {
  color: #ff9933;
}

.opener-delay {
  color: #6a7a8a;
  font-size: 10px;
  margin-top: 2px;
}

.opener-arrow {
  color: #4a5a6a;
  font-size: 14px;
  margin: 0 2px;
}

.breakdown-header {
  color: #8899a6;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #353535;
}

/* Session Selection Modal */
.session-modal {
  width: 500px;
  max-width: 90vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.session-loading {
  padding: 40px 20px;
  text-align: center;
  color: #8899a6;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #404040;
  border-top-color: #368bd6;
  border-radius: 50%;
  margin: 0 auto 15px;
  animation: spin 1s linear infinite;
}

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

.session-list {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-card {
  background: #252525;
  border: 2px solid #404040;
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.session-card:hover {
  border-color: #505050;
  background: #2a2a2a;
}

.session-card.selected {
  border-color: #368bd6;
  background: #1a2a3a;
}

.session-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.session-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #606060;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.session-card.selected .session-radio {
  border-color: #368bd6;
}

.session-card.selected .session-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  background: #368bd6;
  border-radius: 50%;
}

.session-name {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.session-type-badge {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.session-type-badge.raid {
  background: #6b21a8;
  color: #e9d5ff;
}

.session-type-badge.dungeon {
  background: #1e40af;
  color: #bfdbfe;
}

.session-type-badge.world {
  background: #404040;
  color: #a0a0a0;
}

.session-meta {
  color: #8899a6;
  font-size: 12px;
  margin-left: 28px;
  margin-bottom: 6px;
}

.session-bosses {
  margin-left: 28px;
  font-size: 12px;
  color: #6b8a6b;
}

.session-bosses .boss-kill {
  display: inline-block;
  margin-right: 8px;
}

.session-bosses .boss-kill::before {
  content: "\2713 ";
  color: #4ade80;
}

.session-modal-footer {
  padding: 15px;
  background: #252525;
  border-top: 1px solid #404040;
  display: flex;
  justify-content: flex-end;
}

.session-modal-footer .btn {
  padding: 10px 24px;
}

.session-modal-footer .btn:disabled {
  background: #404040;
  cursor: not-allowed;
}

.session-empty {
  text-align: center;
  padding: 40px 20px;
  color: #8899a6;
}

.session-empty h4 {
  margin: 0 0 10px 0;
  color: #e1f2f5;
}

/* Zip file selector */
.zip-file-header {
  color: #8899a6;
  font-size: 14px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #404040;
}
