/* Modern Dark Theme for HLstatsX:CE */
/* Built with Bootstrap 5 */

:root {
  --primary-color: #1a1f2e;
  --secondary-color: #151a26;
  --accent-color: #4a9eff;
  --success-color: #00d68f;
  --warning-color: #ffaa00;
  --danger-color: #ff3d71;
  --light-color: #f7f9fc;
  --dark-color: #101426;
  --body-bg: #0f1419;
  --content-bg: #1a1f2e;
  --text-color: #e4e6eb;
  --border-radius: 12px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  --transition: all 0.3s ease;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-color);
  background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
  min-height: 100vh;
  padding: 20px 0;
}

/* Main Container */
.container-fluid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header Block */
.block {
  background: transparent;
  margin-bottom: 20px;
}

.headerblock {
  background: var(--content-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.title {
  flex: 1;
}

.title h1 {
  color: var(--accent-color) !important;
}

.title img {
  max-height: 60px;
  width: auto;
  filter: brightness(0.9);
}

/* Header Tabs Navigation */
.headertabs {
  margin-left: auto;
}

.headertabs ul {
  list-style: none;
  display: flex;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.headertabs li {
  margin: 0;
}

.headertabs a {
  display: inline-block;
  padding: 10px 18px;
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent-color);
  text-decoration: none;
  border: 1px solid var(--accent-color);
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

.headertabs a:hover {
  background: var(--accent-color);
  color: var(--dark-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

.headertabs img {
  display: none;
}

.headertabs a::after {
  content: attr(alt);
}

/* Games List */
.header_gameslist {
  position: relative;
  float: none;
  margin-top: 15px;
  width: 100%;
}

#header_gameslist {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

#header_gameslist li {
  margin: 0;
  padding: 0;
}

#header_gameslist img {
  border-radius: 8px;
  transition: var(--transition);
  border: 2px solid transparent;
}

#header_gameslist img:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
  border-color: var(--accent-color);
}

/* Location/Breadcrumb */
.location {
  background: var(--content-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 12px 20px;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location ul {
  list-style: none;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.location li {
  display: flex;
  align-items: center;
  margin-right: 5px;
  color: var(--text-color);
}

.location .arrow {
  color: var(--accent-color);
  margin: 0 8px;
  font-weight: bold;
}

.location a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition);
}

.location a:hover {
  color: #6fb3ff;
  text-decoration: underline;
}

.location strong {
  color: var(--text-color);
}

/* Main Navigation */
nav {
  background: var(--content-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 15px;
  box-shadow: var(--box-shadow);
  margin-bottom: 20px;
}

.fancyNav {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.fancyNav li {
  margin: 0;
  background: none;
  border: none;
  box-shadow: none;
  position: relative;
}

.fancyNav li:after {
  display: none;
}

.fancyNav a {
  display: inline-block;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.1), rgba(74, 158, 255, 0.2));
  color: var(--accent-color) !important;
  text-decoration: none;
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  font-weight: 500;
  transition: var(--transition);
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
}

.fancyNav a:hover,
.fancyNav li.selected a {
  background: var(--accent-color);
  color: var(--dark-color) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
  border-color: var(--accent-color);
}

/* Content Area */
.content {
  background: var(--content-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 30px;
  box-shadow: var(--box-shadow);
  min-height: 400px;
}

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 20px 0;
  background: rgba(16, 20, 38, 0.5);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  border: 1px solid rgba(255,255,255,0.1);
}

th {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(74, 158, 255, 0.1));
  color: var(--accent-color);
  padding: 12px 15px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(74, 158, 255, 0.3);
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
  color: var(--text-color);
}

tr:hover td {
  background: rgba(74, 158, 255, 0.05);
}

tr:last-child td {
  border-bottom: none;
}

/* Data tables specific */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
  background: rgba(16, 20, 38, 0.5);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  border: 1px solid rgba(255,255,255,0.1);
}

.data-table-head td {
  background: linear-gradient(135deg, rgba(74, 158, 255, 0.2), rgba(74, 158, 255, 0.1));
  color: var(--accent-color) !important;
  padding: 12px 15px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  border-bottom: 2px solid rgba(74, 158, 255, 0.3);
}

.data-table-head a {
  color: var(--accent-color) !important;
  text-decoration: none;
}

.data-table-head a:hover {
  color: #6fb3ff !important;
  text-decoration: underline;
}

/* Alternating rows */
.bg1 { background: rgba(16, 20, 38, 0.3); }
.bg2 { background: rgba(16, 20, 38, 0.6); }

.fSmall, .fNormal {
  background: transparent !important;
  color: var(--text-color);
}

/* Links in tables */
table a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
}

table a:hover {
  color: #6fb3ff;
  text-decoration: underline;
}

/* Forms and Inputs */
input[type="text"],
input[type="password"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  font-size: 14px;
  transition: var(--transition);
  background: rgba(16, 20, 38, 0.5);
  color: var(--text-color);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.2);
  background: rgba(16, 20, 38, 0.8);
}

input[type="submit"],
button,
.btn {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent-color);
  color: var(--dark-color);
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

input[type="submit"]:hover,
button:hover,
.btn:hover {
  background: #6fb3ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
}

/* Style selector */
#style_selection {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-color);
}

#style_selection select {
  width: auto;
  padding: 6px 30px 6px 12px;
  border: 2px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  background: rgba(16, 20, 38, 0.5);
  color: var(--text-color);
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234a9eff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 20px;
}

#style_selection select option {
  background: var(--content-bg);
  color: var(--text-color);
}

/* Footer */
#footer {
  text-align: center;
  padding: 30px 0;
  margin-top: 40px;
}

#footer img {
  opacity: 0.6;
  transition: var(--transition);
  filter: brightness(0.8);
}

#footer img:hover {
  opacity: 1;
  transform: scale(1.05);
  filter: brightness(1);
}

.fSmall {
  font-size: 12px;
  color: rgba(228, 230, 235, 0.7);
  text-align: center;
}

.fSmall a {
  color: var(--accent-color);
  text-decoration: none;
}

.fSmall a:hover {
  color: #6fb3ff;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .headerblock {
    flex-direction: column;
    text-align: center;
  }
  
  .headertabs {
    margin: 20px 0 0 0;
  }
  
  .location {
    flex-direction: column;
    gap: 10px;
  }
  
  .fancyNav {
    flex-direction: column;
    align-items: stretch;
  }
  
  .fancyNav a {
    text-align: center;
  }
  
  .content {
    padding: 20px 15px;
  }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 8px 10px;
  }
}

/* Progress bars / Meters */
meter {
  width: 100%;
  height: 20px;
  border-radius: 10px;
  background: rgba(16, 20, 38, 0.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
}

meter::-webkit-meter-bar {
  background: rgba(16, 20, 38, 0.5);
  border-radius: 10px;
}

meter::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, var(--success-color), #00b874);
  border-radius: 10px;
}

meter::-webkit-meter-suboptimum-value {
  background: linear-gradient(90deg, var(--warning-color), #ff8800);
  border-radius: 10px;
}

meter::-webkit-meter-even-less-good-value {
  background: linear-gradient(90deg, var(--danger-color), #ff1744);
  border-radius: 10px;
}

/* Card-like blocks */
.subblock {
  background: rgba(16, 20, 38, 0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 20px 0;
  box-shadow: var(--box-shadow);
}

/* Section headings */
.fHeading {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-color);
  margin-bottom: 20px;
  display: block;
  border-bottom: 3px solid rgba(74, 158, 255, 0.3);
  padding-bottom: 10px;
}

.fHeading img {
  display: none;
}

/* Tooltips and info boxes */
.tooltip-inner {
  background: var(--dark-color);
  color: var(--text-color);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,0.1);
}

/* Loading spinner */
.spinner {
  border: 3px solid rgba(74, 158, 255, 0.1);
  border-top: 3px solid var(--accent-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

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

/* Alert boxes */
.alert {
  padding: 15px 20px;
  border-radius: var(--border-radius);
  margin: 20px 0;
  border: 1px solid;
}

.alert-info {
  background: rgba(74, 158, 255, 0.1);
  color: var(--accent-color);
  border-color: rgba(74, 158, 255, 0.3);
}

.alert-success {
  background: rgba(0, 214, 143, 0.1);
  color: var(--success-color);
  border-color: rgba(0, 214, 143, 0.3);
}

.alert-warning {
  background: rgba(255, 170, 0, 0.1);
  color: var(--warning-color);
  border-color: rgba(255, 170, 0, 0.3);
}

.alert-danger {
  background: rgba(255, 61, 113, 0.1);
  color: var(--danger-color);
  border-color: rgba(255, 61, 113, 0.3);
}

/* Player/Clan info cards */
.player-card,
.clan-card {
  background: rgba(16, 20, 38, 0.5);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: var(--box-shadow);
  margin: 20px 0;
}

.player-card h2,
.clan-card h2 {
  color: var(--accent-color);
  border-bottom: 2px solid rgba(74, 158, 255, 0.3);
  padding-bottom: 10px;
  margin-bottom: 20px;
}

/* Status indicators */
.status-online {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: var(--success-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 10px var(--success-color);
}

.status-offline {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #4a5568;
  border-radius: 50%;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 214, 143, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 214, 143, 0);
  }
}

/* Weapon/Award images */
.weapon-icon,
.award-icon {
  border-radius: 8px;
  transition: var(--transition);
  border: 2px solid transparent;
}

.weapon-icon:hover,
.award-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(74, 158, 255, 0.4);
  border-color: var(--accent-color);
}

/* Search box */
.search-box {
  position: relative;
  max-width: 400px;
  margin: 20px auto;
}

.search-box input {
  padding-right: 40px;
  background: rgba(16, 20, 38, 0.5);
  color: var(--text-color);
  border: 2px solid rgba(74, 158, 255, 0.3);
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--accent-color);
  padding: 5px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-block;
  padding: 8px 12px;
  background: rgba(16, 20, 38, 0.5);
  color: var(--text-color);
  border: 1px solid rgba(74, 158, 255, 0.3);
  border-radius: 8px;
  text-decoration: none;
  transition: var(--transition);
}

.pagination a:hover {
  background: var(--accent-color);
  color: var(--dark-color);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

.pagination .current {
  background: var(--accent-color);
  color: var(--dark-color);
  border-color: var(--accent-color);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid rgba(74, 158, 255, 0.3);
  margin-bottom: 20px;
}

.tabs a {
  padding: 10px 20px;
  color: var(--text-color);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.tabs a:hover {
  color: var(--accent-color);
}

.tabs a.active {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* Kill/Death ratio bars */
.kd-bar {
  display: flex;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(16, 20, 38, 0.5);
  margin: 5px 0;
  border: 1px solid rgba(255,255,255,0.1);
}

.kd-bar .kills {
  background: linear-gradient(90deg, var(--success-color), #00b874);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--dark-color);
  font-size: 12px;
  font-weight: bold;
}

.kd-bar .deaths {
  background: linear-gradient(90deg, var(--danger-color), #ff1744);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 12px;
  font-weight: bold;
}

/* Additional dark mode specific styles */
a {
  color: var(--accent-color);
}

a:hover {
  color: #6fb3ff;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-color);
}

/* Warning box for dark mode */
.warning {
  background: rgba(255, 61, 113, 0.1);
  border: 2px solid var(--danger-color);
  padding: 1em;
  border-radius: var(--border-radius);
  color: var(--text-color);
}

.warning .warning-heading {
  font-size: 2em;
  color: var(--danger-color);
}

.warning .warning-text {
  font-size: 1em;
  color: var(--text-color);
}