@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-main: #05080f;
  --bg-card: rgba(10, 16, 27, 0.88);
  --bg-card-hover: rgba(15, 22, 36, 0.95);
  --bg-input: #060b14;
  --border-color: rgba(56, 189, 248, 0.25);
  --border-active: rgba(0, 216, 255, 0.6);
  
  --color-cyan: #00d8ff;
  --color-blue: #38bdf8;
  --color-deep-blue: #0284c7;
  --color-purple: #c084fc;
  --color-magenta: #e879f9;
  --color-pink: #f43f5e;
  --color-crimson: #e11d48;
  --color-dark-crimson: #9f1239;
  --color-orange: #fb923c;
  --color-yellow: #facc15;
  --color-green: #34d399;
  --color-red: #f87171;
  --color-text-muted: #64748b;
  --color-text-bright: #f8fafc;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', monospace;
  
  --glow-cyan: 0 0 22px rgba(0, 216, 255, 0.35);
  --glow-crimson: 0 0 20px rgba(225, 29, 72, 0.35);
  --glow-fusion: 0 0 30px rgba(0, 216, 255, 0.25), 0 0 30px rgba(225, 29, 72, 0.25);
}

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

body {
  background: radial-gradient(circle at 15% 20%, rgba(0, 216, 255, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 85% 80%, rgba(225, 29, 72, 0.2) 0%, transparent 45%),
              linear-gradient(135deg, #040913 0%, #08101e 35%, #030509 50%, #17060d 70%, #0a0307 100%);
  background-attachment: fixed;
  color: var(--color-text-bright);
  font-family: var(--font-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Background Snow / Star Particles Canvas */
#snow-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* App Container */
.app-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 16px 24px;
  gap: 16px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* Header */
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #00d8ff 0%, #0284c7 35%, #050810 50%, #e11d48 70%, #f43f5e 100%);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: var(--glow-fusion);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-title span:first-child {
  color: #f8fafc;
}

.brand-title span:last-child {
  background: linear-gradient(90deg, #00d8ff, #f43f5e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-left: 5px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
}

.discord-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 101, 242, 0.16);
  border: 1px solid rgba(88, 101, 242, 0.45);
  color: #7289da;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}

.discord-btn:hover {
  background: #5865f2;
  color: #ffffff;
  border-color: #5865f2;
  box-shadow: 0 0 16px rgba(88, 101, 242, 0.55);
  transform: translateY(-1px);
}

.sound-toggle-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--color-cyan);
  padding: 5px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sound-toggle-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  box-shadow: 0 0 12px rgba(0, 216, 255, 0.35);
}

.sound-toggle-btn.muted {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--color-red);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #10b981;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

/* Main Layout Grid */
.main-content {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

@media (max-width: 1080px) {
  .main-content {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
}

/* Glass Card */
.glass-panel {
  background: linear-gradient(145deg, rgba(10, 18, 30, 0.88) 0%, rgba(5, 8, 14, 0.92) 50%, rgba(20, 10, 18, 0.88) 100%);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 14px;
  padding: 16px;
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.glass-panel:hover {
  border-color: rgba(0, 216, 255, 0.45);
  box-shadow: 0 8px 35px rgba(0, 216, 255, 0.15), 0 8px 35px rgba(225, 29, 72, 0.15);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #e2e8f0;
}

.panel-title svg {
  color: var(--color-cyan);
}

.badge-tag {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-family: var(--font-mono);
}

/* Left Column */
.left-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
}

.tokens-panel {
  flex: 1.2;
  min-height: 250px;
}

.textarea-wrapper {
  flex: 1;
  position: relative;
  display: flex;
  min-height: 120px;
}

textarea {
  width: 100%;
  height: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  color: #cbd5e1;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 12px;
  resize: none;
  outline: none;
  transition: all 0.2s ease;
  user-select: text;
  line-height: 1.5;
}

textarea:focus {
  border-color: var(--color-cyan);
  color: #f8fafc;
  box-shadow: inset 0 0 12px rgba(0, 216, 255, 0.1);
}

textarea::placeholder {
  color: #334155;
  font-family: var(--font-mono);
}

.drag-active {
  border-color: var(--color-cyan) !important;
  background: rgba(0, 216, 255, 0.08) !important;
}

.tokens-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tokens-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-upload {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.2), rgba(225, 29, 72, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--color-blue);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-upload:hover {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.35), rgba(225, 29, 72, 0.35));
  color: #fff;
  box-shadow: 0 0 14px rgba(0, 216, 255, 0.3);
}

.btn-clear {
  background: rgba(225, 29, 72, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: var(--color-red);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-clear:hover {
  background: rgba(225, 29, 72, 0.35);
  color: #fff;
  border-color: rgba(244, 63, 94, 0.6);
  box-shadow: 0 0 14px rgba(225, 29, 72, 0.35);
}

.token-count-label {
  font-size: 0.78rem;
  color: #64748b;
  font-family: var(--font-mono);
}

/* Settings Panel */
.settings-panel {
  flex: 1;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
}

.setting-sub {
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--font-mono);
}

.speed-badge {
  background: rgba(56, 189, 248, 0.15);
  color: var(--color-cyan);
  border: 1px solid rgba(56, 189, 248, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

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

input[type="range"] {
  flex: 1;
  height: 4px;
  background: linear-gradient(90deg, #091322, #140810);
  border-radius: 4px;
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: var(--color-cyan);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px var(--color-cyan);
}

.proxy-input-box {
  height: 65px;
  margin-top: 4px;
}

/* Right Column */
.right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}

/* Stat Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
}

@media (max-width: 1400px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

.stat-card {
  background: linear-gradient(145deg, rgba(9, 15, 26, 0.85), rgba(5, 8, 14, 0.9), rgba(18, 9, 16, 0.85));
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 10px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 216, 255, 0.4);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #64748b;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
}

.stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
}

/* Stat Card Theme Colors */
.stat-card.total .stat-val { color: #f8fafc; }
.stat-card.checked .stat-val { color: var(--color-cyan); text-shadow: 0 0 10px rgba(0, 216, 255, 0.35); }
.stat-card.valid .stat-val { color: var(--color-green); text-shadow: 0 0 10px rgba(52, 211, 153, 0.35); }
.stat-card.nitro-2x .stat-val { color: var(--color-magenta); text-shadow: 0 0 10px rgba(232, 121, 249, 0.3); }
.stat-card.nitro-1x .stat-val { color: var(--color-purple); }
.stat-card.nitro .stat-val { color: var(--color-purple); }
.stat-card.trial-1m-fv .stat-val { color: var(--color-pink); text-shadow: 0 0 8px rgba(244, 63, 94, 0.3); }
.stat-card.trial-1m-ev .stat-val { color: var(--color-pink); }
.stat-card.trial-2w-fv .stat-val { color: var(--color-orange); }
.stat-card.trial-2w-ev .stat-val { color: var(--color-orange); }
.stat-card.fv .stat-val { color: var(--color-cyan); }
.stat-card.ev .stat-val { color: var(--color-purple); }
.stat-card.locked .stat-val { color: var(--color-yellow); }
.stat-card.flagged .stat-val { color: var(--color-pink); }
.stat-card.invalid .stat-val { color: var(--color-red); }
.stat-card.redeemable .stat-val { color: var(--color-green); text-shadow: 0 0 10px rgba(52, 211, 153, 0.3); }

/* Progress Bar */
.progress-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.5px;
}

.progress-percent {
  font-family: var(--font-mono);
  color: var(--color-cyan);
}

.progress-track {
  height: 5px;
  background: #060b14;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #00d8ff 0%, #0284c7 35%, #050812 50%, #e11d48 75%, #f43f5e 100%);
  box-shadow: 0 0 12px var(--color-cyan);
  transition: width 0.2s ease;
}

/* Live Log */
.log-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  padding: 14px;
}

.log-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-small {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-small:hover {
  background: rgba(56, 189, 248, 0.2);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.4);
}

.log-box {
  flex: 1;
  background: #03060c;
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 8px;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  user-select: text;
}

.log-entry {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: fadeIn 0.15s ease-out;
  line-height: 1.4;
  word-break: break-all;
}

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

.log-time {
  color: #475569;
  font-size: 0.7rem;
  min-width: 65px;
}

.log-tag {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tag-valid { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.tag-trial { background: rgba(244, 63, 94, 0.2); color: #f43f5e; }
.tag-phone { background: rgba(0, 216, 255, 0.15); color: #00d8ff; }
.tag-email { background: rgba(250, 204, 21, 0.15); color: #facc15; }
.tag-invalid { background: rgba(248, 113, 113, 0.15); color: #f87171; }
.tag-info { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }

.log-text {
  color: #cbd5e1;
}

.log-placeholder {
  color: #334155;
  font-style: italic;
  margin: auto;
}

/* Bottom Actions Bar */
.bottom-bar {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-start {
  flex: 1;
  background: linear-gradient(135deg, #0284c7 0%, #00d8ff 35%, #050810 50%, #e11d48 70%, #9f1239 100%);
  border: 1px solid rgba(0, 216, 255, 0.5);
  color: #ffffff;
  padding: 14px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 25px rgba(0, 216, 255, 0.35), 0 4px 25px rgba(225, 29, 72, 0.25);
}

.btn-start:hover {
  background: linear-gradient(135deg, #00d8ff 0%, #38bdf8 35%, #070c18 50%, #f43f5e 70%, #be123c 100%);
  box-shadow: 0 6px 35px rgba(0, 216, 255, 0.6), 0 6px 35px rgba(225, 29, 72, 0.4);
  transform: translateY(-1px);
}

.btn-start.running {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 4px 20px rgba(220, 38, 38, 0.5);
}

.btn-start.running:hover {
  background: linear-gradient(135deg, #991b1b, #ef4444);
  box-shadow: 0 6px 30px rgba(239, 68, 68, 0.7);
}

.btn-export {
  background: rgba(10, 18, 30, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #94a3b8;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-export:hover {
  background: rgba(18, 30, 48, 0.9);
  color: #fff;
  border-color: rgba(0, 216, 255, 0.4);
}

/* Modal styles for export */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.active {
  display: flex;
}

.modal-box {
  background: linear-gradient(145deg, #09101c, #05080e, #140812);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.9), 0 0 30px rgba(0, 216, 255, 0.2);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.modal-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-cyan);
}

.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.export-item-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: #cbd5e1;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}

.export-item-btn:hover {
  background: linear-gradient(135deg, rgba(0, 216, 255, 0.2), rgba(225, 29, 72, 0.2));
  border-color: var(--color-cyan);
  color: #fff;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 216, 255, 0.4);
}
