/* -------------------------------------------------------------
 * ITSWIPETIME - PREMIUM GLOBAL CSS SYSTEM
 * Curated Dark & Rust Orange Theme
 * ------------------------------------------------------------- */

 :root {
  /* Iron Ore Dark Palette */
  --bg-primary: #0e0f11;
  --bg-secondary: #17191c;
  --bg-panel: rgba(23, 25, 28, 0.75);
  --bg-panel-hover: rgba(31, 34, 38, 0.85);
  --border-color: rgba(255, 255, 255, 0.04);
  --border-glow: rgba(255, 118, 0, 0.15);
  
  /* Text and Accents */
  --text-main: #f5f6f8;
  --text-muted: #8e9297;
  --text-dark: #53565a;
  
  /* Hazard Orange (Wipe Day Vibe) */
  --primary: #ff7600;
  --primary-hover: #ff9133;
  --primary-glow: rgba(255, 118, 0, 0.4);
  
  --secondary: #22252a;
  --secondary-hover: #2f333a;
  
  --green: #00e676;
  --red: #ff1744;
  --blue: #2979ff;
  
  --font-title: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.7);
}

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

/* Reset & Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Glowing Background Decorative Element */
.bg-glow {
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(circle, rgba(255, 118, 0, 0.08) 0%, rgba(255, 118, 0, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Header Styles */
header {
  background: linear-gradient(180deg, rgba(16, 16, 18, 0.9) 0%, rgba(16, 16, 18, 0) 100%);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1.2rem 2rem;
}

.header-container {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo-area {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  gap: 0.2rem;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-area:hover {
  transform: scale(1.025);
  opacity: 1;
}

/* Metallic text styles */
.metallic-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.8em;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  background: linear-gradient(180deg, 
    #ffffff 0%, 
    #f1f5f9 25%, 
    #cbd5e1 45%, 
    #94a3b8 55%, 
    #475569 80%, 
    #1e293b 100%
  );
  background-size: 100% 200%;
  background-position: top center;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.95)) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
  -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.3);
  transition: background-position 0.4s ease, filter 0.4s ease;
  line-height: 1;
}

.logo-area:hover .metallic-text {
  background-position: bottom center;
  filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.95)) drop-shadow(0 4px 12px rgba(255, 118, 0, 0.25));
}

.logo-its {
  padding-right: 0.05em;
}

/* Stopwatch & WIPE container */
.logo-stopwatch-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7em;
  height: 3em;
}

/* Stopwatch wrapper */
.logo-stopwatch-wrapper {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6em;
  height: 3.6em;
  background: radial-gradient(circle, rgba(255, 118, 0, 0.2) 0%, transparent 72%);
  z-index: 1;
  transition: transform 0.4s ease;
}

.logo-area:hover .logo-stopwatch-wrapper {
  transform: scale(1.05);
  background: radial-gradient(circle, rgba(255, 118, 0, 0.3) 0%, transparent 72%);
}

.logo-stopwatch-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 10px rgba(255, 118, 0, 0.5));
  transition: filter 0.4s ease;
}

.logo-area:hover .logo-stopwatch-svg {
  filter: drop-shadow(0 0 15px rgba(255, 118, 0, 0.85));
}

/* Glowing WIPE text */
.glowing-orange-text {
  position: relative;
  z-index: 2;
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.8em;
  letter-spacing: -0.5px;
  color: #ff7600;
  text-transform: uppercase;
  text-shadow: 
    0 0 12px rgba(255, 118, 0, 0.85),
    0 0 25px rgba(255, 118, 0, 0.4),
    0 2px 2px rgba(0, 0, 0, 0.9);
  transition: text-shadow 0.4s ease, transform 0.4s ease;
  line-height: 1;
}

.logo-area:hover .glowing-orange-text {
  text-shadow: 
    0 0 18px rgba(255, 118, 0, 1),
    0 0 35px rgba(255, 118, 0, 0.65),
    0 2px 3px rgba(0, 0, 0, 0.95);
  transform: scale(1.02);
}

/* Time & .com column */
.logo-time-column {
  display: flex;
  flex-direction: column;
  line-height: 1;
  align-items: flex-end;
  justify-content: center;
  height: 3em;
  margin-left: 0.05em;
}

.logo-time {
  /* Same metallic text styles */
}

.logo-com-text {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 0.58em;
  color: #ff7600;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  text-shadow: 0 0 8px rgba(255, 118, 0, 0.65);
  margin-top: 2px;
  line-height: 1;
  transition: text-shadow 0.4s ease, color 0.4s ease;
}

.logo-area:hover .logo-com-text {
  text-shadow: 0 0 12px rgba(255, 118, 0, 0.9);
  color: #ff9133;
}

.logo-icon {
  color: var(--primary);
  width: 2.5rem;
  height: 2.5rem;
  filter: drop-shadow(0 0 8px var(--primary-glow));
}

.logo-banner {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
  filter: drop-shadow(0 0 4px rgba(255, 118, 0, 0.1));
}

.logo-banner:hover {
  transform: scale(1.04);
  filter: drop-shadow(0 0 12px rgba(255, 118, 0, 0.35));
}

.stats-area {
  display: flex;
  gap: 1.2rem;
}

.stat-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.stat-badge .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-badge .value {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

/* Dashboard Layout */
.dashboard-layout {
  max-width: 1800px;
  margin: 1.5rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 280px 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1400px) {
  .dashboard-layout {
    grid-template-columns: 260px 1fr;
  }
  .sidebar {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-filters, .sidebar {
    grid-column: span 1;
  }
}

.sidebar-filters {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.filters-vertical {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filters-vertical .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filters-vertical .form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
}

.filters-vertical .btn {
  width: 100%;
  justify-content: center;
}

/* Common Panel Styling */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.panel:hover {
  border-color: var(--border-glow);
  box-shadow: 0 8px 30px rgba(255, 118, 0, 0.04);
}

.panel-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.panel-header i {
  color: var(--primary);
}

.panel-header h2 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
}

.rust-list-title span {
  color: var(--primary);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 0 10px var(--primary-glow);
}

.count-badge {
  margin-left: auto;
  background: var(--secondary);
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Filters Form Grid */
.filter-panel {
  margin-bottom: 2rem;
}

.filters-grid {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

@media (max-width: 992px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .filters-grid {
    grid-template-columns: 1fr;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.col-span-2 {
  grid-column: span 2;
}

.col-span-4 {
  grid-column: span 4;
}

@media (max-width: 992px) {
  .col-span-2, .col-span-4 {
    grid-column: span 2;
  }
}
@media (max-width: 576px) {
  .col-span-2, .col-span-4 {
    grid-column: span 1;
  }
}

label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Inputs & Form Controls */
input[type="text"], input[type="number"], input[type="date"] {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 118, 0, 0.15);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 0.8rem;
  width: 1rem;
  height: 1rem;
  color: var(--text-dark);
}

.input-with-icon input {
  padding-left: 2.3rem;
}

.range-inputs, .date-inputs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.range-inputs span, .date-inputs span {
  font-size: 0.8rem;
  color: var(--text-dark);
}

/* Toggles & Toggle Buttons */
.status-toggle-group, .three-state-toggle {
  display: flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
  padding: 2px;
}

.status-btn, .state-btn {
  flex: 1;
  text-align: center;
  cursor: pointer;
}

.status-btn input, .state-btn input {
  display: none;
}

.status-btn span, .state-btn span {
  display: block;
  padding: 0.5rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

.status-btn input:checked + span, .state-btn input:checked + span {
  background: var(--secondary);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Rust Accent for True States */
.state-btn input[value="true"]:checked + span {
  background: var(--primary);
  color: #fff;
}

/* Form Actions Button Row */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 0.6rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.btn i {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 4px 12px rgba(255, 118, 0, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

/* Server List Table */
.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  table-layout: fixed;
}

th {
  background: rgba(16, 16, 18, 0.4);
  padding: 1rem 1.5rem;
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  font-size: 0.9rem;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.rank-cell {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-dark);
}

.rank-cell.top-rank {
  color: var(--primary);
}

.server-name-cell {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.server-name {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

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

.server-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.tag-pve { border-color: rgba(0, 230, 118, 0.2); color: var(--green); }
.tag-nobp { border-color: rgba(41, 121, 255, 0.2); color: var(--blue); }
.tag-rate { border-color: rgba(255, 118, 0, 0.2); color: var(--primary); }

.players-cell {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.players-text {
  font-family: var(--font-title);
  font-weight: 600;
}

.players-queue {
  font-size: 0.75rem;
  color: var(--primary);
}

/* Progress bar for player capacity */
.progress-track {
  width: 100%;
  height: 4px;
  background: var(--secondary);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-bar.full {
  background: var(--red);
}

.wipe-cell {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.wipe-time {
  font-weight: 500;
}

.wipe-ago {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  background: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-icon i {
  width: 1rem;
  height: 1rem;
}

.btn-icon:hover {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}

/* Spinner and Loading elements */
.table-loading {
  text-align: center;
  padding: 4rem 0 !important;
  color: var(--text-muted);
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--secondary);
  border-top-color: var(--primary);
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  animation: spin 1s infinite linear;
}

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

/* Sidebar and Timeline */
.sidebar-panel {
  padding-bottom: 1.5rem;
}

.sidebar-intro {
  padding: 0.8rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  border-bottom: 1px solid var(--border-color);
}

.timeline {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  bottom: 1.5rem;
  left: 2.1rem;
  width: 2px;
  background: var(--secondary);
}

.timeline-loading {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.timeline-item {
  display: flex;
  gap: 1.2rem;
  position: relative;
  cursor: pointer;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
}

.timeline-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 118, 0, 0.1);
  transform: translateX(4px);
}

.timeline-marker {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 3px solid var(--secondary);
  z-index: 1;
  margin-top: 0.2rem;
  transition: background 0.3s, border-color 0.3s;
}

.timeline-item.imminent .timeline-marker {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 118, 0, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(255, 118, 0, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 118, 0, 0); }
}

.timeline-content {
  flex: 1;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.3rem;
}

.timeline-title {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.timeline-players {
  font-family: var(--font-title);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-countdown {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.2rem;
  letter-spacing: 0.5px;
}

.timeline-item.imminent .timeline-countdown {
  color: #ff1744;
}

.timeline-schedule {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Toast Notification Styles */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-secondary);
  border: 1px solid var(--primary);
  border-radius: 8px;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(0);
}

.toast i {
  color: var(--green);
}

.toast.hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.text-orange {
  color: var(--primary) !important;
}

/* -------------------------------------------------------------
 * EXPANDABLE ROW (ROLL DOWN) ACCORDION DESIGN
 * ------------------------------------------------------------- */

/* Row styling when expanded */
.server-row-active td {
  border-bottom: none !important;
  background: rgba(255, 118, 0, 0.02) !important;
}

.expanded-row td {
  padding: 0 !important;
  background: rgba(16, 16, 20, 0.4) !important;
}

.expanded-details-container {
  padding: 2rem;
  border-bottom: 1px solid var(--border-color);
  animation: fadeInAccordion 0.2s ease-out forwards;
  display: grid;
  grid-template-columns: 320px 1fr 300px;
  gap: 2rem;
  overflow: hidden;
}

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

@media (max-width: 1100px) {
  .expanded-details-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Detail Subpanels */
.detail-column {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.detail-subpanel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1rem;
}

.detail-subpanel-header {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

/* Attributes Lists (dt/dd layout) */
.detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
  padding-bottom: 0.4rem;
}

.detail-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-label {
  color: var(--text-muted);
}

.detail-value {
  font-weight: 500;
  color: var(--text-main);
}

.detail-value.highlight-green {
  color: var(--green);
}

.detail-value.highlight-orange {
  color: var(--primary);
}

/* Connect & Action buttons inside panel */
.details-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.btn-sm {
  flex: 1;
  padding: 0.4rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
}

/* Description / MOTD box */
.description-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 480px;
  overflow-y: auto;
}

/* Players Box & Scroll List */
.players-panel-content {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  height: 100%;
}

.player-search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.player-search-wrapper i {
  position: absolute;
  left: 0.6rem;
  width: 0.85rem;
  height: 0.85rem;
  color: var(--text-dark);
}

.player-search-wrapper input {
  padding: 0.4rem 0.6rem 0.4rem 1.8rem;
  font-size: 0.8rem;
  border-radius: 4px;
}

.players-scroll-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-right: 2px;
}

.player-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  font-size: 0.8rem;
  transition: background 0.2s;
}

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

.player-name-text {
  font-weight: 500;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.player-session-time {
  font-size: 0.75rem;
  color: var(--primary);
  font-family: var(--font-title);
  font-weight: 600;
}

/* Details Loading State */
.details-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Sorting Headers */
.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.2s, background-color 0.2s;
}

.sortable:hover {
  color: var(--primary) !important;
  background: rgba(255, 118, 0, 0.03) !important;
}

.sort-icon {
  margin-left: 4px;
  vertical-align: middle;
  width: 0.85rem;
  height: 0.85rem;
  opacity: 0.35;
  transition: opacity 0.2s, color 0.2s, transform 0.2s;
}

.sortable:hover .sort-icon {
  opacity: 0.8;
}

.sorted-asc, .sorted-desc {
  color: var(--primary) !important;
}

.sorted-asc .sort-icon, .sorted-desc .sort-icon {
  opacity: 1;
  color: var(--primary);
}

.sorted-asc .sort-icon {
  transform: rotate(180deg);
}

/* Collapsible Filter Panel Form */
#filters-form {
  max-height: 1000px;
  opacity: 1;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, padding 0.35s ease;
  overflow: hidden;
}

#filters-form.collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

.collapsible-header:hover {
  background: rgba(255, 255, 255, 0.01);
}

.collapsible-header:hover .collapse-icon {
  color: var(--primary);
}

/* Map Preview Hover Effect */
.map-thumb-img {
  transition: transform 0.3s ease;
}

.map-thumb-img:hover {
  transform: scale(1.04);
}


/* -------------------------------------------------------------
 * PREMIUM MODAL SYSTEM
 * ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 4, 5, 0.85);
  backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  width: 92%;
  max-width: 1100px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.9), 0 0 40px rgba(255, 118, 0, 0.08);
  position: relative;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal-container {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--secondary);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: background 0.25s, color 0.25s, transform 0.25s;
}

.modal-close:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(90deg);
}

#modal-content {
  padding: 2.5rem 2rem;
  display: block;
}

#modal-content .expanded-details-container {
  animation: none !important;
  padding: 0 !important;
  border-bottom: none !important;
  background: transparent !important;
  display: grid;
  grid-template-columns: 340px 1fr 320px;
  gap: 2rem;
}

#modal-content .detail-subpanel {
  background: rgba(255, 255, 255, 0.015);
}

@media (max-width: 1100px) {
  #modal-content .expanded-details-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Responsive Chart Container to prevent resize loops */
.chart-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.chart-container canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* -------------------------------------------------------------
 * TWITCH INTEGRATION & FLOATING VIDEO PLAYER
 * ------------------------------------------------------------- */

.streamers-panel {
  margin-top: 1.5rem;
}

.streamers-list {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.streamers-loading {
  text-align: center;
  padding: 2.5rem 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.streamer-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s;
}

.streamer-item:hover {
  background-color: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 118, 0, 0.15);
  transform: translateX(4px);
}

.streamer-avatar-container {
  position: relative;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  border: 2px solid var(--secondary);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.streamer-avatar-container.has-avatar {
  border-color: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.streamer-info {
  flex: 1;
  min-width: 0; /* allows text truncation */
}

.streamer-name-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.15rem;
}

.streamer-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.streamer-viewers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-family: var(--font-title);
  font-weight: 600;
  color: var(--primary);
  background: rgba(255, 118, 0, 0.08);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 118, 0, 0.15);
}

.streamer-viewers i {
  width: 10px;
  height: 10px;
  color: var(--primary);
}

.streamer-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

/* Live pulse indicator */
.live-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: livePulseGlow 1.8s infinite ease-in-out;
}

@keyframes livePulseGlow {
  0% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); box-shadow: 0 0 8px var(--red); }
  100% { opacity: 0.4; transform: scale(0.9); }
}

/* Floating Draggable Twitch Player */
.twitch-player-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 384px;
  height: 256px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), height 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s;
}

.twitch-player-container:hover {
  border-color: rgba(255, 118, 0, 0.25);
}

.twitch-player-header {
  height: 40px;
  background: rgba(14, 15, 17, 0.95);
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  cursor: move; /* Drag cursor style */
  user-select: none;
}

.twitch-player-title-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#twitch-player-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-main);
  letter-spacing: 0.3px;
}

.twitch-player-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.twitch-player-controls button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s, color 0.2s;
}

.twitch-player-controls button:hover {
  background-color: var(--secondary-hover);
  color: var(--text-main);
}

.twitch-player-controls button#twitch-btn-close:hover {
  background-color: rgba(255, 23, 68, 0.15);
  color: var(--red);
}

.twitch-player-controls button i {
  width: 14px;
  height: 14px;
}

.twitch-player-body {
  flex: 1;
  background: #000;
  position: relative;
}

.twitch-player-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Minimized State overlay styling */
.twitch-player-container.minimized {
  width: 220px !important;
  height: 40px !important;
  border-color: rgba(255, 118, 0, 0.25);
  box-shadow: var(--shadow-md), 0 0 10px var(--primary-glow);
}

.twitch-player-container.minimized .twitch-player-body {
  display: none;
}

.twitch-player-container.minimized:hover {
  border-color: var(--primary);
}

/* -------------------------------------------------------------
 * SIDEBAR ACCORDION & THEATER MODE STYLING
 * ------------------------------------------------------------- */

/* Collapsible Accordion Panels */
.collapsible .panel-header {
  user-select: none;
}

.collapsible .accordion-arrow {
  width: 1rem;
  height: 1rem;
  color: var(--text-muted);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.collapsible.expanded .accordion-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

.collapsible .panel-body {
  max-height: 1500px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease, padding 0.4s ease;
}

.collapsible.collapsed .panel-body {
  max-height: 0;
  opacity: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  pointer-events: none;
}

/* Floating Twitch Player Theater Mode (3x size & Centered) */
.twitch-player-container.theater {
  width: 960px;
  height: 580px;
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
  bottom: auto !important;
  right: auto !important;
  border-color: var(--primary);
  box-shadow: 0 0 45px rgba(0, 0, 0, 0.85), 0 0 30px var(--primary-glow);
}

/* Active style for controls in theater mode */
.twitch-player-controls button#twitch-btn-theater.active {
  color: var(--primary);
  background-color: var(--secondary-hover);
}

/* -------------------------------------------------------------
 * STEAM LOGIN & LFG MATCHMAKING STYLING
 * ------------------------------------------------------------- */

/* Auth Area in Header */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}

.auth-area {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.steam-login-btn {
  background: #171a21 !important; /* Steam Dark Slate */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: #c6d4df !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.steam-login-btn:hover {
  background: #2a475e !important; /* Steam Blue */
  color: #fff !important;
  border-color: rgba(255, 118, 0, 0.25) !important;
  box-shadow: 0 4px 15px rgba(42, 71, 94, 0.3) !important;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
  user-select: none;
}

.user-profile-badge:hover {
  border-color: var(--primary);
}

.user-profile-badge img {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 118, 0, 0.3);
}

.user-profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-profile-rating {
  font-size: 0.7rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  margin-top: 1px;
}

/* Auth Dropdown menu */
.auth-dropdown {
  position: absolute;
  top: 115%;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  z-index: 150;
  min-width: 140px;
}

.auth-dropdown button {
  width: 100%;
  padding: 0.5rem 0.8rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s, color 0.2s;
}

.auth-dropdown button:hover {
  background: var(--bg-card);
  color: var(--text-main);
}
.auth-dropdown button#logout-btn:hover {
  background: rgba(255, 23, 68, 0.1);
  color: var(--red);
}
.auth-dropdown { min-width: 170px; }

/* Player list profile link */
a.player-steam-link {
  color: var(--text-main);
  text-decoration: none;
  cursor: pointer;
  transition: color .15s;
  pointer-events: all !important;
}
a.player-steam-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Dashboard Tabs Navigation */
.dashboard-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.8rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.tab-btn i {
  width: 1rem;
  height: 1rem;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(255, 118, 0, 0.06);
  border-color: rgba(255, 118, 0, 0.15);
  box-shadow: 0 0 12px rgba(255, 118, 0, 0.04);
}

.lfg-pulse-badge {
  font-size: 0.6rem;
  background: var(--primary);
  color: #fff;
  padding: 0.1rem 0.35rem;
  border-radius: 10px;
  text-transform: uppercase;
  font-weight: 800;
  margin-left: 0.2rem;
  box-shadow: 0 0 6px var(--primary-glow);
}

/* LFG Groups Grid & LFG Card */
.lfg-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.lfg-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lfg-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.lfg-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lfg-card-header img {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 118, 0, 0.3);
}

.lfg-creator-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.lfg-creator-name {
  font-family: var(--font-title);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.lfg-creator-rating {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}

.lfg-badge-status {
  margin-left: auto;
  font-size: 0.65rem;
  text-transform: uppercase;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.lfg-badge-status.open { background: rgba(0, 230, 118, 0.1); color: var(--green); border: 1px solid rgba(0, 230, 118, 0.2); }
.lfg-badge-status.active { background: rgba(255, 118, 0, 0.1); color: var(--primary); border: 1px solid rgba(255, 118, 0, 0.2); }

.lfg-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lfg-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
  height: 2.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lfg-members-roster {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.2rem;
}

.lfg-roster-avatar {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  border: 1.5px solid var(--bg-secondary);
  background: var(--secondary);
}

.lfg-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.8rem;
}

.lfg-slots-left {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.lfg-slots-left span {
  color: var(--text-main);
  font-weight: 700;
}

/* Active Party Board Dashboard */
.active-party-board {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
  margin-top: 1.2rem;
  text-align: left;
}

@media (max-width: 768px) {
  .active-party-board {
    grid-template-columns: 1fr;
  }
}

.party-section-title {
  font-family: var(--font-title);
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  letter-spacing: 0.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
}

.party-lobby-chat {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  height: 320px;
}

.party-chat-messages {
  flex: 1;
  padding: 0.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.chat-msg {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid rgba(255, 255, 255, 0.15);
}

.chat-msg.leader {
  border-left-color: var(--primary);
  background: rgba(255, 118, 0, 0.03);
}

.chat-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
  font-weight: 600;
}

.chat-meta span.author {
  color: var(--text-main);
}

.party-chat-input-area {
  display: flex;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.15);
  padding: 6px;
  gap: 0.4rem;
}

.party-chat-input-area input {
  flex: 1;
  border: none;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
}

.party-chat-input-area input:focus {
  border: none;
  box-shadow: none;
}

.party-chat-input-area button {
  background: var(--primary);
  border: none;
  color: #fff;
  border-radius: 4px;
  width: 2.3rem;
  height: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.party-chat-input-area button:hover {
  background: var(--primary-hover);
}

/* Star rating selectors */
.rating-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
}

.rating-item-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rating-item-info img {
  width: 2rem;
  height: 2rem;
  border-radius: 4px;
}

.rating-item-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.star-rating-selector {
  display: flex;
  gap: 0.25rem;
}

.star-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  padding: 0.1rem;
  transition: transform 0.1s, color 0.15s;
}

.star-btn.active {
  color: var(--primary);
}

.star-btn:hover {
  transform: scale(1.15);
}

/* Form Controls custom adjustments */
.form-control {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
}

/* ============================================================
   ICON BUTTONS (header actions)
============================================================ */
.icon-btn {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  position: relative;
}
.icon-btn i {
  width: 16px;
  height: 16px;
}

/* ============================================================
   UNREAD BADGE
============================================================ */
.inbox-unread-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--red, #ed4245);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  pointer-events: none;
}
.inbox-unread-badge.hidden {
  display: none;
}

/* ============================================================
   PROFILE MODAL TABS
============================================================ */
.profile-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.profile-tab-btn:hover {
  background: var(--bg-secondary);
  color: var(--text-main);
}
.profile-tab-btn.active {
  background: rgba(255, 118, 0, 0.12);
  color: var(--primary);
  font-weight: 600;
}

/* ============================================================
   INBOX / CHAT
============================================================ */
.inbox-row:hover {
  border-color: var(--primary) !important;
}
#chat-messages::-webkit-scrollbar {
  width: 4px;
}
#chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
/* Safety: modals never block clicks unless active */
.modal-overlay:not(.active) {
  pointer-events: none !important;
}
.modal-overlay:not(.active) * {
  pointer-events: none !important;
}

/* ============================================================
   FRIENDS PANEL ALERT GLOW ANIMATION
   ============================================================ */
@keyframes friendsAlertPulse {
  0%   { box-shadow: 0 0 0px 0px rgba(255,118,0,0); border-color: var(--border-color); }
  50%  { box-shadow: 0 0 14px 4px rgba(255,118,0,0.55); border-color: var(--primary); }
  100% { box-shadow: 0 0 0px 0px rgba(255,118,0,0); border-color: var(--border-color); }
}
#sidebar-friends-panel.has-alert {
  animation: friendsAlertPulse 1.8s ease-in-out infinite;
  border: 1px solid var(--primary);
}
#sidebar-friends-panel.has-alert .panel-header h2 {
  color: var(--primary);
}
#sidebar-friends-panel.has-alert .panel-header i[data-lucide="users"] {
  filter: drop-shadow(0 0 6px var(--primary));
}

/* ============================================================
   STEAM-STYLE FLOATING FRIEND CHAT
   ============================================================ */
.friend-chat-bubble {
  pointer-events: all;
  width: 300px;
  background: #1b2838;
  border: 1px solid #2a475e;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 24px rgba(0,0,0,.55);
  transition: height .2s ease;
  overflow: hidden;
}
.friend-chat-bubble.minimized .friend-chat-body { display: none; }

.friend-chat-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .65rem;
  background: #2a475e;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}
.friend-chat-header:hover { background: #316282; }
.friend-chat-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,.15);
}
.friend-chat-name {
  flex: 1;
  font-size: .82rem;
  font-weight: 600;
  color: #c7d5e0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.friend-chat-header-badge {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .38rem;
  min-width: 16px;
  text-align: center;
  display: none;
}
.friend-chat-header-badge.visible { display: block; }
.friend-chat-close {
  background: none;
  border: none;
  color: #8ba2b5;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 .1rem;
  flex-shrink: 0;
}
.friend-chat-close:hover { color: #fff; }

.friend-chat-body {
  display: flex;
  flex-direction: column;
  height: 340px;
}
.friend-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: .6rem .65rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  background: #1b2838;
  scroll-behavior: smooth;
}
.friend-chat-messages::-webkit-scrollbar { width: 4px; }
.friend-chat-messages::-webkit-scrollbar-thumb { background: #2a475e; border-radius: 4px; }

.fc-msg {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}
.fc-msg.me { align-self: flex-end; align-items: flex-end; }
.fc-msg.them { align-self: flex-start; align-items: flex-start; }
.fc-msg-bubble {
  padding: .35rem .6rem;
  border-radius: 10px;
  font-size: .82rem;
  line-height: 1.35;
  word-break: break-word;
}
.fc-msg.me .fc-msg-bubble { background: #4b8bbe; color: #fff; border-bottom-right-radius: 3px; }
.fc-msg.them .fc-msg-bubble { background: #2a475e; color: #c7d5e0; border-bottom-left-radius: 3px; }
.fc-msg-time { font-size: .65rem; color: #6b8fa8; margin-top: .15rem; }

.friend-chat-input-row {
  display: flex;
  gap: .4rem;
  padding: .45rem .5rem;
  background: #16202c;
  border-top: 1px solid #2a475e;
  flex-shrink: 0;
}
.friend-chat-input {
  flex: 1;
  background: #2a475e;
  border: 1px solid #3d6680;
  border-radius: 5px;
  color: #c7d5e0;
  font-size: .82rem;
  padding: .38rem .55rem;
  outline: none;
  font-family: inherit;
}
.friend-chat-input::placeholder { color: #5a7d96; }
.friend-chat-input:focus { border-color: #66c0f4; }
.friend-chat-send {
  background: #4b8bbe;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: .85rem;
  padding: .38rem .6rem;
  cursor: pointer;
  flex-shrink: 0;
}
.friend-chat-send:hover { background: #66c0f4; }

/* Sidebar friend unread badge */
.sidebar-friend-unread {
  background: #e74c3c;
  color: #fff;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .38rem;
  min-width: 16px;
  text-align: center;
}

@keyframes appliedPulse {
  0% { box-shadow: 0 0 0px 0px rgba(255, 118, 0, 0.2); border-color: rgba(255, 118, 0, 0.4); }
  50% { box-shadow: 0 0 8px 2px rgba(255, 118, 0, 0.4); border-color: var(--primary); }
  100% { box-shadow: 0 0 0px 0px rgba(255, 118, 0, 0.2); border-color: rgba(255, 118, 0, 0.4); }
}

.btn-applied-pulse {
  animation: appliedPulse 2s infinite ease-in-out;
  background: rgba(255, 118, 0, 0.08) !important;
  color: var(--primary) !important;
  border: 1px solid var(--primary) !important;
  opacity: 1 !important;
}

.lfg-cancel-apply-btn .btn-cancel-text {
  display: none;
}
.lfg-cancel-apply-btn:hover .btn-applied-text {
  display: none !important;
}
.lfg-cancel-apply-btn:hover .btn-cancel-text {
  display: inline-flex !important;
  align-items: center;
  gap: 0.2rem;
}
.lfg-cancel-apply-btn:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: #ef4444 !important;
  color: #ef4444 !important;
  box-shadow: 0 0 8px 2px rgba(239, 68, 68, 0.3) !important;
  animation: none !important;
  cursor: pointer;
}

/* -------------------------------------------------------------
 * LINKED PARTY SERVER ROW GLOW DESIGN
 * ------------------------------------------------------------- */
@keyframes linkedServerGlow {
  0% { box-shadow: inset 0 0 4px rgba(39, 174, 96, 0.15); border-color: rgba(39, 174, 96, 0.3); }
  50% { box-shadow: inset 0 0 12px rgba(39, 174, 96, 0.35); border-color: #27ae60; }
  100% { box-shadow: inset 0 0 4px rgba(39, 174, 96, 0.15); border-color: rgba(39, 174, 96, 0.3); }
}

tr.linked-party-server td {
  border-top: 1.5px solid #27ae60 !important;
  border-bottom: 1.5px solid #27ae60 !important;
  background: rgba(39, 174, 96, 0.03) !important;
  animation: linkedServerGlow 2.5s infinite ease-in-out;
}

tr.linked-party-server td:first-child {
  border-left: 1.5px solid #27ae60 !important;
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

tr.linked-party-server td:last-child {
  border-right: 1.5px solid #27ae60 !important;
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* ============================================================
   PREMIUM NOTIFICATION & CHAT UPGRADES
   ============================================================ */

/* Pulsing notification dot overlay on avatar */
.avatar-container {
  position: relative;
  display: inline-flex;
}
.profile-notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border: 2px solid var(--bg-secondary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  animation: dotPulse 1.6s infinite ease-in-out;
  pointer-events: none;
  z-index: 10;
}
@keyframes dotPulse {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 118, 0, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(255, 118, 0, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(255, 118, 0, 0); }
}

/* User profile badge notification glow */
.user-profile-badge.has-notification {
  border-color: var(--primary) !important;
  animation: profileBadgeGlow 2.2s infinite ease-in-out;
}
@keyframes profileBadgeGlow {
  0% { box-shadow: 0 0 0px rgba(255, 118, 0, 0); }
  50% { box-shadow: 0 0 10px rgba(255, 118, 0, 0.35); }
  100% { box-shadow: 0 0 0px rgba(255, 118, 0, 0); }
}

/* Upgraded Toast Styles */
.toast {
  min-width: 280px;
  border-radius: 12px !important;
  background: rgba(30, 30, 42, 0.95) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
  transform: translateY(0) scale(1);
}
.toast.success { border-left: 4px solid var(--green) !important; }
.toast.error { border-left: 4px solid var(--red) !important; }
.toast.message { border-left: 4px solid var(--primary) !important; }
.toast.invite { border-left: 4px solid #e67e22 !important; }

/* Slide-in entry animation for messages */
@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-bubble-animated {
  animation: messageSlideIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Online Status indicator dot */
.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #555;
}
.status-indicator.online {
  background: #57f287;
  box-shadow: 0 0 6px #57f287;
}

/* Glowing border for minimized floating chats with unread messages */
.friend-chat-bubble.unread-alert {
  border-color: var(--primary) !important;
  animation: chatAlertGlow 1.8s infinite ease-in-out;
}
@keyframes chatAlertGlow {
  0% { box-shadow: 0 -4px 12px rgba(255, 118, 0, 0.1); }
  50% { box-shadow: 0 -4px 20px rgba(255, 118, 0, 0.45); }
  100% { box-shadow: 0 -4px 12px rgba(255, 118, 0, 0.1); }
}

/* Twitch Drops Section */
.drops-card {
  background: rgba(30, 30, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.drops-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #9147ff, var(--primary));
  opacity: 0.7;
}

.drops-card:hover {
  transform: translateY(-4px);
  border-color: rgba(145, 71, 255, 0.3);
  box-shadow: 0 12px 30px rgba(145, 71, 255, 0.15);
}

.drops-card-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.6rem;
}

.drops-card-header img {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 2px solid rgba(145, 71, 255, 0.3);
}

.drops-card-streamer-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.drops-card-streamer-name {
  font-family: var(--font-header);
  font-weight: 700;
  color: #fff;
  font-size: 0.9rem;
}

.drops-card-status-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.drops-card-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.drops-card-status-dot.online {
  background: #57f287;
  box-shadow: 0 0 6px #57f287;
  animation: dotPulse 1.8s infinite;
}

.drops-card-status-dot.offline {
  background: #7f8c8d;
}

.drops-card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
}

.drops-card-image,
.drops-card-body video {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  transition: transform 0.3s ease;
}

.drops-card:hover .drops-card-image,
.drops-card:hover .drops-card-body video {
  transform: scale(1.08) rotate(2deg);
}

.drops-card-item-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-align: center;
}

.drops-card-requirement {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.drops-card-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 0.75rem;
  display: flex;
  justify-content: stretch;
}

/* Direct Action Buttons on LFG Cards/List */
.btn-lfg-action {
  background: rgba(255, 118, 0, 0.06);
  border: 1px solid rgba(255, 118, 0, 0.18);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-lfg-action:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Language Grid */
.language-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.language-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.3rem;
  background: var(--bg-secondary, #141517);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}
.language-card:hover {
  border-color: rgba(255, 118, 0, 0.4);
  background: rgba(255, 118, 0, 0.04);
  transform: translateY(-1px);
}
.language-card.active {
  border-color: var(--primary, #ff7600);
  background: rgba(255, 118, 0, 0.08);
  box-shadow: 0 0 10px rgba(255, 118, 0, 0.15);
}
.language-card .flag-icon {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
  border-radius: 2px;
  box-shadow: 0 1.5px 3px rgba(0,0,0,0.3);
}
.language-card .lang-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #8e9297);
}
.language-card.active .lang-name {
  color: #fff;
}

/* Connection Cards */
.connections-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.connection-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  background: var(--bg-secondary, #141517);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  transition: all 0.2s ease;
}
.connection-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.connection-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.connection-icon {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.connection-icon.twitch { background: #9147ff; }
.connection-icon.discord { background: #5865F2; }
.connection-icon i { width: 1rem; height: 1rem; }
.connection-details {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.connection-service {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  text-align: left;
}
.connection-status {
  font-size: 0.7rem;
  color: var(--text-muted, #8e9297);
  text-align: left;
}
.connection-status.connected {
  color: #57f287;
}
.btn-connect {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border: none;
  border-radius: 5px;
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-connect.twitch { background: #9147ff; }
.btn-connect.discord { background: #5865F2; }
.btn-connect:hover { opacity: 0.9; }

.btn-disconnect {
  background: transparent;
  border: 1px solid rgba(231, 76, 60, 0.4);
  color: #e74c3c;
  border-radius: 5px;
  padding: 0.35rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-disconnect:hover {
  background: #e74c3c;
  color: #fff;
  border-color: #e74c3c;
}

/* Email Verification Flow styles */
.status-pill {
  position: absolute;
  right: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-pill.status-unverified {
  background: rgba(230, 126, 34, 0.12);
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.2);
}
.status-pill.status-verified {
  background: rgba(87, 242, 135, 0.12);
  color: #57f287;
  border: 1px solid rgba(87, 242, 135, 0.2);
}
.status-pill i {
  width: 0.7rem;
  height: 0.7rem;
}

/* Split screen Inbox Container */
.inbox-split-container {
  display: flex;
  height: 380px;
  background: rgba(10, 10, 15, 0.3);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.inbox-threads-sidebar {
  width: 32%;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.01);
}
.threads-search-bar {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}
.threads-search-bar input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.35rem 0.55rem;
  font-size: 0.75rem;
  color: #fff;
  outline: none;
}
.threads-list {
  flex: 1;
  overflow-y: auto;
}

.inbox-active-chat-pane {
  width: 68%;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.15);
}
.chat-blank-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 0.4rem;
}

.active-chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.chat-header {
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.01);
}
.chat-name {
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
}
.chat-substatus {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chat-message-history {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(0,0,0,0.1);
}

.chat-input-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.01);
}
.chat-input-bar input {
  flex: 1;
  padding: 0.5rem .75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 0.8rem;
  outline: none;
}
.btn-send-icon {
  background: var(--primary);
  border: none;
  color: #fff;
  border-radius: 6px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-send-icon:hover {
  opacity: 0.9;
}
.btn-send-icon i {
  width: 14px;
  height: 14px;
}

/* Avatar indicators */
.avatar-container {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.avatar-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 118, 0, 0.2);
}
.status-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #1a1a24;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
}
.status-dot.online { background: #57f287; }
.status-dot.offline { background: #7f8c8d; }
.status-dot.ingame {
  background: var(--primary);
  box-shadow: 0 0 5px var(--primary-glow);
}

/* Chat bubble enhancements */
.msg-group {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  text-align: left;
}
.msg-group-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  width: 100%;
}
.msg-group-header {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.msg-sender-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
}
.msg-time {
  font-size: 0.62rem;
  color: var(--text-muted);
}
.msg-body-bubble {
  padding: 0.35rem 0.65rem;
  border-radius: 4px 10px 10px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-main);
  max-width: 85%;
  word-break: break-word;
  align-self: flex-start;
}
.msg-group.me {
  flex-direction: row-reverse;
}
.msg-group.me .msg-group-content {
  align-items: flex-end;
}
.msg-group.me .msg-group-header {
  flex-direction: row-reverse;
}
.msg-group.me .msg-body-bubble {
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.12) 0%, rgba(255, 118, 0, 0.04) 100%);
  border-color: rgba(255, 118, 0, 0.2);
  color: #fff;
  border-radius: 10px 4px 10px 10px;
  align-self: flex-end;
}

/* Consecutive Message spacing adjustment */
.msg-consecutive {
  margin-top: -0.4rem;
  padding-left: 2.48rem;
}
.msg-group.me.msg-consecutive {
  padding-left: 0;
  padding-right: 2.48rem;
}

/* Thin carbon scrollbars */
.chat-message-history::-webkit-scrollbar,
.threads-list::-webkit-scrollbar {
  width: 4px;
}
.chat-message-history::-webkit-scrollbar-track,
.threads-list::-webkit-scrollbar-track {
  background: transparent;
}
.chat-message-history::-webkit-scrollbar-thumb,
.threads-list::-webkit-scrollbar-thumb {
  background: rgba(255, 118, 0, 0.15);
  border-radius: 4px;
}
.chat-message-history::-webkit-scrollbar-thumb:hover,
.threads-list::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Offline Dashed Avatar styling */
.sidebar-friend-avatar.offline,
.avatar-container.offline .avatar-image {
  border: 1.5px dashed rgba(255, 255, 255, 0.25) !important;
  filter: grayscale(0.85) opacity(0.5);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-friend-avatar.offline:hover,
.avatar-container.offline:hover .avatar-image {
  filter: none;
  border-color: rgba(255, 118, 0, 0.5) !important;
  border-style: solid !important;
}

/* Analytics Dashboard */
.analytics-panel {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
}
.analytics-stat-card {
  background: rgba(20, 21, 23, 0.5) !important;
  border: 1px solid var(--border-color) !important;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.analytics-stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 118, 0, 0.25) !important;
  box-shadow: 0 4px 15px rgba(255, 118, 0, 0.05);
}
.analytics-main-layout,
.analytics-bottom-layout {
  text-align: left;
}
.chart-point-dot {
  transition: r 0.15s ease, fill 0.15s ease;
}
.chart-point-dot:hover {
  r: 7;
  fill: #fff;
}
.badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: 15px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-block;
}
@media (max-width: 768px) {
  .analytics-main-layout,
  .analytics-bottom-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ================================================================
 * v1.1 REDESIGN LAYER
 * Modernization pass: fluid roll-down/up animations, sticky sidebar
 * with micro-animations, redesigned user menu, LFG ready-check UI,
 * language badges, outgoing pendings, and community stats boards.
 * ================================================================ */

/* ── Motion primitives ─────────────────────────────────────────── */
@keyframes rollDown {
  0%   { opacity: 0; transform: translateY(-10px) scaleY(0.96); max-height: 0; }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scaleY(1); max-height: 1200px; }
}
@keyframes rollUp {
  0%   { opacity: 1; transform: translateY(0) scaleY(1); }
  100% { opacity: 0; transform: translateY(-10px) scaleY(0.96); }
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes softPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 118, 0, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(255, 118, 0, 0); }
}

.roll-down {
  transform-origin: top center;
  animation: rollDown 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Smoother, springier accordion (roll down / roll up) */
.collapsible .panel-body {
  transition: max-height 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.35s ease,
              padding 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center;
  transform: scaleY(1);
}
.collapsible.collapsed .panel-body {
  transform: scaleY(0.97) translateY(-4px);
}
.collapsible .accordion-arrow {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
}

/* Allow dropdown menus inside expanded collapsible filters to pop out without clipping */
.collapsible.expanded {
  overflow: visible !important;
}
.collapsible.expanded .panel-body {
  overflow: visible !important;
}

/* ── Sticky sidebar that follows the scroll + micro-animations ── */
.sidebar-filters {
  position: sticky;
  top: 96px;
  align-self: flex-start;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 2px;
  padding-bottom: 220px; /* Extra spacing at bottom to prevent absolute dropdowns from being clipped */
  scroll-behavior: smooth;
}
.sidebar-filters::-webkit-scrollbar { width: 5px; }

.sidebar-filters .panel {
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease,
              box-shadow 0.3s ease;
  will-change: transform;
}
.sidebar-filters .panel:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 118, 0, 0.18);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 118, 0, 0.06);
}
.sidebar-filters .panel-header {
  transition: background 0.25s ease;
  border-radius: 8px;
}
.sidebar-filters .panel-header:hover .accordion-arrow {
  transform: translateY(2px);
  color: var(--primary);
}
.sidebar-filters .collapsible.expanded .panel-header:hover .accordion-arrow {
  transform: rotate(180deg) translateY(2px);
}

/* Staggered entrance for sidebar friend rows */
#sidebar-friends-list > div {
  animation: fadeSlideIn 0.35s ease both;
}
#sidebar-friends-list > div:nth-child(2)  { animation-delay: 0.03s; }
#sidebar-friends-list > div:nth-child(3)  { animation-delay: 0.06s; }
#sidebar-friends-list > div:nth-child(4)  { animation-delay: 0.09s; }
#sidebar-friends-list > div:nth-child(5)  { animation-delay: 0.12s; }
#sidebar-friends-list > div:nth-child(6)  { animation-delay: 0.15s; }
#sidebar-friends-list > div:nth-child(n+7) { animation-delay: 0.18s; }

/* Alert glow on the friends panel when something needs attention */
#sidebar-friends-panel.has-alert {
  border-color: rgba(255, 118, 0, 0.35);
  animation: softPulse 2.4s ease-in-out infinite;
}

/* ── Redesigned user menu (avatar dropdown) ────────────────────── */
.user-menu-caret {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  margin-left: 0.15rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}
.user-profile-badge.menu-open .user-menu-caret {
  transform: rotate(180deg);
  color: var(--primary);
}
.user-profile-badge.menu-open {
  border-color: var(--primary);
}

.auth-dropdown {
  min-width: 240px;
  padding: 0.45rem;
  border-radius: 12px;
  background: rgba(20, 22, 25, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 118, 0, 0.04);
  /* Animated roll-down: closed by default, opened via .open */
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  transition: opacity 0.25s ease,
              transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
              visibility 0.32s;
}
.auth-dropdown.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.auth-dropdown .menu-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.7rem;
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.08), rgba(255, 118, 0, 0.02));
  border: 1px solid rgba(255, 118, 0, 0.12);
  border-radius: 9px;
  margin-bottom: 0.4rem;
}
.auth-dropdown .menu-identity img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 118, 0, 0.35);
  object-fit: cover;
}
.menu-identity-text { display: flex; flex-direction: column; min-width: 0; }
.menu-identity-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.menu-identity-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1px;
}

.auth-dropdown .menu-section-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dark);
  padding: 0.45rem 0.7rem 0.2rem;
  user-select: none;
}

.auth-dropdown .menu-item {
  width: 100%;
  padding: 0.52rem 0.7rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.auth-dropdown .menu-item svg,
.auth-dropdown .menu-item i {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}
.auth-dropdown .menu-item:hover {
  background: rgba(255, 118, 0, 0.09);
  color: var(--text-main);
  transform: translateX(2px);
}
.auth-dropdown .menu-item.admin { color: var(--primary); }
.auth-dropdown .menu-item.danger:hover {
  background: rgba(255, 23, 68, 0.1);
  color: var(--red);
}
.auth-dropdown .menu-divider {
  border-top: 1px solid var(--border-color);
  margin: 0.35rem 0.3rem;
}
.menu-item-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.08rem 0.42rem;
  line-height: 1.3;
}
.menu-item-badge.hidden { display: none; }

/* ── LFG: language badge ───────────────────────────────────────── */
.lfg-lang-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(41, 121, 255, 0.08);
  border: 1px solid rgba(41, 121, 255, 0.22);
  color: #9ec3ff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.lfg-lang-badge.sm { font-size: 0.68rem; padding: 0.12rem 0.45rem; }

/* ── LFG: outgoing pendings strip ──────────────────────────────── */
.lfg-outgoing-strip {
  background: rgba(255, 118, 0, 0.035);
  border: 1px solid rgba(255, 118, 0, 0.14);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1.1rem;
  text-align: left;
}
.lfg-outgoing-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.6rem;
}
.lfg-outgoing-title svg, .lfg-outgoing-title i { width: 14px; height: 14px; }
.lfg-outgoing-items { display: flex; flex-direction: column; gap: 0.45rem; }
.lfg-outgoing-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.lfg-outgoing-item:hover { border-color: rgba(255, 118, 0, 0.25); transform: translateX(2px); }
.lfg-outgoing-item img {
  width: 30px; height: 30px; border-radius: 6px; object-fit: cover;
  border: 1px solid rgba(255, 118, 0, 0.2);
}
.lfg-outgoing-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lfg-outgoing-name { font-size: 0.84rem; font-weight: 600; color: var(--text-main); }
.lfg-outgoing-meta { font-size: 0.72rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lfg-outgoing-status {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; font-weight: 700; color: #e6a23c;
  background: rgba(230, 162, 60, 0.1);
  border: 1px solid rgba(230, 162, 60, 0.25);
  padding: 0.18rem 0.5rem; border-radius: 999px;
}
.lfg-outgoing-status svg, .lfg-outgoing-status i { width: 11px; height: 11px; }

/* ── LFG: ready-check panel + session tracker ──────────────────── */
.ready-panel {
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.05), rgba(255, 118, 0, 0.01));
  border: 1px solid rgba(255, 118, 0, 0.18);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  text-align: left;
}
.ready-panel.column { flex-direction: column; align-items: stretch; }
.ready-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}
.ready-panel-info { flex: 1; min-width: 220px; }
.ready-panel-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-family: var(--font-title);
  font-size: 0.95rem; font-weight: 700; color: var(--text-main);
}
.ready-panel-title svg, .ready-panel-title i { width: 16px; height: 16px; color: var(--primary); }
.ready-panel-sub { display: block; font-size: 0.76rem; color: var(--text-muted); margin-top: 0.25rem; line-height: 1.45; }

.ready-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.ready-member {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.ready-member.is-ready { border-color: rgba(0, 230, 118, 0.3); background: rgba(0, 230, 118, 0.04); }
.ready-member.is-ingame { border-color: rgba(41, 121, 255, 0.35); background: rgba(41, 121, 255, 0.05); }
.ready-member img { width: 28px; height: 28px; border-radius: 6px; object-fit: cover; }
.ready-member-name {
  flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ready-pill {
  display: inline-flex; align-items: center; gap: 0.28rem;
  font-size: 0.66rem; font-weight: 800; letter-spacing: 0.02em;
  padding: 0.16rem 0.5rem; border-radius: 999px; white-space: nowrap;
}
.ready-pill svg, .ready-pill i { width: 11px; height: 11px; }
.ready-pill.ok        { color: #00e676; background: rgba(0, 230, 118, 0.1);  border: 1px solid rgba(0, 230, 118, 0.28); }
.ready-pill.waiting   { color: #e6a23c; background: rgba(230, 162, 60, 0.1); border: 1px solid rgba(230, 162, 60, 0.28); }
.ready-pill.ingame    { color: #6ea8ff; background: rgba(41, 121, 255, 0.12); border: 1px solid rgba(41, 121, 255, 0.3); }
.ready-pill.validated { color: #00e676; background: rgba(0, 230, 118, 0.1);  border: 1px solid rgba(0, 230, 118, 0.28); }

.session-tracker {
  margin-top: 0.9rem;
  border-top: 1px dashed rgba(255, 118, 0, 0.18);
  padding-top: 0.85rem;
}
.session-tracker-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap;
  font-size: 0.76rem; color: var(--text-muted); margin-bottom: 0.5rem;
}
.session-tracker-head svg, .session-tracker-head i { width: 13px; height: 13px; vertical-align: middle; color: var(--primary); }
.session-mins { font-family: var(--font-title); font-weight: 700; color: var(--primary); font-size: 0.85rem; }
.session-bar {
  height: 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  overflow: hidden;
}
.session-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #ffa04d);
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(255, 118, 0, 0.4);
}
.session-bar-fill.validated { background: linear-gradient(90deg, #00c853, #00e676); box-shadow: 0 0 12px rgba(0, 230, 118, 0.4); }
.session-join-btn { margin-top: 0.8rem; width: 100%; justify-content: center; padding: 0.65rem; }

/* ── LFG: sent invites rows (leader) ───────────────────────────── */
.invited-row {
  display: flex; align-items: center; gap: 0.6rem;
  background: rgba(230, 162, 60, 0.04);
  border: 1px solid rgba(230, 162, 60, 0.2);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
}
.invited-row img { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; }
.invited-info { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.invited-name { font-size: 0.84rem; font-weight: 600; color: var(--text-main); }
.invited-meta {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.7rem; color: #e6a23c; font-weight: 600;
}
.invited-meta svg, .invited-meta i { width: 11px; height: 11px; }

/* ── Profile: My Stats tab ─────────────────────────────────────── */
.stats-summary-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
}
.stats-summary-card {
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 118, 0, 0.14);
  border-radius: 10px;
  padding: 0.85rem;
  display: flex; flex-direction: column; align-items: center; gap: 0.2rem;
}
.ssc-value { font-family: var(--font-title); font-size: 1.25rem; font-weight: 800; color: var(--text-main); }
.ssc-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 700; }

.stats-longest-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.04), rgba(0, 0, 0, 0.2));
  border: 1px dashed rgba(255, 118, 0, 0.25);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  text-align: left;
}
.slc-time {
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.slc-time svg, .slc-time i {
  width: 18px;
  height: 18px;
}
.slc-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.slc-server {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slc-teammates {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stats-block-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin: 0.35rem 0 0.1rem;
}
.stats-block-title svg, .stats-block-title i { width: 14px; height: 14px; color: var(--primary); }
.stats-empty { font-size: 0.82rem; color: var(--text-muted); font-style: italic; padding: 0.4rem 0; }

.stats-partner-row {
  display: flex; align-items: center; gap: 0.65rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.stats-partner-row:hover { border-color: rgba(255, 118, 0, 0.25); transform: translateX(2px); }
.stats-partner-row img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.stats-partner-info { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.stats-partner-name { font-size: 0.86rem; font-weight: 700; color: var(--text-main); }
.stats-partner-meta { font-size: 0.72rem; color: var(--text-muted); }
.stats-partner-actions { display: flex; align-items: center; gap: 0.4rem; flex-shrink: 0; }

.stats-recent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  gap: 1rem;
}
.srr-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  flex: 1;
}
.srr-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.stats-recent-mode {
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  font-size: 0.72rem;
  background: rgba(255, 118, 0, 0.1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 118, 0, 0.15);
  flex-shrink: 0;
}
.stats-recent-server {
  color: var(--text-main);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.stats-recent-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.stats-recent-date {
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 500;
}
.status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.status-badge.validated {
  background: rgba(0, 230, 118, 0.08);
  color: var(--green);
  border: 1px solid rgba(0, 230, 118, 0.15);
}
.status-badge.unvalidated {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.teammate-stacked-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #141517;
  margin-left: -5px;
  transition: transform 0.2s, z-index 0.2s;
  cursor: pointer;
  position: relative;
}
.teammate-stacked-avatar:first-child {
  margin-left: 0;
}
.teammate-stacked-avatar:hover {
  transform: translateY(-2px) scale(1.2);
  z-index: 10;
}

/* ── Analytics: community play stats ───────────────────────────── */
.community-stats-panel {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.2rem;
}
.cs-totals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}
.cs-total-card {
  background: linear-gradient(135deg, rgba(255, 118, 0, 0.07), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 118, 0, 0.15);
  border-radius: 10px;
  padding: 0.9rem;
  display: flex; flex-direction: column; gap: 0.2rem; align-items: center;
}
.cs-total-value { font-family: var(--font-title); font-size: 1.4rem; font-weight: 800; color: #fff; }
.cs-total-label { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-weight: 700; text-align: center; }

.cs-boards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.cs-board {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem;
  text-align: left;
}
.cs-board-title {
  display: flex; align-items: center; gap: 0.45rem;
  font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-bottom: 0.6rem;
}
.cs-board-title svg, .cs-board-title i { width: 14px; height: 14px; color: var(--primary); }
.cs-row {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.45rem;
  border-radius: 7px;
  transition: background 0.2s ease;
}
.cs-row:hover { background: rgba(255, 255, 255, 0.025); }
.cs-rank {
  font-family: var(--font-title); font-weight: 800; font-size: 0.75rem;
  color: var(--text-dark); min-width: 26px;
}
.cs-rank.top { color: var(--primary); }
.cs-row img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; }
.cs-duo-avatars { display: flex; }
.cs-duo-avatars img:last-child { margin-left: -8px; border: 1.5px solid var(--bg-secondary); }
.cs-name {
  flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; color: var(--text-main);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cs-value { font-family: var(--font-title); font-weight: 700; font-size: 0.8rem; color: var(--primary); }

/* ── Global polish ─────────────────────────────────────────────── */
/* Cards lift subtly; buttons get a satisfying press */
.lfg-card {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease, box-shadow 0.3s ease;
}
.lfg-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 118, 0, 0.25);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.btn { transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease; }
.btn:active { transform: scale(0.97); }

/* Modal entrance: smooth roll-down feel */
.modal-overlay .modal-container {
  transform: translateY(-14px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.modal-overlay.active .modal-container {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Twitch Drops active campaign pulsing alert */
.tab-btn.pulsing-active {
  animation: tabFlashPulse 2s infinite ease-in-out;
  border-color: rgba(145, 71, 255, 0.4) !important;
}

@keyframes tabFlashPulse {
  0%, 100% {
    background: rgba(145, 71, 255, 0.05);
    box-shadow: 0 0 0 rgba(145, 71, 255, 0);
  }
  50% {
    background: rgba(145, 71, 255, 0.22);
    box-shadow: 0 0 12px rgba(145, 71, 255, 0.35);
    color: #a970ff !important;
  }
}

/* Always display the rating modal on top of other modals (like the profile/inbox modal) */
#rating-modal {
  z-index: 100000 !important;
}

/* =============================================================
 * UPDATE HUB STYLES (Phase 6)
 * ============================================================= */

/* Tab signalization: Pulsing dot (orange glow) */
.tab-btn {
  position: relative;
}
.tab-btn .update-dot {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 7px;
  height: 7px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
  animation: pulseDot 1.5s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.4);
    opacity: 1;
    box-shadow: 0 0 12px var(--primary);
  }
}

/* Filter pills active state override */
.filter-pill {
  border-radius: 20px !important;
  font-size: 0.8rem !important;
  padding: 0.45rem 1.1rem !important;
  transition: all 0.2s ease-in-out !important;
}
.filter-pill.active {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  box-shadow: 0 0 10px var(--primary-glow) !important;
}

/* Hero Update Card */
.updates-hero-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 1.5rem;
}

.updates-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(14, 15, 17, 0.2) 0%, rgba(14, 15, 17, 0.95) 100%);
  z-index: 1;
}

.updates-hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  text-align: left;
}

.updates-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 118, 0, 0.12);
  border: 1px solid rgba(255, 118, 0, 0.25);
  color: var(--primary);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.updates-hero-badge .pulse-dot {
  width: 6px;
  height: 6px;
  background-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--green);
  animation: pulseDotGreen 1.5s infinite ease-in-out;
}

.updates-hero-badge.wipe-countdown .pulse-dot {
  background-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

@keyframes pulseDotGreen {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; box-shadow: 0 0 8px var(--green); }
}

.updates-hero-title {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.updates-hero-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
  margin-bottom: 1.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.updates-hero-actions {
  display: flex;
  gap: 0.75rem;
}

.updates-hero-actions .btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Timeline Components */
.updates-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid rgba(255, 255, 255, 0.05);
  margin-left: 0.75rem;
  text-align: left;
}

.updates-timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.updates-timeline-item:last-child {
  margin-bottom: 0.5rem;
}

.updates-timeline-dot {
  position: absolute;
  left: -2.35rem;
  top: 1.5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 6px var(--primary);
  border: 2px solid var(--bg-primary);
}

.updates-timeline-card {
  background: rgba(30, 30, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  transition: all 0.25s ease-in-out;
  backdrop-filter: blur(6px);
}

.updates-timeline-card:hover {
  border-color: rgba(255, 118, 0, 0.15);
  background: rgba(30, 30, 42, 0.35);
  transform: translateX(4px);
}

.updates-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.updates-card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.updates-card-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.updates-tag {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.tag-update { background: rgba(255, 118, 0, 0.1); color: var(--primary); border: 1px solid rgba(255, 118, 0, 0.2); }
.tag-hotfix { background: rgba(255, 23, 68, 0.1); color: var(--red); border: 1px solid rgba(255, 23, 68, 0.2); }
.tag-news { background: rgba(41, 121, 255, 0.1); color: var(--blue); border: 1px solid rgba(41, 121, 255, 0.2); }
.tag-community { background: rgba(0, 230, 118, 0.1); color: var(--green); border: 1px solid rgba(0, 230, 118, 0.2); }

.updates-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.updates-card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.updates-card-title a:hover {
  color: var(--primary);
}

.updates-card-summary {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
  margin-bottom: 0.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.updates-card-link {
  font-size: 0.8rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  transition: opacity 0.2s;
}

.updates-card-link:hover {
  opacity: 0.8;
}

.updates-card-right {
  width: 140px;
  height: 85px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.updates-card-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Videos Grid Components */
.updates-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.2rem;
  text-align: left;
}

.video-card {
  background: rgba(30, 30, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease-in-out;
}

.video-card:hover {
  border-color: rgba(255, 118, 0, 0.15);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.video-thumbnail-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: #000;
  cursor: pointer;
}

.video-thumbnail-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.video-card:hover .video-thumbnail-container img {
  transform: scale(1.04);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.2s;
}

.video-thumbnail-container:hover .video-play-overlay {
  background: rgba(0, 0, 0, 0.1);
}

.video-play-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 118, 0, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 118, 0, 0.5);
  transition: transform 0.2s, background 0.2s;
}

.video-thumbnail-container:hover .video-play-btn {
  transform: scale(1.15);
  background: rgba(255, 130, 20, 1);
}

.video-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.video-channel {
  font-size: 0.72rem;
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.video-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.45rem;
}

.video-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .updates-hero-card {
    min-height: 240px;
    padding: 1.25rem;
    background-image: linear-gradient(180deg, rgba(14, 15, 17, 0.8) 0%, rgba(14, 15, 17, 0.98) 100%) !important;
  }
  
  .updates-hero-title {
    font-size: 1.35rem;
  }
  
  .updates-timeline-card {
    flex-direction: column-reverse;
    gap: 0.8rem;
  }
  
  .updates-card-right {
    width: 100%;
    height: 140px;
  }
  
  .updates-timeline {
    padding-left: 1.25rem;
  }
  
  .updates-timeline-dot {
    left: -1.6rem;
  }
}

.timeline-video-preview {
  position: relative;
  cursor: pointer;
  background: #000;
}

