/* public/css/style.css - OTPBlast Master Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap');

:root {
  /* Dark Mode Default (YSH & SMSOTPS Cyber Slate Palette) */
  --bg-primary: #0A0E17;
  --bg-secondary: #101626;
  --bg-tertiary: #172138;
  --bg-card: rgba(16, 22, 38, 0.75);
  --bg-card-hover: rgba(23, 33, 56, 0.85);
  --bg-input: rgba(10, 14, 23, 0.8);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(255, 59, 48, 0.4);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent-red: #FF3B30;
  --accent-orange: #FF5E3A;
  --accent-gradient: linear-gradient(135deg, #FF3B30 0%, #FF5E3A 50%, #FF9500 100%);
  --accent-glow: 0 0 25px rgba(255, 59, 48, 0.35);

  --color-success: #10B981;
  --color-success-glow: 0 0 15px rgba(16, 185, 129, 0.3);
  --color-warning: #F59E0B;
  --color-danger: #EF4444;
  --color-info: #3B82F6;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.45);
  --shadow-3d: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.1);

  --backdrop-blur: blur(16px);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-primary: #F8FAFC;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #EDF2F7;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #FFFFFF;
  --bg-input: #F1F5F9;

  --border-color: rgba(0, 0, 0, 0.08);
  --border-highlight: rgba(0, 0, 0, 0.14);
  --border-accent: rgba(255, 59, 48, 0.4);

  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
  --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Background Canvas Particles */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top Marquee / Ticker */
.ticker-wrap {
  width: 100%;
  background: linear-gradient(90deg, rgba(255, 59, 48, 0.15) 0%, rgba(255, 94, 58, 0.05) 50%, rgba(255, 59, 48, 0.15) 100%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  height: 38px;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-label {
  background: var(--accent-gradient);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0 14px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
}

.ticker-content {
  display: flex;
  gap: 32px;
  animation: ticker-slide 35s linear infinite;
  white-space: nowrap;
  padding-left: 20px;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.ticker-item img {
  width: 16px;
  height: 16px;
  object-fit: contain;
}

.ticker-item .price {
  color: var(--accent-orange);
  font-weight: 600;
  font-family: var(--font-mono);
}

@keyframes ticker-slide {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Header */
.main-header {
  height: 72px;
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Hamburger Drawer Button */
.btn-drawer-toggle {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.25rem;
  transition: var(--transition);
}

.btn-drawer-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--border-highlight);
  color: var(--accent-orange);
}

/* Navigation Drawer */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100%;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.4);
}

.nav-drawer.open,
.nav-drawer.menu-open {
  transform: translateX(0);
}

.drawer-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.drawer-close-btn:hover {
  color: var(--text-primary);
}

.drawer-user-card {
  padding: 20px;
  background: var(--bg-tertiary);
  margin: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  gap: 6px;
  flex: 1;
  overflow-y: auto;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
}

.drawer-nav-item:hover, .drawer-nav-item.active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.drawer-nav-item .icon {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: var(--accent-glow);
  font-size: 1.3rem;
  font-weight: 800;
  transform: perspective(400px) rotateX(8deg);
  transition: var(--transition);
}

.brand-logo:hover .brand-icon {
  transform: perspective(400px) rotateX(0deg) scale(1.05);
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #FFFFFF 30%, #CBD5E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="light"] .brand-name {
  background: linear-gradient(135deg, #0F172A 30%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-name span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Currency Dropdown Selector */
.currency-selector {
  position: relative;
}

.currency-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.currency-btn:hover {
  border-color: var(--border-highlight);
  background: var(--bg-secondary);
}

.currency-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 200;
  backdrop-filter: var(--backdrop-blur);
}

.currency-dropdown.show {
  display: block;
  animation: dropdown-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.currency-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}

.currency-option:hover, .currency-option.selected {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.currency-option .symbol {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-orange);
}

/* Balance Capsule */
.balance-capsule {
  display: flex;
  align-items: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 4px 6px 4px 14px;
  gap: 12px;
}

.balance-info {
  display: flex;
  flex-direction: column;
}

.balance-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.balance-value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--color-success);
}

.btn-topup {
  background: var(--accent-gradient);
  color: #FFFFFF;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(255, 59, 48, 0.3);
}

.btn-topup:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(255, 59, 48, 0.45);
}

/* Theme Switcher Toggle */
.theme-toggle-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--border-highlight);
  transform: rotate(15deg);
}

/* User Account Capsule */
.user-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.user-btn {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}

.user-avatar {
  width: 26px;
  height: 26px;
  background: var(--accent-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.role-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-badge.special {
  background: rgba(245, 158, 11, 0.2);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.role-badge.admin {
  background: rgba(239, 68, 68, 0.2);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

@keyframes dropdown-pop {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

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

::-webkit-scrollbar-thumb:hover {
  background: var(--border-highlight);
}
