/* ==========================================================================
   Desire Client - Profile & Admin Stylesheet
   Designed in full harmony with the Desire Client cyber-glass aesthetic
   ========================================================================== */

/* Profile Layout Container */
.profile-page-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 100px 24px 80px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.profile-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

/* ==========================================================================
   Profile Navbar Additions
   ========================================================================== */
.nav-admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 4px 11px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.25);
}

.nav-admin-badge:hover {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fbbf24;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.45);
}

.nav-user-profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
  padding: 0 4px;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none !important;
  transition: opacity 0.2s ease, transform 0.2s ease;
  cursor: pointer;
}

.nav-user-profile-btn:hover {
  background: transparent !important;
  border: none !important;
  opacity: 0.88;
  transform: translateY(-1px);
}

.nav-user-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.35);
}

.nav-signout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-signout-btn:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.35);
  transform: scale(1.06);
}

.nav-signout-btn svg {
  display: block;
}

/* ==========================================================================
   Left Column: User Card & Actions
   ========================================================================== */
.profile-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* User Identity Card */
.profile-user-card {
  position: relative;
  background: rgba(13, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 26px 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-card-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.7;
  z-index: 1;
}

/* Avatar Container */
.profile-avatar-wrapper {
  position: relative;
  z-index: 2;
  margin-bottom: 16px;
}

.profile-avatar-img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #2b70ff;
  box-shadow: 0 0 24px rgba(43, 112, 255, 0.45);
  display: block;
  transition: transform 0.3s ease;
}

.profile-avatar-wrapper:hover .profile-avatar-img {
  transform: scale(1.03);
}

.profile-badge-pro {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: #10b981;
  color: #000000;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.5);
  border: 2px solid #0d111a;
}

/* Username & Role */
.profile-user-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.profile-username-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-username {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.01em;
}

.profile-role-badge {
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.profile-uid-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #8c9eb5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
}

.profile-sub-pill {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-sub-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* Sidebar Action Buttons */
.profile-actions-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-btn-row-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(13, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  user-select: none;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.20);
  transform: translateY(-1px);
}

.profile-btn:active {
  transform: translateY(0);
}

.profile-btn img,
.profile-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Action Buttons Theming */
.btn-color-download svg {
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}
.btn-color-download:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.25);
  color: #ffffff;
}

.btn-color-upgrade svg {
  color: #c084fc;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.5));
}
.btn-color-upgrade:hover {
  border-color: rgba(192, 132, 252, 0.5);
  box-shadow: 0 4px 20px rgba(192, 132, 252, 0.25);
  color: #ffffff;
}

.btn-color-activate svg {
  color: #34d399;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5));
}
.btn-color-activate:hover {
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.25);
  color: #ffffff;
}

/* Admin Panel Special Button */
.profile-btn-admin {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(217, 119, 6, 0.20) 100%);
  border: 1px solid rgba(245, 158, 11, 0.40);
  color: #fbbf24;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.20);
}

.profile-btn-admin svg {
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.profile-btn-admin:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 6px 26px rgba(245, 158, 11, 0.40);
}

/* Sign Out Button */
.profile-btn-signout {
  color: #f87171;
}

.profile-btn-signout svg {
  color: #f87171;
  filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.45));
}

.profile-btn-signout:hover {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   Right Column: Information Sections
   ========================================================================== */
.profile-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.profile-section-card {
  position: relative;
  background: rgba(13, 17, 26, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 24px 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.profile-info-glow {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  opacity: 0.5;
  z-index: 1;
  mask-image: linear-gradient(to right, transparent, black 60%);
  -webkit-mask-image: linear-gradient(to right, transparent, black 60%);
}

.profile-info-list {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-info-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-wrap: wrap;
  gap: 10px;
}

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

.profile-info-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e2e8f0;
  font-size: 0.94rem;
  font-weight: 500;
}

.profile-info-label svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: block;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.profile-info-label:hover svg {
  transform: scale(1.08);
}

.profile-info-label .icon-regdate {
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.profile-info-label .icon-expdate {
  color: #c084fc;
  filter: drop-shadow(0 0 6px rgba(192, 132, 252, 0.5));
}

.profile-info-label .icon-lastlog {
  color: #818cf8;
  filter: drop-shadow(0 0 6px rgba(129, 140, 248, 0.5));
}

.profile-info-label .icon-email {
  color: #38bdf8;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.profile-info-label .icon-password {
  color: #fbbf24;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.5));
}

.profile-info-label .icon-hwid {
  color: #34d399;
  filter: drop-shadow(0 0 6px rgba(52, 211, 153, 0.5));
}

.profile-info-label .icon-launches {
  color: #60a5fa;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.5));
}

.profile-info-label .icon-playtime {
  color: #22d3ee;
  filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.5));
}

.profile-info-value {
  font-size: 0.94rem;
  font-weight: 600;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-value-gradient {
  background: linear-gradient(135deg, #60a5fa 0%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.profile-hwid-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.08);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(14, 165, 233, 0.20);
  word-break: break-all;
}

/* Edit / Copy Inline Buttons */
.profile-inline-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-family: inherit;
  transition: all 0.2s ease;
}

.profile-inline-btn:hover {
  background: rgba(28, 100, 255, 0.20);
  border-color: #3b82f6;
  color: #ffffff;
}

.profile-inline-btn.btn-inline-change {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(56, 189, 248, 0.08);
}

.profile-inline-btn.btn-inline-change:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.profile-inline-btn.btn-inline-copy {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.profile-inline-btn.btn-inline-copy:hover {
  background: rgba(52, 211, 153, 0.22);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.35);
}

/* ==========================================================================
   Referral Card (Blurred with notice)
   ========================================================================== */
.referral-card-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
}

.referral-blurred-content {
  filter: blur(9px);
  user-select: none;
  pointer-events: none;
  opacity: 0.45;
}

.referral-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 20px;
  background: rgba(10, 13, 20, 0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 5;
}

.referral-notice-title {
  color: #94a3b8;
  font-size: 1.05rem;
  font-weight: 600;
}

.referral-notice-sub {
  color: #64748b;
  font-size: 0.86rem;
}

.referral-support-link {
  color: #3b82f6;
  font-size: 0.90rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
  margin-top: 2px;
}

.referral-support-link:hover {
  color: #60a5fa;
  text-decoration: underline;
}

/* ==========================================================================
   Admin Panel Modal / View
   ========================================================================== */
.admin-modal-card {
  max-width: 980px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 20px;
  gap: 16px;
}

.admin-title-area {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-badge-owner {
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.admin-badge-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  color: #34d399;
  font-weight: 600;
}

.admin-badge-online span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.admin-main-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.admin-sub-title {
  color: #8c9eb5;
  font-size: 0.82rem;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #8c9eb5;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.admin-tab-btn.active {
  background: rgba(28, 100, 255, 0.20);
  border: 1px solid rgba(43, 112, 255, 0.40);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(28, 100, 255, 0.25);
}

.admin-tab-btn:hover:not(.active) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

/* Admin Body Content */
.admin-tab-content {
  overflow-y: auto;
  padding-right: 4px;
  display: none;
  flex-direction: column;
  gap: 20px;
}

.admin-tab-content.active {
  display: flex;
}

/* Admin Table */
.admin-table-wrapper {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(10, 13, 20, 0.6);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.admin-table th {
  background: rgba(255, 255, 255, 0.04);
  padding: 12px 16px;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.admin-table td {
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

/* Key Generator Grid */
.admin-key-generator {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-key-form-row {
  display: grid;
  grid-template-columns: 2fr 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.admin-select,
.admin-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 10px 14px;
  color: #ffffff;
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  width: 100%;
}

.admin-select option {
  background: #0f131d;
  color: #ffffff;
}

.admin-select:focus,
.admin-input:focus {
  border-color: #2b70ff;
  box-shadow: 0 0 14px rgba(43, 112, 255, 0.3);
}

/* Generated Keys Display */
.admin-keys-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.admin-key-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.84rem;
}

/* Stats Cards in Admin */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.admin-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-stat-card-label {
  font-size: 0.76rem;
  color: #8c9eb5;
  font-weight: 500;
  text-transform: uppercase;
}

.admin-stat-card-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
}

/* Toast Notifications */
.toast-notification-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(14, 18, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-item.success {
  border-color: rgba(16, 185, 129, 0.4);
}

.toast-item.success svg {
  color: #10b981;
}

.toast-item.error {
  border-color: rgba(239, 68, 68, 0.4);
}

.toast-item.error svg {
  color: #ef4444;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 960px) {
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-sidebar {
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
  }
  .admin-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-key-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .profile-page-wrapper {
    padding-top: 80px;
    padding-left: 14px;
    padding-right: 14px;
  }
  .profile-section-card {
    padding: 18px 16px;
  }
  .admin-stats-row {
    grid-template-columns: 1fr;
  }
  .admin-modal-card {
    padding: 18px 14px;
  }
}
