/* Gen Z Cyber-Glassmorphism Style System */
:root {
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.75);
  --border-card: rgba(255, 255, 255, 0.08);
  --primary: #00f2fe;
  --primary-gradient: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
  --accent-purple: #9d4edd;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(0, 242, 254, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(157, 78, 221, 0.08) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Container */
.app-container {
  max-width: 1050px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px;
}

/* Glass Card Helper */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: rgba(0, 242, 254, 0.2);
}

/* Header Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.balance-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.2);
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 700;
  color: var(--primary);
  font-size: 0.95rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #040914;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 242, 254, 0.4);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  color: var(--text-main);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

/* Login Screen */
.login-screen {
  max-width: 400px;
  margin: 80px auto 0 auto;
  text-align: center;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.input-field {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  outline: none;
  margin: 16px 0;
  transition: all 0.2s ease;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.2);
}

/* Server Grid (2 Columns) */
.server-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 600px) {
  .server-grid {
    grid-template-columns: 1fr;
  }
}

.server-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-btn:hover {
  background: rgba(0, 242, 254, 0.08);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.stock-badge {
  background: rgba(0, 242, 254, 0.15);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Info Box / Explanation Box */
.info-box {
  background: rgba(0, 242, 254, 0.05);
  border: 1px solid rgba(0, 242, 254, 0.15);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.info-title {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Quick Service Pills */
.service-pills-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.service-pill:hover {
  background: rgba(0, 242, 254, 0.2);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

/* Accordion Component */
.accordion-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.25s ease;
}

.accordion-item:hover {
  border-color: rgba(0, 242, 254, 0.3);
}

.accordion-header {
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  user-select: none;
  transition: background 0.2s ease;
}

.accordion-header:hover {
  background: rgba(0, 242, 254, 0.06);
}

.accordion-title-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.accordion-title {
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
}

.accordion-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 10px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.accordion-icon {
  font-size: 0.85rem;
  color: var(--primary);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.15);
}

.accordion-item.active .accordion-content {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

/* Active Orders Grid (Multi-Order Concurrent Support) */
.active-orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.order-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 242, 254, 0.3);
  box-shadow: var(--shadow-glow);
}

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

.phone-display {
  font-family: monospace;
  font-size: 1.35rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 1px;
  background: rgba(0, 242, 254, 0.06);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0, 242, 254, 0.2);
  display: inline-block;
  margin-top: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.phone-display:hover {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--primary);
  transform: scale(1.02);
}

.clickable {
  cursor: pointer;
}

.badge-mini-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.badge-mini-copy:hover {
  background: rgba(0, 242, 254, 0.15);
  color: var(--primary);
  border-color: var(--primary);
}

.timer-badge {
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-family: monospace;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.otp-box {
  background: rgba(16, 185, 129, 0.15);
  border: 1px dashed var(--accent-green);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  margin: 14px 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.otp-box:hover {
  background: rgba(16, 185, 129, 0.25);
  transform: translateY(-2px);
}

.otp-code {
  font-size: 2.2rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: 5px;
}

.progress-bar-container {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  margin: 12px 0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  transition: width 1s linear;
}

/* Toast Popup */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #040914;
  padding: 12px 24px;
  border-radius: 99px;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
}

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

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-muted {
  color: var(--text-muted);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* History Table Styling */
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.9rem;
}

.history-table th {
  text-align: left;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.history-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.badge-otp {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 6px;
  font-family: monospace;
  letter-spacing: 1px;
  cursor: pointer;
  display: inline-block;
  transition: all 0.2s ease;
}

.badge-otp:hover {
  background: rgba(16, 185, 129, 0.3);
  transform: scale(1.05);
}

/* Custom Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.custom-modal {
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90%;
  max-width: 440px;
  box-shadow: var(--shadow-glow);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  text-align: center;
}

.modal-overlay.show .custom-modal {
  transform: translateY(0);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--primary);
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-main);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Loading Dots Animation */
.loading-dots:after {
  content: '.';
  animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
  0%, 20% {
    color: rgba(0,0,0,0);
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  40% {
    color: white;
    text-shadow:
      .25em 0 0 rgba(0,0,0,0),
      .5em 0 0 rgba(0,0,0,0);
  }
  60% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 rgba(0,0,0,0);
  }
  80%, 100% {
    text-shadow:
      .25em 0 0 white,
      .5em 0 0 white;
  }
}

/* Cancel Stock Search Button */
.cancel-stock-btn {
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-left: auto;
  font-weight: 700;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cancel-stock-btn:hover {
  background: rgba(239, 68, 68, 0.5);
  color: #ffffff;
  border-color: #ef4444;
}

/* History Note Display & Delete Button */
.history-note-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(254, 240, 138, 0.12);
  border: 1px dashed rgba(254, 240, 138, 0.4);
  color: #fde047;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-top: 4px;
  max-width: 250px;
  word-break: break-word;
}

.btn-delete-note {
  background: rgba(239, 68, 68, 0.2);
  border: none;
  color: #fca5a5;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-delete-note:hover {
  background: rgba(239, 68, 68, 0.6);
  color: #fff;
}

/* Buy Again Button & Action Styles */
.btn-buy-again {
  background: linear-gradient(135deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  color: #ffffff;
  font-weight: 800;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-buy-again:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
  border-color: #00f2fe;
}

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

.btn-buy-again::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(30deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(30deg); }
  20%, 100% { transform: translateX(100%) rotate(30deg); }
}

/* 3-Second Activation Pulse State */
.activation-banner {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(139, 92, 246, 0.15));
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: pulse-border 1.5s infinite alternate;
}

@keyframes pulse-border {
  0% { border-color: rgba(6, 182, 212, 0.4); box-shadow: 0 0 10px rgba(6, 182, 212, 0.2); }
  100% { border-color: rgba(139, 92, 246, 0.8); box-shadow: 0 0 20px rgba(139, 92, 246, 0.4); }
}

/* Auto Retry Stock Searching Container */
.stock-polling-status {
  background: rgba(15, 23, 42, 0.85);
  border: 1px dashed var(--accent-purple);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.retry-timer-badge {
  background: rgba(157, 78, 221, 0.2);
  color: #d8b4fe;
  padding: 4px 10px;
  border-radius: 99px;
  font-family: monospace;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(157, 78, 221, 0.4);
}

/* Order Actions Layout Responsive */
.order-card-actions {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

@media (max-width: 600px) {
  .order-card-actions {
    grid-template-columns: 1fr;
  }
}

