@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  --bg-color: #06060c;
  --panel-bg: rgba(18, 18, 30, 0.6);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 92, 252, 0.2);
  --text-primary: #ffffff;
  --text-secondary: #a3a3c2;
  --primary: #7c5cfc;
  --primary-glow: rgba(124, 92, 252, 0.4);
  --accent: #9d4edd;
  --accent-glow: rgba(157, 78, 221, 0.4);
  --success: #22c55e;
  --success-glow: rgba(34, 197, 94, 0.3);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.3);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.3);
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at 50% 0%, #16162d 0%, #06060c 60%);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  overflow-x: hidden;
}

#app {
  width: 100%;
  max-width: 540px;
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 20px var(--border-glow);
  display: flex;
  flex-direction: column;
  min-height: 720px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */

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

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

.logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: var(--font-title);
  font-size: 16px;
  box-shadow: 0 0 10px var(--primary-glow);
}

.logo-text {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

#user-header {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px 4px 6px;
  border-radius: 30px;
  border: 1px solid var(--border-color);
}

#user-pfp {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  object-fit: cover;
}

#user-name {
  font-size: 13px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   TAB NAVIGATION
   ═══════════════════════════════════════════ */

nav.tabs-nav {
  display: flex;
  padding: 4px;
  background: rgba(0, 0, 0, 0.2);
  margin: 16px 24px 8px 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 4px 12px var(--primary-glow);
}

/* ═══════════════════════════════════════════
   MAIN CONTAINER
   ═══════════════════════════════════════════ */

main {
  flex: 1;
  padding: 16px 24px 24px 24px;
}

.hidden {
  display: none !important;
}

section {
  width: 100%;
  animation: viewFadeIn 0.35s ease;
}

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

h1, h2 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  font-size: 22px;
  line-height: 1.2;
  margin-bottom: 4px;
  background: linear-gradient(to right, #ffffff, #c7d2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════
   LOADING VIEW
   ═══════════════════════════════════════════ */

.loader-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 10px;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(124, 92, 252, 0.1);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(124, 92, 252, 0.15);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ═══════════════════════════════════════════
   PROFILE CARD
   ═══════════════════════════════════════════ */

.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  margin-bottom: 24px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.profile-card:hover {
  border-color: rgba(124, 92, 252, 0.3);
  background: rgba(255, 255, 255, 0.03);
}

.profile-card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(124, 92, 252, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.profile-avatar-wrapper {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-color), var(--bg-color)) padding-box,
              linear-gradient(135deg, var(--primary), var(--accent)) border-box;
}

.profile-avatar-ring {
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.3), rgba(157, 78, 221, 0.3)) border-box;
  animation: avatarRingPulse 3s infinite alternate;
  pointer-events: none;
}

@keyframes avatarRingPulse {
  0% { opacity: 0.4; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.02); }
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.profile-display-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 18px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-fname {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* ═══════════════════════════════════════════
   FORM ELEMENTS
   ═══════════════════════════════════════════ */

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

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

.input-wrapper {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 14px;
  transition: all 0.25s ease;
  position: relative;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.25);
}

.input-wrapper input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  height: 48px;
  outline: none;
}

.input-wrapper input::placeholder {
  color: rgba(163, 163, 194, 0.5);
}

/* Fname input specific */
.fname-input-wrapper {
  padding-left: 0;
}

.at-prefix {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 48px;
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  background: rgba(124, 92, 252, 0.08);
  border-right: 1px solid var(--border-color);
  border-radius: 11px 0 0 11px;
  flex-shrink: 0;
}

.fname-input-wrapper input {
  padding-left: 12px;
}

/* Availability indicator */
.avail-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding-right: 2px;
}

.avail-indicator.available {
  color: var(--success);
}

.avail-indicator.taken {
  color: var(--error);
}

.avail-indicator.checking {
  color: var(--text-secondary);
}

.avail-indicator.available #avail-icon {
  animation: availPulse 1.5s ease-in-out;
}

@keyframes availPulse {
  0% { transform: scale(0.5); opacity: 0; }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}

.input-spinner {
  display: flex;
  align-items: center;
  padding-right: 2px;
}

/* Validation message */
.validation-msg {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  min-height: 18px;
  transition: all 0.2s ease;
}

.validation-msg.error {
  color: var(--error);
}

.validation-msg.info {
  color: var(--text-secondary);
}

.validation-msg.success {
  color: var(--success);
}

/* Fname rules */
.fname-rules {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(124, 92, 252, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(124, 92, 252, 0.1);
}

.fname-rules span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */

.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--text-primary);
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  height: 48px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px var(--primary-glow);
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow), 0 0 10px var(--accent-glow);
}

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

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary:disabled::before {
  display: none;
}

.btn-secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   COOLDOWN BANNER
   ═══════════════════════════════════════════ */

.cooldown-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-top: 16px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 12px;
  animation: cooldownSlide 0.4s ease;
}

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

.cooldown-icon {
  font-size: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cooldown-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cooldown-text strong {
  font-size: 13px;
  color: var(--warning);
}

.cooldown-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   SEARCH VIEW
   ═══════════════════════════════════════════ */

.search-results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.25s ease;
  animation: resultSlideIn 0.3s ease both;
}

.search-result-item:nth-child(1) { animation-delay: 0ms; }
.search-result-item:nth-child(2) { animation-delay: 50ms; }
.search-result-item:nth-child(3) { animation-delay: 100ms; }
.search-result-item:nth-child(4) { animation-delay: 150ms; }
.search-result-item:nth-child(5) { animation-delay: 200ms; }
.search-result-item:nth-child(6) { animation-delay: 250ms; }
.search-result-item:nth-child(7) { animation-delay: 300ms; }
.search-result-item:nth-child(8) { animation-delay: 350ms; }
.search-result-item:nth-child(9) { animation-delay: 400ms; }
.search-result-item:nth-child(10) { animation-delay: 450ms; }

@keyframes resultSlideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(124, 92, 252, 0.25);
  transform: translateY(-1px);
}

.search-result-item.available:hover {
  border-color: rgba(34, 197, 94, 0.3);
}

.search-result-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.search-result-name .at-sign {
  color: var(--primary);
  font-weight: 700;
}

.search-result-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.badge-available {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-taken {
  background: rgba(239, 68, 68, 0.08);
  color: rgba(239, 68, 68, 0.7);
  border: 1px solid rgba(239, 68, 68, 0.15);
}

.search-result-owner {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.search-result-info {
  display: flex;
  flex-direction: column;
}

/* ═══════════════════════════════════════════
   HISTORY TIMELINE
   ═══════════════════════════════════════════ */

.history-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-left: 24px;
}

.history-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent), rgba(157, 78, 221, 0.2));
  border-radius: 2px;
}

.history-item {
  position: relative;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin-bottom: 12px;
  transition: all 0.25s ease;
  animation: historyFadeIn 0.4s ease both;
}

.history-item:nth-child(1) { animation-delay: 0ms; }
.history-item:nth-child(2) { animation-delay: 80ms; }
.history-item:nth-child(3) { animation-delay: 160ms; }
.history-item:nth-child(4) { animation-delay: 240ms; }
.history-item:nth-child(5) { animation-delay: 320ms; }

@keyframes historyFadeIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(124, 92, 252, 0.2);
}

.history-item::before {
  content: '';
  position: absolute;
  left: -21px;
  top: 20px;
  width: 10px;
  height: 10px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary-glow);
  z-index: 1;
}

.history-item:first-child::before {
  width: 12px;
  height: 12px;
  left: -22px;
  top: 19px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 12px var(--primary-glow);
}

.history-change {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.history-fname {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 3px 10px;
  background: rgba(124, 92, 252, 0.1);
  border-radius: 6px;
}

.history-arrow {
  color: var(--primary);
  font-size: 14px;
  font-weight: 700;
}

.history-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.history-date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.history-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  background: rgba(124, 92, 252, 0.1);
  color: var(--primary);
  border: 1px solid rgba(124, 92, 252, 0.15);
}

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 50px 20px;
  border: 2px dashed rgba(255, 255, 255, 0.05);
  border-radius: 16px;
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  font-family: var(--font-title);
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   PROCESSING MODAL
   ═══════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 500;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  animation: modalOverlayIn 0.3s ease;
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.processing-card {
  width: 100%;
  max-width: 420px;
  background: rgba(18, 18, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px var(--border-glow);
  animation: modalCardIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalCardIn {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.processing-header {
  text-align: center;
  margin-bottom: 28px;
}

.processing-glow-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 0 25px var(--primary-glow);
  animation: processingPulse 2s infinite alternate;
}

@keyframes processingPulse {
  0% { box-shadow: 0 0 20px var(--primary-glow); }
  100% { box-shadow: 0 0 40px rgba(157, 78, 221, 0.6); }
}

.processing-header h3 {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 6px;
}

/* Processing Steps */
.processing-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  transition: all 0.3s ease;
}

.step-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.step.active .step-icon-wrapper {
  background: rgba(124, 92, 252, 0.15);
  border-color: var(--primary);
  animation: stepActiveGlow 1.5s infinite alternate;
}

@keyframes stepActiveGlow {
  0% { box-shadow: 0 0 6px rgba(124, 92, 252, 0.2); }
  100% { box-shadow: 0 0 14px rgba(124, 92, 252, 0.5); }
}

.step.completed .step-icon-wrapper {
  background: rgba(34, 197, 94, 0.12);
  border-color: var(--success);
}

.step.failed .step-icon-wrapper {
  background: rgba(239, 68, 68, 0.12);
  border-color: var(--error);
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 2px;
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.step-detail {
  font-size: 12px;
  color: var(--text-secondary);
}

.step.completed .step-label {
  color: var(--success);
}

.step.failed .step-label {
  color: var(--error);
}

.step-connector {
  width: 2px;
  height: 12px;
  background: rgba(255, 255, 255, 0.06);
  margin-left: 17px;
  border-radius: 2px;
}

/* Processing Result */
.processing-result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  animation: resultFadeIn 0.4s ease;
}

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

.processing-result.success {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.processing-result.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.processing-result h4 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.processing-result.success h4 {
  color: var(--success);
}

.processing-result.error h4 {
  color: var(--error);
}

.processing-result p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════ */

.toast-notif {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(18, 18, 30, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 90vw;
}

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

.toast-success { border-color: var(--success); color: var(--success); }
.toast-error { border-color: var(--error); color: var(--error); }
.toast-info { border-color: var(--primary); color: white; }
.toast-warning { border-color: var(--warning); color: var(--warning); }

/* ═══════════════════════════════════════════
   ANIMATIONS (keyframes)
   ═══════════════════════════════════════════ */

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { box-shadow: 0 0 20px var(--primary-glow); }
  100% { box-shadow: 0 0 40px rgba(157, 78, 221, 0.6); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Loading skeleton shimmer effect */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
  body {
    padding: 0;
  }
  #app {
    border-radius: 0;
    border: none;
    min-height: 100vh;
    box-shadow: none;
  }

  .profile-card {
    padding: 16px;
  }

  .profile-avatar {
    width: 48px;
    height: 48px;
  }

  .profile-display-name {
    font-size: 16px;
  }

  .tab-btn {
    font-size: 12px;
    padding: 7px 4px;
  }

  .processing-card {
    padding: 24px 20px;
  }
}

@media (max-width: 360px) {
  main {
    padding: 12px 16px 20px 16px;
  }

  header {
    padding: 16px;
  }

  nav.tabs-nav {
    margin: 12px 16px 6px 16px;
  }

  .logo-text {
    font-size: 17px;
  }
}
