/* ========================================
   Prediction Platform - Telegram Mini App
   Modern Dark Theme with Vibrant Accents
   ======================================== */

:root {
  /* Core Colors - Telegram Dark Theme Inspired */
  --bg-primary: #0f0f14;
  --bg-secondary: #1a1a24;
  --bg-tertiary: #252535;
  --bg-card: linear-gradient(145deg, #1e1e2e 0%, #151520 100%);
  
  /* Accent Colors */
  --accent-primary: #6c5ce7;
  --accent-secondary: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.4);
  
  /* Status Colors */
  --yes-color: #00d26a;
  --yes-glow: rgba(0, 210, 106, 0.3);
  --no-color: #ff4757;
  --no-glow: rgba(255, 71, 87, 0.3);
  --pending-color: #ffa502;
  
  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #a0a0b8;
  --text-muted: #6b6b80;
  
  /* Telegram Variables */
  --tg-theme-bg-color: var(--bg-primary);
  --tg-theme-text-color: var(--text-primary);
  --tg-theme-button-color: var(--accent-primary);
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* ========== Loading Screen ========== */
.screen {
  display: none;
  height: 100%;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

#loading-screen {
  justify-content: center;
  align-items: center;
  background: radial-gradient(ellipse at center, #1a1a2e 0%, var(--bg-primary) 70%);
}

.loader-container {
  text-align: center;
}

.pulse-loader {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent-primary);
  animation: pulse 1.5s ease-in-out infinite;
  margin: 0 auto 20px;
  box-shadow: 0 0 60px var(--accent-glow);
}

@keyframes pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.1); opacity: 1; }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  animation: fadeInOut 1.5s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* ========== Header ========== */
.app-header {
  background: var(--bg-secondary);
  padding: var(--spacing-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 600px;
  margin: 0 auto;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 10px var(--accent-glow));
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.balance-pill:active {
  transform: scale(0.98);
}

.balance-icon {
  font-size: 16px;
}

#header-balance {
  font-weight: 600;
  font-size: 15px;
}

.currency {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

/* ========== Navigation ========== */
.nav-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 8px;
  gap: 4px;
  flex-shrink: 0;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-tab.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.nav-tab:active {
  transform: scale(0.96);
}

.tab-icon {
  font-size: 20px;
}

.tab-text {
  font-size: 11px;
  font-weight: 500;
}

/* ========== Tab Content ========== */
.tab-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  -webkit-overflow-scrolling: touch;
}

.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-header h2, .section-header h3 {
  font-size: 18px;
  font-weight: 600;
}

.event-count {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ========== Events Grid ========== */
.events-grid {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.event-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.event-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--yes-color), var(--no-color));
  opacity: 0.8;
}

.event-card:active {
  transform: scale(0.98);
}

.event-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.4;
}

.event-description {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.event-odds {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.odds-box {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
}

.odds-box.yes {
  background: rgba(0, 210, 106, 0.1);
  border: 1px solid rgba(0, 210, 106, 0.3);
}

.odds-box.no {
  background: rgba(255, 71, 87, 0.1);
  border: 1px solid rgba(255, 71, 87, 0.3);
}

.odds-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.odds-box.yes .odds-label { color: var(--yes-color); }
.odds-box.no .odds-label { color: var(--no-color); }

.odds-value {
  font-size: 20px;
  font-weight: 700;
}

.event-pool {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.pool-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
  display: flex;
}

.pool-yes {
  background: var(--yes-color);
  transition: width 0.3s ease;
}

.pool-no {
  background: var(--no-color);
  transition: width 0.3s ease;
}

/* ========== Bets List ========== */
.bet-filters {
  display: flex;
  gap: 8px;
  margin-bottom: var(--spacing-md);
  overflow-x: auto;
  padding-bottom: 4px;
}

.filter-btn {
  padding: 8px 16px;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-btn.active {
  background: var(--accent-primary);
  color: white;
}

.bets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bet-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.bet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.bet-event-title {
  font-size: 14px;
  font-weight: 500;
  flex: 1;
  margin-right: 10px;
}

.bet-status {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.bet-status.pending {
  background: rgba(255, 165, 2, 0.15);
  color: var(--pending-color);
}

.bet-status.won {
  background: rgba(0, 210, 106, 0.15);
  color: var(--yes-color);
}

.bet-status.lost {
  background: rgba(255, 71, 87, 0.15);
  color: var(--no-color);
}

.bet-details {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.bet-side {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bet-side.yes { color: var(--yes-color); }
.bet-side.no { color: var(--no-color); }

.bet-amount {
  color: var(--text-secondary);
}

.bet-payout {
  font-weight: 600;
}

.bet-payout.won { color: var(--yes-color); }

/* ========== Wallet ========== */
.wallet-header {
  margin-bottom: var(--spacing-lg);
}

.wallet-balance-card {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #8b7cf5 100%);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  text-align: center;
  margin-bottom: var(--spacing-md);
  box-shadow: 0 10px 40px var(--accent-glow);
}

.wallet-label {
  font-size: 13px;
  opacity: 0.9;
  display: block;
  margin-bottom: 8px;
}

.wallet-amount {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
}

#wallet-balance {
  font-size: 42px;
  font-weight: 800;
}

.wallet-currency {
  font-size: 18px;
  font-weight: 500;
  opacity: 0.9;
}

.wallet-stats {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
}

.stat-label {
  opacity: 0.8;
}

.stat-value {
  font-weight: 600;
}

.wallet-actions {
  display: flex;
  gap: 12px;
}

.wallet-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.deposit-btn {
  background: var(--yes-color);
  color: white;
}

.withdraw-btn {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wallet-btn:active {
  transform: scale(0.98);
}

.transactions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
}

.tx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-type {
  font-size: 14px;
  font-weight: 500;
}

.tx-date {
  font-size: 12px;
  color: var(--text-muted);
}

.tx-amount {
  font-weight: 600;
  font-size: 14px;
}

.tx-amount.positive { color: var(--yes-color); }
.tx-amount.negative { color: var(--no-color); }

/* ========== Profile ========== */
.profile-header {
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 30px var(--accent-glow);
}

#profile-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-username {
  color: var(--text-secondary);
  font-size: 14px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: var(--spacing-lg);
}

.stat-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-secondary);
  margin-bottom: 4px;
}

.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.referral-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
}

.referral-section h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.referral-section p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.referral-code-box {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: var(--bg-tertiary);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

#referral-code {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
}

.copy-btn {
  padding: 6px 12px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.referral-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
}

.share-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #8b7cf5 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* ========== Empty State ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-secondary);
}

.empty-state.hidden {
  display: none;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 8px;
}

.empty-state span {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========== Modals ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: flex-end;
  padding: 16px;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--spacing-lg);
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-tertiary);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== Bet Modal ========== */
.bet-modal-content h3 {
  font-size: 18px;
  margin-bottom: 20px;
  padding-right: 40px;
}

.bet-side-selector {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.side-btn {
  flex: 1;
  padding: 20px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.side-btn.yes-btn:hover, .side-btn.yes-btn.selected {
  border-color: var(--yes-color);
  background: rgba(0, 210, 106, 0.1);
  box-shadow: 0 0 20px var(--yes-glow);
}

.side-btn.no-btn:hover, .side-btn.no-btn.selected {
  border-color: var(--no-color);
  background: rgba(255, 71, 87, 0.1);
  box-shadow: 0 0 20px var(--no-glow);
}

.side-icon {
  font-size: 28px;
}

.side-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.side-odds {
  font-size: 14px;
  color: var(--text-secondary);
}

.bet-amount-section {
  margin-bottom: 20px;
}

.bet-amount-section label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.amount-input-wrapper {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.amount-input-wrapper input {
  flex: 1;
  padding: 14px 16px;
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
}

.amount-input-wrapper input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.max-btn {
  padding: 14px 20px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  cursor: pointer;
}

.quick-amounts {
  display: flex;
  gap: 8px;
}

.quick-amounts button {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-amounts button:hover {
  border-color: var(--accent-primary);
  color: var(--accent-secondary);
}

.bet-summary {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 0;
}

.summary-row.highlight {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 8px;
  padding-top: 16px;
}

.place-bet-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all 0.2s ease;
}

.place-bet-btn.active {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #8b7cf5 100%);
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 30px var(--accent-glow);
}

.place-bet-btn.active:active {
  transform: scale(0.98);
}

/* ========== Withdraw Modal ========== */
.withdraw-form {
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  display: block;
}

.withdraw-summary {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--no-color);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

/* ========== Toast ========== */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 14px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 2000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success {
  background: var(--yes-color);
}

.toast.error {
  background: var(--no-color);
}

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 2px;
}

/* ========== Cash-Out Styles ========== */
.cashout-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.cashout-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cashout-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cashout-value {
  font-size: 16px;
  font-weight: 700;
}

.cashout-value.profit {
  color: var(--yes-color);
}

.cashout-value.loss {
  color: var(--no-color);
}

.cashout-value small {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.8;
  margin-left: 4px;
}

.cashout-btn {
  background: linear-gradient(135deg, #ffa502 0%, #ff6b35 100%);
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cashout-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 20px rgba(255, 165, 2, 0.3);
}

.cashout-btn:active {
  transform: scale(0.98);
}

/* Cash-Out Modal */
.cashout-modal-content {
  max-width: 380px;
}

.cashout-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.cashout-header h3 {
  font-size: 22px;
  font-weight: 700;
}

.cashout-timer {
  background: rgba(255, 165, 2, 0.2);
  color: #ffa502;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.cashout-event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-secondary);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.cashout-event span:first-child {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  margin-right: 12px;
}

.cashout-side-badge {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.cashout-side-badge.yes {
  background: rgba(0, 210, 106, 0.2);
  color: var(--yes-color);
}

.cashout-side-badge.no {
  background: rgba(255, 71, 87, 0.2);
  color: var(--no-color);
}

.cashout-details {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.cashout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.cashout-row .cashout-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: normal;
}

.cashout-row .cashout-value {
  font-size: 14px;
  font-weight: 600;
}

.cashout-row.discount .cashout-value {
  color: var(--no-color);
  font-size: 13px;
}

.cashout-row.offer {
  margin-top: 8px;
  padding-top: 12px;
}

.cashout-row.offer .cashout-label {
  font-weight: 600;
  color: var(--text-primary);
}

.cashout-row.offer .cashout-value.highlight {
  font-size: 20px;
  font-weight: 800;
  color: #ffa502;
}

.cashout-row.profit-row {
  padding-bottom: 4px;
}

.cashout-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 8px 0;
}

.cashout-explanation {
  background: rgba(108, 92, 231, 0.1);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 20px;
}

.cashout-explanation p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cashout-confirm-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #ffa502 0%, #ff6b35 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.cashout-confirm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 165, 2, 0.4);
}

.cashout-confirm-btn:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cashout-cancel-btn {
  width: 100%;
  padding: 14px;
  background: transparent;
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cashout-cancel-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

/* Bet Status Update */
.bet-status.cashed_out {
  background: rgba(255, 165, 2, 0.2);
  color: #ffa502;
}

.bet-payout.cashed {
  color: #ffa502;
  font-weight: 600;
}

/* Toast warning style */
.toast.warning {
  background: #ffa502;
  color: #1a1a24;
}

/* ========== Deposit Modal Styles ========== */
.deposit-modal-content {
  max-width: 380px;
}

.deposit-info {
  padding: 8px 0;
}

.deposit-address-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.deposit-address-box label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: block;
}

.address-display {
  display: flex;
  align-items: center;
  gap: 10px;
}

.address-display code {
  flex: 1;
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  word-break: break-all;
  color: var(--yes-color);
  font-family: 'JetBrains Mono', monospace;
}

.address-display .copy-btn {
  padding: 10px 14px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 16px;
}

.deposit-details {
  margin-bottom: 16px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 14px;
}

.detail-row span:first-child {
  color: var(--text-muted);
}

.network-badge {
  background: rgba(0, 210, 106, 0.2);
  color: var(--yes-color);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}

.deposit-warning {
  background: rgba(255, 165, 2, 0.1);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
}

.deposit-warning p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0;
}

.deposit-warning strong {
  color: #ffa502;
}

.link-wallet-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 16px;
}

.link-wallet-section p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.link-wallet-form {
  display: flex;
  gap: 10px;
}

.link-wallet-form input {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-tertiary);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 13px;
}

.btn-link-wallet {
  padding: 12px 16px;
  background: var(--accent-primary);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

/* ========== Platform Volume Trust Bar ========== */
.platform-volume-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(162, 155, 254, 0.1) 100%);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: var(--spacing-md);
}

.volume-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.volume-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.volume-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.volume-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-secondary);
}

.volume-users {
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ========== PNL Sharing Section ========== */
.pnl-share-section {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.pnl-share-section h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.pnl-share-section > p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.pnl-card {
  background: linear-gradient(145deg, #1e1e2e 0%, #252535 100%);
  border: 1px solid rgba(108, 92, 231, 0.3);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin-bottom: 16px;
  text-align: left;
}

.pnl-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pnl-logo {
  font-weight: 700;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pnl-date {
  font-size: 11px;
  color: var(--text-muted);
}

.pnl-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.pnl-stat {
  flex: 1;
  text-align: center;
}

.pnl-stat .pnl-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 4px;
}

.pnl-stat .pnl-value {
  font-size: 20px;
  font-weight: 800;
}

.pnl-stat .pnl-value.positive {
  color: var(--yes-color);
}

.pnl-stat .pnl-value.negative {
  color: var(--no-color);
}

.pnl-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-secondary);
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.share-pnl-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #8b7cf5 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.share-pnl-btn:active {
  transform: scale(0.98);
}

/* ========== Wallet Trust Bar ========== */
.wallet-trust-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 210, 106, 0.1) 0%, rgba(0, 180, 90, 0.05) 100%);
  border: 1px solid rgba(0, 210, 106, 0.25);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: var(--spacing-md);
}

.trust-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.trust-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trust-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--yes-color);
}

.trust-badge {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(0, 210, 106, 0.15);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  font-weight: 600;
}

/* ========== Open PNL Card Button ========== */
.open-pnl-card-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #00d26a 0%, #00b35a 100%);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.open-pnl-card-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.open-pnl-card-btn:hover::before {
  left: 100%;
}

.open-pnl-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 210, 106, 0.4);
}

.open-pnl-card-btn .btn-icon {
  font-size: 24px;
}

.open-pnl-card-btn .btn-arrow {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.open-pnl-card-btn:hover .btn-arrow {
  transform: translateX(4px);
}

/* ========== Premium PNL Card Modal ========== */
.pnl-modal-overlay {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.pnl-modal-content {
  background: transparent;
  max-width: 400px;
  padding: 20px;
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pnl-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  z-index: 100;
}

/* Card Container with 3D Effect */
.pnl-card-container {
  position: relative;
  perspective: 1000px;
  display: flex;
  justify-content: center;
}

/* Stacked Cards Effect */
.pnl-card-stack {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
}

.stack-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(0, 210, 106, 0.3) 0%, rgba(0, 150, 80, 0.2) 100%);
  border: 1px solid rgba(0, 210, 106, 0.2);
}

.stack-card.stack-1 {
  transform: translateX(8px) translateY(8px) rotate(3deg);
  opacity: 0.4;
}

.stack-card.stack-2 {
  transform: translateX(16px) translateY(16px) rotate(6deg);
  opacity: 0.2;
}

/* Main Premium PNL Card */
.premium-pnl-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  background: linear-gradient(145deg, #0a1f0f 0%, #0d2815 50%, #071a0a 100%);
  border-radius: 20px;
  padding: 24px;
  border: 1px solid rgba(0, 210, 106, 0.4);
  box-shadow: 
    0 0 60px rgba(0, 210, 106, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  overflow: hidden;
  z-index: 1;
}

/* Animated Background */
.pnl-card-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.pnl-glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: float 8s ease-in-out infinite;
}

.pnl-glow-orb.orb-1 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 210, 106, 0.4) 0%, transparent 70%);
  top: -50px;
  right: -50px;
  animation-delay: 0s;
}

.pnl-glow-orb.orb-2 {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0, 180, 90, 0.3) 0%, transparent 70%);
  bottom: -30px;
  left: -30px;
  animation-delay: -4s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(10px, -10px) scale(1.05); }
  50% { transform: translate(-5px, 10px) scale(0.95); }
  75% { transform: translate(-10px, -5px) scale(1.02); }
}

.pnl-grid-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 210, 106, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 210, 106, 0.03) 1px, transparent 1px);
  background-size: 30px 30px;
}

/* Card Header */
.pnl-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.pnl-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 10px rgba(0, 210, 106, 0.5));
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, #00d26a 0%, #00ff80 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 210, 106, 0.5);
}

.pnl-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(0, 210, 106, 0.2);
}

.pnl-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d26a, #00b35a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pnl-username {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

/* Main PNL Display */
.pnl-main-display {
  text-align: center;
  margin: 30px 0;
  position: relative;
  z-index: 2;
}

.pnl-percentage-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  margin-bottom: 8px;
}

.pnl-sign {
  font-size: 36px;
  font-weight: 900;
  color: #00ff80;
  text-shadow: 0 0 30px rgba(0, 255, 128, 0.5);
  line-height: 1;
}

.pnl-percentage {
  font-size: 72px;
  font-weight: 900;
  color: #00ff80;
  line-height: 1;
  text-shadow: 
    0 0 40px rgba(0, 255, 128, 0.6),
    0 0 80px rgba(0, 255, 128, 0.3);
  font-family: 'Outfit', system-ui, sans-serif;
  letter-spacing: -3px;
}

.pnl-percent-symbol {
  font-size: 28px;
  font-weight: 800;
  color: #00ff80;
  opacity: 0.8;
  margin-top: 8px;
}

.pnl-amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.pnl-amount-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
}

.pnl-amount-value {
  font-size: 20px;
  font-weight: 700;
  color: #00ff80;
}

/* Negative PNL styles */
.premium-pnl-card.negative {
  background: linear-gradient(145deg, #1f0a0a 0%, #280d0d 50%, #1a0707 100%);
  border-color: rgba(255, 71, 87, 0.4);
  box-shadow: 
    0 0 60px rgba(255, 71, 87, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.premium-pnl-card.negative .pnl-glow-orb.orb-1 {
  background: radial-gradient(circle, rgba(255, 71, 87, 0.4) 0%, transparent 70%);
}

.premium-pnl-card.negative .pnl-glow-orb.orb-2 {
  background: radial-gradient(circle, rgba(255, 100, 100, 0.3) 0%, transparent 70%);
}

.premium-pnl-card.negative .pnl-grid-lines {
  background-image: 
    linear-gradient(rgba(255, 71, 87, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 71, 87, 0.03) 1px, transparent 1px);
}

.premium-pnl-card.negative .brand-name {
  background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.premium-pnl-card.negative .pnl-sign,
.premium-pnl-card.negative .pnl-percentage,
.premium-pnl-card.negative .pnl-percent-symbol,
.premium-pnl-card.negative .pnl-amount-value {
  color: #ff4757;
  text-shadow: 0 0 40px rgba(255, 71, 87, 0.5);
}

.premium-pnl-card.negative .brand-icon {
  filter: drop-shadow(0 0 10px rgba(255, 71, 87, 0.5));
}

.premium-pnl-card.negative .stack-card {
  background: linear-gradient(145deg, rgba(255, 71, 87, 0.3) 0%, rgba(200, 50, 60, 0.2) 100%);
  border-color: rgba(255, 71, 87, 0.2);
}

.premium-pnl-card.negative .pnl-user-info,
.premium-pnl-card.negative .pnl-stat-item {
  border-color: rgba(255, 71, 87, 0.2);
}

.premium-pnl-card.negative .pnl-avatar {
  background: linear-gradient(135deg, #ff4757, #cc3a47);
}

/* Stats Row */
.pnl-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  border: 1px solid rgba(0, 210, 106, 0.15);
}

.pnl-stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.pnl-stat-item .stat-icon {
  font-size: 18px;
}

.pnl-stat-item .stat-content {
  display: flex;
  flex-direction: column;
}

.pnl-stat-item .stat-value {
  font-size: 18px;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

.pnl-stat-item .stat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pnl-stat-divider {
  width: 1px;
  height: 30px;
  background: rgba(255, 255, 255, 0.1);
}

/* Card Footer */
.pnl-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  position: relative;
  z-index: 2;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-date {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.footer-tag {
  font-size: 10px;
  color: rgba(0, 210, 106, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.footer-qr {
  width: 50px;
  height: 50px;
  background: white;
  border-radius: 8px;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-placeholder {
  width: 100%;
  height: 100%;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  width: 100%;
  height: 100%;
}

.qr-grid div {
  background: #000;
  border-radius: 1px;
}

.qr-grid div:nth-child(odd) {
  opacity: 0.9;
}

/* Mascot */
.pnl-mascot {
  position: absolute;
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  animation: bounce 3s ease-in-out infinite;
}

.mascot-character {
  font-size: 60px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

@keyframes bounce {
  0%, 100% { transform: translateY(-50%) rotate(-5deg); }
  50% { transform: translateY(-55%) rotate(5deg); }
}

/* Share Actions */
.pnl-share-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pnl-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.pnl-share-btn.primary {
  background: linear-gradient(135deg, #0088cc 0%, #0066aa 100%);
  color: white;
}

.pnl-share-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 136, 204, 0.4);
}

.pnl-share-btn.secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.pnl-share-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

.pnl-share-btn:active {
  transform: scale(0.98);
}

/* Animation for card entrance */
.pnl-modal-overlay.active .premium-pnl-card {
  animation: cardEntrance 0.5s ease forwards;
}

@keyframes cardEntrance {
  0% {
    opacity: 0;
    transform: scale(0.8) rotateY(-10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotateY(0);
  }
}

.pnl-modal-overlay.active .stack-card.stack-1 {
  animation: stackEntrance1 0.5s ease 0.1s forwards;
  opacity: 0;
}

.pnl-modal-overlay.active .stack-card.stack-2 {
  animation: stackEntrance2 0.5s ease 0.2s forwards;
  opacity: 0;
}

@keyframes stackEntrance1 {
  to { opacity: 0.4; }
}

@keyframes stackEntrance2 {
  to { opacity: 0.2; }
}

/* Shimmer effect on percentage */
.pnl-percentage {
  position: relative;
  background: linear-gradient(
    90deg,
    #00ff80 0%,
    #00ffaa 25%,
    #00ff80 50%,
    #00ffaa 75%,
    #00ff80 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to {
    background-position: 200% center;
  }
}

.premium-pnl-card.negative .pnl-percentage {
  background: linear-gradient(
    90deg,
    #ff4757 0%,
    #ff6b7a 25%,
    #ff4757 50%,
    #ff6b7a 75%,
    #ff4757 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ========== Risk Warning ========== */
/* ========== Trust Footer & Risk Warning ========== */
.trust-footer {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Security Badges */
.security-badges {
  display: flex;
  justify-content: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.15) 0%, rgba(108, 92, 231, 0.05) 100%);
  border: 1px solid rgba(108, 92, 231, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
}

.badge-icon {
  font-size: 14px;
}

.badge-text {
  letter-spacing: 0.3px;
}

/* Risk Warning */
.risk-warning {
  background: linear-gradient(135deg, rgba(255, 165, 2, 0.12) 0%, rgba(255, 100, 50, 0.08) 100%);
  border: 1px solid rgba(255, 165, 2, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
}

.risk-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-md);
  cursor: pointer;
  transition: background 0.2s ease;
}

.risk-header:hover {
  background: rgba(255, 165, 2, 0.05);
}

.risk-title {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.risk-icon {
  font-size: 18px;
}

.risk-title strong {
  color: #ffb347;
  font-size: 14px;
  font-weight: 600;
}

.risk-expand {
  color: var(--text-muted);
  font-size: 10px;
  transition: transform 0.3s ease;
}

.risk-expand.expanded {
  transform: rotate(180deg);
}

.risk-summary {
  padding: 0 var(--spacing-md) var(--spacing-md);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.risk-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: rgba(0, 0, 0, 0.2);
}

.risk-details.expanded {
  max-height: 300px;
  padding: var(--spacing-md);
}

.risk-details ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.risk-details li {
  font-size: 12px;
  color: var(--text-secondary);
  padding: var(--spacing-sm) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  line-height: 1.6;
}

.risk-details li:last-child {
  border-bottom: none;
}

.risk-details li strong {
  color: var(--text-primary);
}

/* Compliance Footer */
.compliance-footer {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
}

.compliance-footer .disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-link {
  font-size: 11px;
  color: var(--accent-secondary);
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-primary);
  text-decoration: underline;
}

.footer-links .divider {
  color: var(--text-muted);
  font-size: 10px;
}

.compliance-footer .copyright {
  font-size: 10px;
  color: var(--text-muted);
  margin: 0;
}

/* ========== Legal Modal ========== */
.legal-modal-content {
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
}

.legal-modal-content h3 {
  color: var(--accent-secondary);
  font-size: 18px;
  margin-bottom: var(--spacing-lg);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.legal-content {
  text-align: left;
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: var(--spacing-lg);
  padding-right: var(--spacing-sm);
}

.legal-content h4 {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
}

.legal-content h4:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: var(--spacing-sm);
}

.legal-content ul {
  margin: var(--spacing-sm) 0;
  padding-left: var(--spacing-lg);
}

.legal-content li {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
  margin-bottom: 4px;
}

.legal-close-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, #5a4cd6 100%);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legal-close-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Scrollbar for legal content */
.legal-content::-webkit-scrollbar {
  width: 4px;
}

.legal-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.legal-content::-webkit-scrollbar-thumb {
  background: var(--accent-primary);
  border-radius: 2px;
}
