/* Réinitialisation et styles de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: url('back.jpeg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #000000;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: -1;
}

.app {
  display: flex;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
}

/* Styles de la barre latérale */
.sidebar {
  width: 280px;
  background-color: #121212;
  border-right: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: 1000;
  transition: transform 0.3s ease;
  overflow-x: hidden;
}

.sidebar-header {
  padding: 10px;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  overflow: hidden;
}

.sidebar-header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.sidebar-header .logo-icon {
  width: 185%;
  max-width: 100%;
  height: auto;
  max-height: 380px;
  object-fit: contain;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.logo-icon {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.mobile-close {
  display: none;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
}

.menu-section {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.menu-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 0 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.menu-item.active {
  background: #333;
  color: #ffffff;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid #2a2a2a;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  color: #9ca3af;
  text-decoration: none;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
  margin-bottom: 4px;
}

.social-link:hover {
  color: #ffffff;
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-top: 12px;
}

.theme-label {
  font-size: 14px;
  color: #9ca3af;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #ffffff;
}

input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #000000;
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* Contenu principal */
.main-content {
  flex: 1;
  margin-left: 280px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}

.top-header {
  background-color: #000000;
  border-bottom: 1px solid #2a2a2a;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  max-width: 100vw;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.welcome-title {
  font-size: 24px;
  font-weight: 700;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.account-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  width: 120px;
  height: 8px;
  background-color: #333;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: #ffffff;
  border-radius: 4px;
}

.total-points {
  font-size: 14px;
  font-weight: 500;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: white;
  background-color: #c814c8;
  background-repeat: no-repeat;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.referral-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  border-radius: 20px;
  font-size: 13px;
  color: #a78bfa;
}

.wallet-balance {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #0ea5e9;
  white-space: nowrap;
}

.api-credits {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 24px; /* un peu plus large pour 100 000+ */
  background: rgba(99, 102, 241, 0.12); /* indigo */
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #818cf8;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.account-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-label {
  font-size: 13px;
  color: #9ca3af;
}

.progress-bar {
  width: 120px;
  height: 6px;
  background: rgba(156, 163, 175, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.status-badge {
  width: 12px;
  height: 12px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.total-points {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #10b981;
}

.page-wrapper {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  max-width: 100%;
}

.page-content {
  padding: 32px;
  max-width: 1600px;
  margin: 0 auto;
}

/* En-tête de page */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Page Vue d'ensemble */
.welcome-header {
  margin-bottom: 32px;
}

.welcome-title {
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.wave-emoji {
  display: inline-block;
  animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
  0%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20%, 40% { transform: rotate(-8deg); }
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stat-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 20px;
  padding: 24px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.green {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.1) 100%);
  color: #10b981;
}

.stat-icon.purple {
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
  color: #a78bfa;
}

.stat-title {
  font-size: 14px;
  font-weight: 600;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  font-size: 12px;
  opacity: 0.5;
}

.stat-value {
  font-size: 48px;
  font-weight: 700;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
}

.manage-link {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  text-decoration: none;
}

.manage-link:hover {
  color: #f9fafb;
}

.node-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
}

.stat-card.large {
  grid-column: span 2;
}

.chart-placeholder {
  height: 220px;
  border-radius: 16px;
  background: radial-gradient(circle at top, rgba(16, 185, 129, 0.25), transparent 60%);
  border: 1px dashed rgba(75, 85, 99, 0.8);
}

.time-range-select {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid #374151;
  color: #f9fafb;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.stat-card.special {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}

.stat-card.special h2 {
  font-size: 18px;
  font-weight: 600;
}

.stat-card.special p {
  font-size: 14px;
  color: #9ca3af;
}

.node-status {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.stat-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.manage-btn {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.manage-btn:hover {
  background: rgba(16, 185, 129, 0.2);
}

.node-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.node-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.node-type {
  color: #9ca3af;
}

.node-value {
  font-size: 18px;
  font-weight: 700;
  color: #f9fafb;
}

.node-value.connected {
  color: #10b981;
}

/* Section de minage */
.mining-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 32px;
}

.mining-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.mining-section p {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 16px;
}

#mining-status {
    font-size: 14px;
    color: #9ca3af;
    min-height: 20px;
}

/* Section des graphiques */
.chart-section {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

.chart-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 20px;
  padding: 24px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.chart-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.filter-select {
  background: rgba(156, 163, 175, 0.1);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: #f9fafb;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}

.chart-container {
  margin-bottom: 20px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #9ca3af;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.season-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  border: 1px solid #3b82f6;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.season-badge {
  width: 64px;
  height: 64px;
  background: rgba(16, 185, 129, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.season-icon {
  width: 32px;
  height: 32px;
  color: #10b981;
}

.season-title {
  font-size: 32px;
  font-weight: 700;
  color: #10b981;
  margin-bottom: 12px;
  line-height: 1.2;
}

.season-subtitle {
  font-size: 16px;
  color: #9ca3af;
  margin-bottom: 24px;
}

.learn-more-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.learn-more-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 12px;
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #374151;
  color: #f9fafb;
  font-size: 14px;
}
.data-table thead th {
  background: rgba(31, 41, 55, 0.6);
  text-align: left;
}
.data-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
}
.link-btn {
  background: none;
  border: none;
  color: #93c5fd;
  cursor: pointer;
  text-decoration: underline;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal.open { display: flex; }
.modal-content {
  background: #111827;
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  max-width: 800px;
  width: 90%;
  color: #f9fafb;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.api-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.api-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  overflow: hidden;
}

.section-info-bubble {
  display: inline-block;
  margin: -8px 0 12px 0;
  padding: 6px 10px;
  background: rgba(99,102,241,0.15);
  color: #c7d2fe;
  border: 1px solid rgba(99,102,241,0.35);
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
}
.api-row { display:flex; align-items:center; justify-content: space-between; margin-bottom: 12px; }
.api-label { color:#9ca3af; font-size:13px; margin-bottom:4px; }
.api-key { font-family: 'Inter'; font-weight:600; }
.tasks-list { display:flex; flex-direction:column; gap:12px; }
.task-item {
  display:flex; align-items:center; justify-content:space-between;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151; border-radius: 12px; padding: 16px;
}
.task-title { font-weight:600; }
.task-desc { color:#9ca3af; font-size:13px; }
.task-actions { display:flex; align-items:center; gap:12px; }
.task-timer { color:#10b981; font-weight:600; min-width:48px; text-align:center; }
.shop-warning {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  border-radius: 12px;
  font-size: 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #374151;
  background: rgba(31,41,55,0.6);
  color: #f9fafb;
  font-size: 14px;
}

.season-decoration {
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1) 0%, transparent 70%);
}

/* Page des nœuds */
.add-node-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.add-node-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.3);
}

/* Shop Grid and Modals */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.shop-card .item-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: bold;
}

.shop-card .item-name {
    font-size: 1.2rem;
    font-weight: bold;
}

.shop-card .item-price {
    font-size: 1.5rem;
    color: #4CAF50;
    font-weight: bold;
}

.shop-modal-content {
    max-width: 500px;
    width: 90%;
}

.shop-modal-body {
    padding: 20px;
    color: #ccc;
    line-height: 1.6;
}

.shop-modal-details-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shop-detail-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.shop-detail-label {
    font-weight: bold;
    color: var(--primary-color);
}

.shop-detail-value {
    color: white;
}

/* Shop Sections */
.shop-section {
  margin-top: 32px;
}

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: #f9fafb;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.topup-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.2s ease;
}

.topup-card:hover {
  border-color: #3b82f6;
  transform: translateY(-4px);
}

.topup-amount {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.topup-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3b82f6;
  margin-bottom: 20px;
}

.costs-list {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 8px;
}

.faq-bubble-btn {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #0b1220;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
.faq-bubble-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 14px 40px rgba(0,0,0,0.45);
}
.faq-bubble-btn:active {
  transform: translateY(0);
}
.faq-chat-panel {
  position: fixed;
  right: 18px;
  bottom: 86px;
  width: min(360px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 120px));
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  overflow: hidden;
  z-index: 9999;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
  display: none;
  backdrop-filter: blur(10px);
}
.faq-chat-panel.open {
  display: flex;
  flex-direction: column;
}
.faq-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.faq-chat-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.faq-chat-title strong {
  font-size: 0.95rem;
  color: #f9fafb;
}
.faq-chat-title span {
  font-size: 0.75rem;
  color: #9ca3af;
}
.faq-chat-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-chat-controls select {
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(31,41,55,0.8);
  color: #f9fafb;
  font-size: 12px;
}
.faq-chat-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(31,41,55,0.6);
  color: #f9fafb;
  cursor: pointer;
}
.faq-chat-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
}
.faq-chat-msg {
  margin: 8px 0;
  display: flex;
}
.faq-chat-msg.user {
  justify-content: flex-end;
}
.faq-chat-msg.bot {
  justify-content: flex-start;
}
.faq-chat-bubble {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  color: #e5e7eb;
  font-size: 0.9rem;
  line-height: 1.35;
  white-space: pre-wrap;
}
.faq-chat-msg.user .faq-chat-bubble {
  background: rgba(16,185,129,0.14);
  border-color: rgba(16,185,129,0.25);
}
.faq-chat-msg.bot .faq-chat-bubble {
  background: rgba(31,41,55,0.75);
}
.faq-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 10px 12px;
}
.faq-pill {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(31,41,55,0.6);
  color: #f9fafb;
  padding: 6px 10px;
  border-radius: 9999px;
  font-size: 12px;
  cursor: pointer;
}
.faq-chat-input {
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.10);
}
.faq-chat-input textarea {
  flex: 1;
  resize: none;
  height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(31,41,55,0.55);
  color: #f9fafb;
  outline: none;
  font-size: 14px;
}
.faq-chat-send {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  background: #10b981;
  color: #0b1220;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.faq-support-btn {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(59,130,246,0.18);
  color: #f9fafb;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  margin-top: 8px;
}

.cost-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #374151;
}

.cost-item:last-child {
  border-bottom: none;
}

.cost-icon {
  font-size: 1.25rem;
  margin-right: 16px;
  width: 24px;
  text-align: center;
}

.cost-label {
  flex: 1;
  font-weight: 500;
}

.cost-value {
  color: #9ca3af;
  font-weight: 600;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.plan-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.plan-card.recommended {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #1e3a8a 0%, #111827 100%);
}

/* Modal Header */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.close-btn {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: #f9fafb;
}

/* Shop Grid & Cards */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-card {
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.shop-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.shop-info {
    margin-bottom: 16px;
}

.shop-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.shop-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-actions {
    margin-top: auto;
}

/* Shop Modal Specifics */
.shop-modal-content {
    max-width: 500px;
}

.shop-modal-body {
    padding: 20px;
}

.shop-detail-type {
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.shop-detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
}

.shop-detail-desc {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 24px;
}

.shop-detail-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shop-detail-actions .profile-btn {
    width: 100%;
}

.plans-modal-content {
    max-width: 1200px;
  width: 95%;
  background: #0f172a;
  border: 1px solid #1e293b;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.plans-grid-modal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .plans-grid-modal {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .plans-grid-modal {
    grid-template-columns: 1fr;
  }
}

.plans-preview-simple {
  background: rgba(31, 41, 55, 0.4);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 20px;
}

.plan-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 280px;
}

.plan-card.recommended {
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

.plan-card.enterprise {
  border-color: #a855f7;
}

.plan-tag {
  position: absolute;
  top: 12px;
  right: -30px;
  background: #fbbf24;
  color: #000;
  padding: 4px 30px;
  font-size: 10px;
  font-weight: 800;
  transform: rotate(45deg);
  text-transform: uppercase;
}

.plan-tag.special {
  background: #a855f7;
  color: #fff;
}

.plan-name {
  font-size: 1.125rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #f1f5f9;
}

.plan-price {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: #fff;
}

.plan-period {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 12px;
}

.plan-points {
  color: #3b82f6;
  font-weight: 700;
  margin-bottom: 20px;
  font-size: 0.875rem;
  padding: 8px 12px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  display: inline-block;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
  flex: 1;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 0.875rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.plan-features li::before {
  content: "✓";
  margin-right: 10px;
  color: #10b981;
  font-weight: 900;
}

.plan-card .profile-btn {
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}

.nodes-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.node-stat-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.node-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.node-stat-card.active {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.node-stat-icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 12px;
  color: #10b981;
}

.node-stat-info {
  flex: 1;
}

.node-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #f9fafb;
}

.node-stat-label {
  font-size: 13px;
  color: #9ca3af;
}

.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.node-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.node-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  border-color: #10b981;
}

.node-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #374151;
}

.node-name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #f9fafb;
}

.node-status {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-connected {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.status-disconnected {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.status-maintenance {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.node-card-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.node-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.metric-label {
  font-size: 13px;
  color: #9ca3af;
}

.metric-value {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
}

.metric-value.highlight {
  color: #10b981;
}

.node-card-footer {
  display: flex;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid #374151;
}

.node-action-btn {
  flex: 1;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #10b981;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.node-action-btn:hover {
  background: rgba(16, 185, 129, 0.2);
}

.node-action-btn.secondary {
  background: rgba(156, 163, 175, 0.1);
  border-color: rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.node-action-btn.secondary:hover {
  background: rgba(156, 163, 175, 0.2);
}

/* Page des récompenses */
.rewards-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.summary-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.summary-card.total {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.summary-icon {
  width: 40px;
  height: 40px;
  color: #10b981;
}

.summary-color {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.summary-color.network {
  background: #a78bfa;
}

.summary-color.referrals {
  background: #6366f1;
}

.summary-color.boost {
  background: #fbbf24;
}

.summary-color.bonus {
  background: #10b981;
}

.summary-info {
  flex: 1;
}

.summary-label {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.summary-value {
  font-size: 24px;
  font-weight: 700;
  color: #f9fafb;
}

.rewards-table-container {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  overflow-x: auto;
}

.rewards-table {
  width: 100%;
  border-collapse: collapse;
}

.rewards-table thead tr {
  border-bottom: 2px solid #374151;
}

.rewards-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.rewards-table td {
  padding: 16px;
  font-size: 15px;
  border-bottom: 1px solid #374151;
}

.rewards-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
}

.date-cell {
  color: #9ca3af;
}

.network-cell {
  color: #a78bfa;
  font-weight: 600;
}

.referrals-cell {
  color: #6366f1;
  font-weight: 600;
}

.boost-cell {
  color: #fbbf24;
  font-weight: 600;
}

.bonus-cell {
  color: #10b981;
  font-weight: 600;
}

.total-cell {
  color: #f9fafb;
  font-weight: 700;
  font-size: 16px;
}

/* Page des parrainages */
.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.referral-stat {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s ease;
}

.referral-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.referral-stat-icon {
  width: 48px;
  height: 48px;
  padding: 12px;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  color: #6366f1;
}

.referral-stat-info {
  flex: 1;
}

.referral-stat-label {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 4px;
}

.referral-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #f9fafb;
}

.referral-link-section {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
}

.referral-link-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.referral-link-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.referral-input {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.referral-input input {
  flex: 1;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid #374151;
  color: #f9fafb;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.copy-btn {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border: none;
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.referrals-list {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 24px;
}

.referrals-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.referrals-list-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.referral-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #374151;
}

.referral-item:last-child {
  border-bottom: none;
}

.referral-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
}

.referral-info {
  flex: 1;
}

.referral-name {
  font-size: 15px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 4px;
}

.referral-date {
  font-size: 13px;
  color: #9ca3af;
}

.referral-points {
  font-size: 14px;
  font-weight: 600;
  color: #10b981;
}

/* Page de profil */
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.profile-container {
  display: grid;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}

.profile-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 18px;
}

.profile-highlights {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.profile-highlight {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
}

.profile-highlight-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #94a3b8;
  text-transform: uppercase;
}

.profile-highlight-value {
  margin-top: 6px;
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.profile-highlight-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-highlight-sub-sep {
  opacity: 0.5;
}

.rank-progress-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.rank-progress-meta {
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
}

.rank-progress-bar {
  margin-top: 10px;
  height: 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow: hidden;
}

.rank-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #22c55e 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.rank-progress-markers {
  position: relative;
  height: 26px;
  margin-top: 10px;
}

.rank-marker {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.rank-marker::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin: 0 auto 5px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.rank-marker span {
  font-size: 10px;
  color: #94a3b8;
  white-space: nowrap;
}

.rank-marker.is-shifted {
  top: 12px;
}

.profile-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.profile-top-actions .profile-btn {
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.profile-subsections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.profile-section-card {
  background: rgba(2, 6, 23, 0.25);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  padding: 14px;
}

.profile-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 800;
  color: #e5e7eb;
}

.profile-info-bubble {
  background: #1e293b;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #334155;
  margin-bottom: 12px;
  font-size: 0.95em;
  color: #cbd5e1;
  line-height: 1.5;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 24px;
  color: white;
  background-color: #c814c8;
  background-repeat: no-repeat;
}

.profile-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 4px;
}

.profile-info p {
  font-size: 14px;
  color: #9ca3af;
}

.profile-field {
  margin-bottom: 14px;
}

.profile-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #9ca3af;
  margin-bottom: 6px;
}

.profile-field input {
  width: 100%;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid #374151;
  color: #f9fafb;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.profile-field input:focus {
  outline: none;
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.profile-actions {
  display: flex;
  gap: 12px;
}

.profile-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.profile-btn.primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.profile-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.profile-btn.secondary {
  background: rgba(156, 163, 175, 0.1);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: #9ca3af;
}

.profile-btn.secondary:hover {
  background: rgba(156, 163, 175, 0.2);
}

.profile-btn.danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.profile-btn.danger:hover {
  background: rgba(239, 68, 68, 0.2);
}

@media (max-width: 900px) {
  .profile-highlights {
    grid-template-columns: 1fr;
  }

  .profile-subsections {
    grid-template-columns: 1fr;
  }
}

.achievements-card {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid #374151;
  border-radius: 16px;
  padding: 18px;
}

.achievements-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.achievements-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.achievement-progress {
  font-size: 14px;
  color: #9ca3af;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.achievement-item {
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.achievement-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.achievement-item.unlocked {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.achievement-icon {
  width: 32px;
  height: 32px;
  color: #9ca3af;
}

.achievement-item.unlocked .achievement-icon {
  color: #10b981;
}

.achievement-info {
  flex: 1;
}

.achievement-name {
  font-size: 14px;
  font-weight: 600;
  color: #f9fafb;
  margin-bottom: 4px;
}

.achievement-desc {
  font-size: 12px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 86vw;
    max-width: 320px;
  }
  
  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-header {
    height: 180px;
    padding: 16px 12px;
  }

  .sidebar-header .logo-icon {
    width: 100%;
    max-height: 160px;
  }

  .menu-section {
    padding: 16px 12px;
  }
  
  .main-content {
    margin-left: 0;
  }

  .top-header {
    padding: 12px 14px;
    gap: 12px;
    flex-wrap: wrap;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .mobile-close {
    display: block;
    position: absolute;
    top: 16px;
    right: 16px;
  }
  
  .header-info {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-left: 0;
    padding-bottom: 2px;
  }

  .header-info > * {
    flex: 0 0 auto;
  }

  .total-points,
  .wallet-balance,
  .api-credits {
    min-width: auto;
    padding: 6px 10px;
    font-size: 13px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  #lang-switch {
    padding: 6px 8px;
  }

  #header-logout-btn {
    padding: 10px 14px;
  }

  .page-content {
    padding: 16px;
  }

  .data-table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    white-space: nowrap;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page-title {
    font-size: 26px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .stat-value {
    font-size: 36px;
  }

  .season-title {
    font-size: 26px;
  }

  .api-section {
    grid-template-columns: 1fr;
  }

  .api-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .api-key {
    word-break: break-all;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .admin-support-layout {
    flex-direction: column;
    height: auto;
  }

  .admin-ticket-list,
  .ticket-list-panel,
  .user-details-panel {
    width: 100%;
    max-width: 100%;
  }

  .admin-user-info-panel {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 85%;
  }

  body {
    background-attachment: scroll;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .stat-card.large {
    grid-column: span 1;
  }
  
  .chart-section {
    grid-template-columns: 1fr;
  }
  
  .profile-grid {
    grid-template-columns: 1fr;
  }
  
  .nodes-grid {
    grid-template-columns: 1fr;
  }
  
  .referral-stats-grid {
    grid-template-columns: 1fr;
  }
  
  .referral-input {
    flex-direction: column;
  }
  
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .top-header {
    padding: 10px 12px;
  }

  .page-content {
    padding: 12px;
  }

  .page-title {
    font-size: 24px;
  }

  .welcome-title {
    font-size: 24px;
  }

  .stat-card {
    padding: 16px;
  }

  .stat-value {
    font-size: 32px;
  }

  .sidebar-header {
    height: 160px;
  }
}

/* --- Rank Badges Styles --- */
.header-user-rank,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

.rank-badge-bronze {
  background: linear-gradient(135deg, #cd7f32, #8b4513);
  color: #fff;
  border-color: #cd7f32;
  box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

.rank-badge-silver {
  background: linear-gradient(135deg, #e0e0e0, #a9a9a9);
  color: #333;
  border-color: #c0c0c0;
  box-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.rank-badge-gold {
  background: linear-gradient(135deg, #ffd700, #daa520);
  color: #fff;
  border-color: #ffd700;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.rank-badge-platinum {
  background: linear-gradient(135deg, #e5e4e2, #708090);
  color: #fff;
  border-color: #e5e4e2;
  box-shadow: 0 0 15px rgba(229, 228, 226, 0.4);
}

.rank-badge-diamond {
  background: linear-gradient(135deg, #b9f2ff, #00bfff);
  color: #fff;
  border-color: #00bfff;
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
  100% { filter: brightness(1); }
}

/* Reduce flicker on initial load */
.preload * {
  animation: none !important;
  transition: none !important;
}

/* --- Support Section --- */
.support-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.support-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 30, 0.5);
}

.support-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.ticket-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticket-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.ticket-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-open { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.status-closed { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

.chat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
}

.message-user {
    align-self: flex-end;
    background: #3b82f6;
    color: white;
    border-bottom-right-radius: 2px;
}

.message-admin {
    align-self: flex-start;
    background: #374151;
    color: #e5e7eb;
    border-bottom-left-radius: 2px;
}

.message-image {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
    cursor: pointer;
}

.admin-support-layout {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.admin-ticket-list {
    width: 300px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
}

.admin-ticket-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.admin-user-info-panel {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    font-size: 0.9rem;
}

.admin-user-info-item {
    display: flex;
    flex-direction: column;
}

.admin-user-info-label {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.admin-user-info-value {
    color: #e5e7eb;
    font-weight: 500;
}

.badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 6px;
  font-size: 10px;
  line-height: 1;
}
.badge-warning {
  background: #f59e0b;
  color: #000;
}

.ticket-item.active {
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid #3b82f6;
}
    margin-top: 8px;
    cursor: pointer;
}

.ticket-status {
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 12px;
}
.status-open {
  background: rgba(34,197,94,0.2);
  color: #22c55e;
}
.status-closed {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}
.status-pending,
.status-pending_admin,
.status-pending_user {
  background: rgba(245,158,11,0.2);
  color: #f59e0b;
}

.chat-input-area {
    padding: 16px;
    background: rgba(30, 30, 30, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    color: white;
    resize: none;
    height: 44px;
    line-height: 22px;
}

.chat-attach-btn {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s;
}

.chat-attach-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.chat-send-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.admin-support-layout {
    display: flex;
    height: calc(100vh - 100px);
    gap: 16px;
}

.ticket-list-panel {
    width: 300px;
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.chat-panel {
    flex: 1;
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.user-details-panel {
    width: 280px;
    background: rgba(18, 18, 18, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    display: none; /* Hidden by default */
}

.user-details-panel.visible {
    display: block;
}

.admin-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.chip-btn {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1;
  border-radius: 9999px;
  border: 1px solid #334155;
  background: rgba(17, 24, 39, 0.7);
  color: #e5e7eb;
  cursor: pointer;
  transition: all .15s ease;
  white-space: nowrap;
}
.chip-btn:hover {
  background: rgba(31, 41, 55, 0.8);
  border-color: #475569;
}
.chip-btn.primary {
  border-color: #10b981;
  color: #10b981;
}
.chip-btn.danger {
  border-color: #ef4444;
  color: #ef4444;
}
.chip-btn.warning {
  border-color: #f59e0b;
  color: #f59e0b;
}

/* Stabilise l'entête (évite les sauts lors de l'actualisation) */
.total-points { min-width: 140px; }
.wallet-balance { min-width: 150px; }
.api-credits { min-width: 110px; }

@media (max-width: 768px) {
  .total-points,
  .wallet-balance,
  .api-credits {
    min-width: auto;
  }
}

/* Évite un flash lors de mises à jour de texte */
.total-points, .wallet-balance, .api-credits {
  transition: none !important;
}

@media (max-width: 768px) {
  .admin-support-layout {
    flex-direction: column;
    height: auto;
  }

  .admin-ticket-list,
  .ticket-list-panel,
  .user-details-panel {
    width: 100%;
    max-width: 100%;
  }

  .admin-user-info-panel {
    grid-template-columns: 1fr;
  }
}

:root {
  --rn-bg: #06070b;
  --rn-card: rgba(17, 19, 24, 0.92);
  --rn-card-2: rgba(12, 14, 18, 0.72);
  --rn-border: rgba(255, 255, 255, 0.08);
  --rn-text: #e5e7eb;
  --rn-muted: #9ca3af;
  --rn-strong: #ffffff;
  --rn-accent: #10b981;
  --rn-accent-2: #a78bfa;
  --rn-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

body {
  background-image: none;
  background:
    radial-gradient(1200px circle at 20% 0%, rgba(99, 102, 241, 0.12), transparent 60%),
    radial-gradient(900px circle at 70% 20%, rgba(16, 185, 129, 0.10), transparent 60%),
    radial-gradient(900px circle at 50% 110%, rgba(59, 130, 246, 0.10), transparent 65%),
    var(--rn-bg);
}

body::before {
  background-color: rgba(0, 0, 0, 0);
}

.sidebar {
  background-color: rgba(10, 11, 14, 0.92);
  border-right: 1px solid var(--rn-border);
}

.top-header {
  background: rgba(6, 7, 11, 0.55);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rn-border);
}

.menu-item.active {
  background: rgba(255, 255, 255, 0.06);
}

.stat-card,
.chart-card,
.mining-section,
.data-table {
  background: var(--rn-card);
  border: 1px solid var(--rn-border);
  box-shadow: var(--rn-shadow);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 65px rgba(0, 0, 0, 0.55);
}

.stat-title,
.stat-label,
.node-type,
.legend-item,
.status-label {
  color: var(--rn-muted);
}

.stat-value {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: var(--rn-strong);
  background-clip: initial;
  color: var(--rn-strong);
  letter-spacing: -0.02em;
}

.season-rewards .stat-value {
  color: var(--rn-strong);
  -webkit-text-fill-color: var(--rn-strong);
}

.today-rewards .stat-value {
  color: var(--rn-strong);
  -webkit-text-fill-color: var(--rn-strong);
}

.total-points {
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(16, 185, 129, 0.18);
  color: var(--rn-accent);
}

.wallet-balance {
  background: rgba(14, 165, 233, 0.10);
  border: 1px solid rgba(14, 165, 233, 0.18);
}

.api-credits {
  background: rgba(99, 102, 241, 0.10);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.manage-btn {
  border-radius: 9999px;
  padding: 8px 14px;
}

.node-details {
  gap: 10px;
}

.node-row {
  background: var(--rn-card-2);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9999px;
  padding: 10px 14px;
}

.node-value {
  color: var(--rn-strong);
  font-variant-numeric: tabular-nums;
}

.node-value.connected {
  color: var(--rn-accent);
}

.filter-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9999px;
}

.rewards-table,
.data-table {
  border-radius: 16px;
}

.rewards-table thead tr,
.data-table thead th {
  background: rgba(255, 255, 255, 0.03);
}

.rewards-table tbody tr:hover,
.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.season-card {
  background:
    radial-gradient(800px circle at 0% 0%, rgba(167, 139, 250, 0.28), transparent 55%),
    radial-gradient(600px circle at 100% 20%, rgba(16, 185, 129, 0.22), transparent 55%),
    rgba(15, 17, 22, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--rn-shadow);
}

.learn-more-btn {
  border-radius: 9999px;
}
