/* ═══════════════════════════════════════════
   RME Shortcuts V3 — Corporate Enterprise Theme
   Amazon-standard professional design
   ═══════════════════════════════════════════ */

:root,
[data-theme="light"],
[data-theme="dark"] {
  --bg-base: #060c14;
  --bg-surface: #040a10;
  --bg-card: #0d1a2b;
  --bg-card-hover: #122440;
  --bg-input: #091422;
  --border: rgba(255, 153, 0, 0.15);
  --border-hover: rgba(255, 153, 0, 0.5);
  --border-focus: #ff9900;
  --accent: #ff9900;
  --accent-hover: #ffb733;
  --accent-muted: rgba(255, 153, 0, 0.12);
  --text-primary: #e8f0f8;
  --text-secondary: #7a9bb5;
  --text-muted: #4a6a85;
  --text-inverse: #060c14;
  --success: #00c8a0;
  --danger: #ff4560;
  --danger-muted: rgba(255, 69, 96, 0.12);
  --radius: 4px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  background: radial-gradient(ellipse at 50% 0%, #0d1a2b 0%, #060c14 60%, #000000 100%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}

/* ========== LAYOUT ========== */
.app-layout {
  max-width: 960px;
  margin: 0 auto;
  min-height: 100vh;
  background: rgba(4, 10, 18, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  border-left: 1px solid rgba(255, 153, 0, 0.05);
  border-right: 1px solid rgba(255, 153, 0, 0.05);
}

/* ========== HEADER ========== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--bg-surface);
  color: #ffffff;
  /* ensure header text is white */
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius);
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 900;
  font-size: 16px;
  color: var(--text-inverse);
}

.logo-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.logo-env {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-info {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.user-info .name {
  padding: 4px 10px;
  background: var(--accent-muted);
  color: var(--accent);
  border-radius: var(--radius);
  font-weight: 600;
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--accent);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 153, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(255, 153, 0, 0.35);
}

.btn-danger {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-muted);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 4px 16px rgba(218, 54, 51, 0.3);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: #ffffff;
  background: rgba(255, 153, 0, 0.08);
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}

.btn-text-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  transition: color 0.15s ease;
}

.btn-text-link:hover {
  text-decoration: underline;
  color: var(--accent-hover);
}

/* ========== VIEWS ========== */
.view {
  display: none;
  padding: 24px;
}

.view.active {
  display: block;
}

.view-header {
  margin-bottom: 24px;
  background: rgba(0, 0, 0, 0.4);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.breadcrumb .sep {
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
}

.view-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.view-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ========== HOME GRID ========== */
.home-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.home-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(255, 153, 0, 0);
  backdrop-filter: blur(6px);
}

.home-card::after {
  display: none;
  /* No bottom accent animation in this layout */
}

.home-card:hover {
  border-color: var(--border-hover);
  border-top-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 153, 0, 0.12);
}

.home-card:hover::after {
  display: none;
}

.home-card:active {
  transform: translateY(-1px);
}

.home-card-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  transition: color 0.2s ease;
}

.home-card:hover .home-card-label {
  color: var(--accent);
}

.home-card-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.home-card:hover .home-card-title {
  color: var(--accent);
}

.home-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.home-card:hover .home-card-desc {
  color: var(--text-primary);
}

.home-card .accent-bar {
  display: none;
  /* Removed for this layout */
}

.home-card:hover .accent-bar {
  display: none;
}

/* ========== AREA GRID ========== */
.area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.area-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

.area-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.08);
}

.area-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.area-card:hover .area-card-name {
  color: var(--accent);
}

.area-card-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.area-card-arrow {
  color: var(--text-muted);
  font-size: 20px;
  transition: all 0.2s ease;
}

.area-card:hover .area-card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ========== SHORTCUT LIST ========== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent);
}

.controls-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 32px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.shortcut-row:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(3px);
  box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.06);
}

.shortcut-name {
  font-size: 14px;
  font-weight: 500;
}

.shortcut-meta {
  display: flex;
  gap: 6px;
  align-items: center;
}

.tag {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.5px;
}

.tag-p {
  background: rgba(147, 130, 220, 0.15);
  color: #9382dc;
}

.tag-f {
  background: var(--accent-muted);
  color: var(--accent);
}

.tag-c {
  background: rgba(56, 139, 253, 0.15);
  color: #388bfd;
}

.tag-pm {
  background: rgba(100, 100, 100, 0.15);
  color: #888;
}

.tag-custom {
  background: var(--accent-muted);
  color: var(--accent);
}

/* ========== DETAIL ========== */
.detail-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.detail-actions {
  display: flex;
  gap: 8px;
}

.detail-block {
  margin-top: 24px;
}

.detail-block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.detail-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.detail-code {
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  cursor: pointer;
  transition: all 0.2s ease;
  word-break: break-word;
}

.detail-code:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 2px rgba(255, 153, 0, 0.08);
}

/* ========== AUTH ========== */
.auth-card {
  max-width: 380px;
  margin: 60px auto;
  background: var(--bg-card);
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 153, 0, 0.08);
  backdrop-filter: blur(8px);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.auth-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.form-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ========== SETTINGS ========== */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 16px;
}

.settings-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(2px);
}

.modal-card {
  background: var(--bg-surface);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.modal-card.modal-wide {
  max-width: 860px;
}

.modal-body-split {
  display: flex;
  gap: 24px;
}

.modal-form-side {
  flex: 1;
  min-width: 0;
}

.modal-suggestion-side {
  width: 280px;
  flex-shrink: 0;
  padding: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-self: flex-start;
  position: sticky;
  top: 0;
}

.suggestion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.suggestion-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--accent);
  text-transform: uppercase;
}

.suggestion-body {
  padding: 12px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  cursor: pointer;
  transition: border-color 0.2s ease;
  color: var(--text-secondary);
  font-family: 'Inter', monospace;
}

.suggestion-body:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.suggestion-note {
  margin-top: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 768px) {
  .modal-card.modal-wide {
    max-width: 95%;
  }

  .modal-body-split {
    flex-direction: column;
  }

  .modal-suggestion-side {
    width: 100%;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.code-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

.category-select-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 80px);
  background: var(--bg-card);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  opacity: 0;
  z-index: 9999;
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 14px;
}

/* ========== ADMIN ========== */
.admin-user-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.admin-user-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.admin-user-card .user-label {
  font-weight: 600;
}

.admin-user-card .user-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .home-grid {
    grid-template-columns: 1fr;
  }

  .area-grid {
    grid-template-columns: 1fr;
  }

  .code-inputs {
    grid-template-columns: 1fr;
  }

  .category-select-group {
    grid-template-columns: 1fr;
  }

  .view {
    padding: 16px;
  }

  .controls-row {
    flex-direction: column;
  }
}

/* ========== DYNAMIC BACKGROUND ========== */
.dynamic-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.8s ease, filter 0.8s ease;
  pointer-events: none;
}

.dynamic-bg.active {
  opacity: 0.45;
  animation: pan-bg 60s linear infinite alternate;
}

.dynamic-bg.whirlwind-in {
  animation: whirlwind-in 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes pan-bg {
  0% {
    background-position: 0% 50%;
    background-size: 110%;
  }

  100% {
    background-position: 100% 50%;
    background-size: 110%;
  }
}

@keyframes whirlwind-in {
  0% {
    transform: scale(1.5) rotate(-10deg);
    filter: blur(20px) contrast(150%);
    opacity: 0;
  }

  100% {
    transform: scale(1) rotate(0deg);
    filter: blur(0px) contrast(100%);
    opacity: 0.45;
  }
}

.bg-inbound {
  background-image: url('img/bg_inbound.png');
}

.bg-outbound {
  background-image: url('img/bg_outbound.png');
}

.bg-arfloor {
  background-image: url('img/bg_arfloor.png');
}

.bg-home {
  background-image: url('img/bg_home.png');
}

/* ========== NAVIGATION LOADER ========== */
.nav-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(19, 25, 33, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.nav-loader.visible {
  opacity: 1;
  pointer-events: all;
}

.nav-loader-inner {
  text-align: center;
  width: 460px;
  max-width: 90vw;
}

.loader-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 20px;
}

.loader-dots::after {
  content: '';
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% {
    content: '';
  }

  25% {
    content: '.';
  }

  50% {
    content: '..';
  }

  75% {
    content: '...';
  }

  100% {
    content: '';
  }
}

.loader-track {
  position: relative;
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  overflow: visible;
  margin-top: 8px;
}

.loader-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff9900, #ffbd4a);
  border-radius: 4px;
  transition: width 0.05s linear;
  box-shadow: 0 0 12px rgba(255, 153, 0, 0.6);
}

.loader-robot {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -160%);
  height: 72px;
  width: auto;
  filter: drop-shadow(0 4px 12px rgba(255, 153, 0, 0.5));
  transition: left 0.05s linear;
  image-rendering: auto;
}

/* ═══════════════════════════════════════════════════════
   INTRO SPLASH SCREEN
   ═══════════════════════════════════════════════════════ */

.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: radial-gradient(ellipse at center, #0d1a2b 0%, #060c14 60%, #000000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  transition: opacity 0.4s ease;
}

/* ── Swirling light rings ──────────────────────────────── */
.splash-swirl-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  pointer-events: none;
}

.swirl-ring {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: swirlRotate linear infinite;
}

.swirl-ring-1 {
  width: 320px;
  height: 320px;
  border-color: rgba(255, 153, 0, 0.55);
  box-shadow: 0 0 24px 6px rgba(255, 153, 0, 0.25), inset 0 0 24px rgba(255, 153, 0, 0.08);
  animation-duration: 4.5s;
  animation-direction: normal;
}

.swirl-ring-2 {
  width: 460px;
  height: 460px;
  border-color: rgba(255, 190, 70, 0.35);
  box-shadow: 0 0 30px 8px rgba(255, 190, 70, 0.15), inset 0 0 30px rgba(255, 190, 70, 0.05);
  animation-duration: 6s;
  animation-direction: reverse;
}

.swirl-ring-3 {
  width: 580px;
  height: 580px;
  border-color: rgba(255, 153, 0, 0.20);
  box-shadow: 0 0 40px 12px rgba(255, 153, 0, 0.10);
  animation-duration: 9s;
  animation-direction: normal;
}

.swirl-ring-4 {
  width: 680px;
  height: 680px;
  border-color: rgba(100, 160, 255, 0.12);
  box-shadow: 0 0 50px 16px rgba(100, 160, 255, 0.06);
  animation-duration: 14s;
  animation-direction: reverse;
}

.swirl-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;
  height: 80px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 153, 0, 0.7) 0%, rgba(255, 153, 0, 0.2) 50%, transparent 100%);
  border-radius: 50%;
  animation: corePulse 2.2s ease-in-out infinite;
}

@keyframes swirlRotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes corePulse {

  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

/* ── Phase 1: Welcome text ──────────────────────────────── */
.splash-phase {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 12px;
  transition: opacity 0.6s ease;
}

.splash-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #ff9900;
  border: 1px solid rgba(255, 153, 0, 0.4);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
  background: rgba(255, 153, 0, 0.08);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 16px rgba(255, 153, 0, 0.25);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {

  0%,
  100% {
    box-shadow: 0 0 16px rgba(255, 153, 0, 0.25);
  }

  50% {
    box-shadow: 0 0 32px rgba(255, 153, 0, 0.55);
  }
}

.splash-title {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  letter-spacing: -1px;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
  margin-bottom: 12px;
}

.splash-title-highlight {
  background: linear-gradient(90deg, #ff9900 0%, #ffcc55 50%, #ff9900 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 2.5s linear infinite;
}

@keyframes shimmerText {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.splash-subtitle {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
  /* Increased opacity for better readability */
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 500;
}

/* ── Phase 2: Byline ─────────────────────────────────────── */
.splash-byline {
  position: relative;
  z-index: 2;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  /* Increased opacity for better readability */
  letter-spacing: 0.5px;
  margin-bottom: 40px;
  text-align: center;
  transition: opacity 0.4s ease;
}

.splash-byline strong {
  color: #ff9900;
  font-weight: 700;
}

/* ── Phase 3: Loader ─────────────────────────────────────── */
.splash-loader-wrap {
  position: relative;
  z-index: 2;
  width: min(500px, 88vw);
  text-align: center;
  margin-top: 140px;
  /* moved much lower to clear text */
}

.splash-conveyor {
  position: relative;
  width: 100%;
  height: 12px;
  background: #222;
  border-radius: 6px;
  overflow: visible;
  margin-bottom: 110px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.8), inset 0 2px 4px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid #111;
  border-top: 1px solid #444;
}

.conveyor-belt {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background-image: repeating-linear-gradient(90deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.1) 10px,
      rgba(255, 255, 255, 0.1) 20px);
  animation: beltMove 1s linear infinite;
}

@keyframes beltMove {
  0% {
    background-position: 0 0;
  }

  100% {
    background-position: 40px 0;
  }
}

.splash-box {
  position: absolute;
  bottom: 100%;
  left: 0%;
  transform: translate(-50%, 0px);
  /* anchor bottom center */
  height: 38px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.splash-percent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

.splash-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
}

.splash-percent {
  font-size: 14px;
  font-weight: 800;
  color: #ff9900;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 8px rgba(255, 153, 0, 0.7);
}

/* Particle effect using pseudo elements on the splash-swirl-wrap */
.splash-swirl-wrap::before,
.splash-swirl-wrap::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  animation: swirlRotate linear infinite;
}

.splash-swirl-wrap::before {
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 153, 0, 0.9);
  box-shadow: 0 0 20px rgba(255, 153, 0, 0.5);
  animation-duration: 3s;
}

.splash-swirl-wrap::after {
  width: 150px;
  height: 150px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 200, 80, 0.6);
  box-shadow: 0 0 12px rgba(255, 200, 80, 0.4), inset 0 0 12px rgba(255, 200, 80, 0.1);
  animation-duration: 2s;
  animation-direction: reverse;
}