:root {
  --bg: #030b1d;
  --bg-2: #061127;
  --panel: rgba(18, 27, 52, 0.82);
  --panel-soft: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --text: #f6f8fb;
  --muted: #94a3b8;
  --green: #2ddc79;
  --green-2: #22c55e;
  --pink: #f3a8b8;
  --gold: #f2ca74;
  --danger: #ff7a90;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --max-width: 1280px;
}

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

html,
body {
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 16% 15%,
      rgba(48, 211, 132, 0.16),
      transparent 0,
      transparent 26%
    ),
    radial-gradient(
      circle at 82% 18%,
      rgba(37, 99, 235, 0.18),
      transparent 0,
      transparent 28%
    ),
    linear-gradient(180deg, #020817 0%, #03112b 45%, #061329 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto auto 8% -8%;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(45, 220, 121, 0.08);
  filter: blur(32px);
  pointer-events: none;
  animation: floatBlob 9s ease-in-out infinite alternate;
}

body::after {
  inset: 18% -7% auto auto;
  background: rgba(59, 130, 246, 0.1);
  animation-duration: 11s;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.container {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
}

/* Header */

.topbar {
  position: relative;
  z-index: 10;
  padding: 22px 0 0;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: #02231a;
  background: linear-gradient(135deg, #24d9c8, #23d36c);
  box-shadow: 0 10px 26px rgba(45, 220, 121, 0.22);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.status-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #d8e2f0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  backdrop-filter: blur(14px);
}

.status-live {
  background: rgba(45, 220, 121, 0.12);
  color: #b9f7d1;
  border-color: rgba(45, 220, 121, 0.15);
}

.status-link {
  background: rgba(255, 255, 255, 0.08);
}

/* Layout */

.app-shell {
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 64px;
}

.screen {
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform-origin: center;
  animation: screenIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen.is-leaving-left {
  animation: swipeOutLeft 0.48s cubic-bezier(0.7, 0, 0.84, 0) both;
}

.screen.is-entering-right {
  animation: swipeInRight 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  margin-bottom: 40px;
}

.screen-header h1 {
  animation: titleLift 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.1rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.screen-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.mini-pill {
  animation: pillPop 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mini-pill:nth-child(2) {
  animation-delay: 0.08s;
}

.mini-pill:nth-child(3) {
  animation-delay: 0.16s;
}

/* Buttons */

.btn {
  border: 0;
  border-radius: 999px;
  padding: 16px 32px;
  font-weight: 800;
  font-size: 1.1rem;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  min-width: 250px;
  background: linear-gradient(135deg, #29dd73, #22c55e);
  color: #082315;
  box-shadow: 0 14px 32px rgba(45, 220, 121, 0.22);
}

.btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Upload */

.upload-card,
.dashboard-card {
  position: relative;
  overflow: visible;
  transform-style: preserve-3d;
  animation: cardReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.upload-card {
  width: min(100%, 760px);
  margin-top: 28px;
  background: linear-gradient(
    180deg,
    rgba(22, 35, 64, 0.96),
    rgba(17, 26, 49, 0.96)
  );
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.upload-card::before,
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(22, 35, 64, 0.26),
    rgba(59, 130, 246, 0.22),
    rgba(255, 255, 255, 0.05)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
}

.upload-card-inner {
  padding: 28px;
}

.dropzone {
  min-height: 320px;
  border-radius: 20px;
  /* background:
    radial-gradient(
      circle at 12% 20%,
      rgba(45, 220, 121, 0.12),
      transparent 32%
    ),
    radial-gradient(
      circle at 88% 18%,
      rgba(59, 130, 246, 0.12),
      transparent 34%
    ),
    linear-gradient(135deg, rgba(33, 48, 79, 0.9), rgba(28, 39, 68, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.06); */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.dropzone.dragover {
  border-color: rgba(45, 220, 121, 0.32);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 20px 50px rgba(45, 220, 121, 0.12);
}

.dropzone-frame {
  width: 100%;
  min-height: 220px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  width: 100%;
  text-align: center;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.upload-title {
  text-align: center;
  font-size: clamp(1.8rem, 2.4vw, 2.35rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f5f7fb;
}

.file-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #dce6f2;
  font-size: 13px;
  font-weight: 700;
}

/* Status direkt im Upload */

.upload-card.is-loading,
.upload-card.is-success,
.upload-card.is-error {
  animation: statusBump 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.upload-card.is-success {
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(45, 220, 121, 0.22),
      transparent 36%
    ),
    linear-gradient(135deg, rgba(20, 78, 49, 0.92), rgba(21, 42, 76, 0.96));
}

.upload-card.is-error {
  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(255, 122, 144, 0.18),
      transparent 36%
    ),
    linear-gradient(135deg, rgba(84, 34, 47, 0.94), rgba(35, 37, 60, 0.96));
}

.status-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  animation: statusSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-card strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.status-card span {
  display: block;
  margin-top: 6px;
  color: #c9d4e3;
  font-size: 0.98rem;
}

.status-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  font-size: 2rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-icon.is-loading {
  animation: spinPulse 1s linear infinite;
}

.status-icon.is-success {
  color: #bdf8d4;
  background: rgba(45, 220, 121, 0.14);
}

.status-icon.is-error {
  color: #ffd3db;
  background: rgba(255, 122, 144, 0.14);
}

.retry-btn {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 18px;
  color: #dce7f4;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.retry-btn:hover {
  transform: rotate(-18deg) scale(1.04);
  background: rgba(255, 255, 255, 0.18);
}

/* Falls statusBox im HTML noch vorhanden ist, ausblenden */

.upload-status {
  display: none;
}

/* Dashboard */

.dashboard-card {
  width: min(100%, 720px);
  padding: 22px;
  background: linear-gradient(
    180deg,
    rgba(17, 28, 55, 0.95),
    rgba(14, 22, 45, 0.95)
  );
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.overview-card {
  padding: 4px 0 18px;
}

.overview-title {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 12px;
}

.overview-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.overview-stat {
  min-width: 160px;
  padding: 14px 16px;
  border-radius: 14px;
}

.overview-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
}

.overview-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

@media (max-width: 720px) {
  .overview-card {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 0;
    background: rgba(3, 11, 29, 0.92);
    backdrop-filter: blur(16px);
  }
}

.risk-low {
  background: rgba(45, 220, 121, 0.16);
  color: #bdf8d4;
  border: 1px solid rgba(45, 220, 121, 0.16);
}

.risk-medium {
  background: rgba(242, 202, 116, 0.17);
  color: #ffe8a8;
  border: 1px solid rgba(242, 202, 116, 0.15);
}

.risk-medium-high {
  background: rgba(251, 146, 60, 0.17);
  color: #fed7aa;
  border: 1px solid rgba(251, 146, 60, 0.15);
}

.risk-high {
  background: rgba(255, 122, 144, 0.17);
  color: #ffd1d9;
  border: 1px solid rgba(255, 122, 144, 0.17);
}

.dashboard-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-section-title {
  font-size: 17px;
  font-weight: 800;
}

.dashboard-section-copy {
  margin-top: 5px;
  color: var(--muted);
  font-size: 14px;
}

.subscription-list {
  display: grid;
  gap: 12px;
}

.subscription-item {
  position: relative;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.screen-dashboard.is-entering-right .subscription-item {
  animation: listItemIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen-dashboard.is-entering-right .subscription-item:nth-child(2) {
  animation-delay: 0.04s;
}

.screen-dashboard.is-entering-right .subscription-item:nth-child(3) {
  animation-delay: 0.08s;
}

.screen-dashboard.is-entering-right .subscription-item:nth-child(4) {
  animation-delay: 0.12s;
}

.screen-dashboard.is-entering-right .subscription-item:nth-child(5) {
  animation-delay: 0.16s;
}

.screen-dashboard.is-entering-right .subscription-item:nth-child(6) {
  animation-delay: 0.2s;
}

.subscription-item.is-cancelled {
  opacity: 0.72;
}

.subscription-item.is-cancelled .subscription-price {
  text-decoration: line-through;
}

.subscription-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.subscription-main {
  min-width: 0;
}

.subscription-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.subscription-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.subscription-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.subscription-price {
  font-size: 18px;
  font-weight: 900;
}

.menu-trigger {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.25rem;
  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

.menu-trigger:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.09);
}

.item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.item-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.05);
  color: #dbe7f4;
}

.badge-warning {
  background: rgba(242, 202, 116, 0.12);
  color: #ffe29c;
}

.badge-success {
  background: rgba(45, 220, 121, 0.12);
  color: #bdf8d4;
}

.badge-info {
  background: rgba(129, 140, 248, 0.12);
  color: #ced5ff;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% - 6px);
  right: 12px;
  width: 230px;
  padding: 8px;
  border-radius: 16px;
  background: rgba(12, 18, 35, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  z-index: 15;
  transform-origin: top right;
  animation: menuIn 0.18s ease both;
}

.dropdown-menu button,
.dropdown-menu a {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 12px 13px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.dropdown-menu button:hover,
.dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-menu .action-danger {
  color: #ffb9c4;
}

.dropdown-menu .action-success {
  color: #bcf8d2;
}

.empty-state {
  padding: 28px 20px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  font-size: 15px;
}

/* Animations */

@keyframes floatBlob {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    transform: translate3d(60px, -40px, 0) scale(1.12);
  }
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes swipeOutLeft {
  from {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }

  to {
    opacity: 0;
    transform: translateX(-90px) scale(0.97);
    filter: blur(10px);
  }
}

@keyframes swipeInRight {
  from {
    opacity: 0;
    transform: translateX(110px) scale(0.98);
    filter: blur(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

@keyframes titleLift {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pillPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(24px) rotateX(8deg) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) rotateX(0) scale(1);
  }
}

@keyframes statusBump {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.018);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes statusSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes spinPulse {
  from {
    transform: rotate(0deg) scale(1);
  }

  50% {
    transform: rotate(180deg) scale(1.06);
  }

  to {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes listItemIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive */

@media (max-width: 720px) {
  .app-shell {
    padding-top: 36px;
  }

  .topbar-inner,
  .dashboard-header-row,
  .subscription-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    font-size: 1.25rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .topbar-actions {
    width: 100%;
  }

  h1 {
    font-size: clamp(2.6rem, 13vw, 4rem);
  }

  .screen-header {
    margin-bottom: 30px;
  }

  .upload-card,
  .dashboard-card {
    width: 100%;
  }

  .upload-card-inner {
    padding: 18px;
  }

  .dropzone {
    min-height: 190px;
    padding: 14px;
  }

  .dropzone-frame {
    min-height: 145px;
  }

  .upload-title {
    font-size: 1.55rem;
  }

  .btn-primary {
    min-width: 210px;
    font-size: 1rem;
  }

  .status-card {
    flex-direction: column;
    text-align: center;
  }

  .subscription-right {
    width: 100%;
    justify-content: space-between;
  }

  .dropdown-menu {
    left: 12px;
    right: 12px;
    width: auto;
  }
}

@media (max-width: 460px) {
  .status-pill,
  .mini-pill {
    font-size: 12px;
    padding: 8px 12px;
  }

  .btn {
    width: 100%;
    min-width: 0;
  }

  .dropzone-content {
    gap: 22px;
  }

  .status-icon,
  .retry-btn {
    width: 54px;
    height: 54px;
  }
}

/* Reduced motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Kündigungs-Popup */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 8, 23, 0.72);
  backdrop-filter: blur(14px);
}

.modal-backdrop.hidden {
  display: none;
}

.cancel-popup {
  position: relative;
  width: min(100%, 520px);
  padding: 28px;
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 18% 14%,
      rgba(45, 220, 121, 0.2),
      transparent 38%
    ),
    linear-gradient(180deg, rgba(17, 28, 55, 0.98), rgba(12, 19, 38, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  animation: popupIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cancel-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.cancel-popup-icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 22px;
  color: #bdf8d4;
  background: rgba(45, 220, 121, 0.14);
  border: 1px solid rgba(45, 220, 121, 0.18);
  font-size: 2rem;
  font-weight: 900;
}

.cancel-popup h2 {
  max-width: 420px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.cancel-popup p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.cancel-popup-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cancel-popup-card span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.cancel-popup-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.25rem;
}

.cancel-popup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.cancel-popup-actions .btn {
  flex: 1;
  min-width: 190px;
}

@keyframes popupIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
    filter: blur(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@media (max-width: 520px) {
  .cancel-popup {
    padding: 22px;
  }

  .cancel-popup h2 {
    font-size: 1.65rem;
  }

  .cancel-popup-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* Toast Feedback */

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  max-width: min(420px, calc(100% - 48px));
  padding: 14px 18px;
  border-radius: 999px;
  color: #bdf8d4;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(45, 220, 121, 0.18),
      transparent 42%
    ),
    rgba(12, 18, 35, 0.96);
  border: 1px solid rgba(45, 220, 121, 0.2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(14px);
  transform: translateY(14px) scale(0.96);
  opacity: 0;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast.is-error {
  color: #ffd1d9;
  border-color: rgba(255, 122, 144, 0.22);
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(255, 122, 144, 0.18),
      transparent 42%
    ),
    rgba(12, 18, 35, 0.96);
}

.toast span {
  display: block;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cancel-popup-actions .btn.is-copied {
  background: linear-gradient(135deg, #29dd73, #16a34a);
  color: #062617;
}

@media (max-width: 520px) {
  .toast {
    right: 16px;
    bottom: 16px;
    max-width: calc(100% - 32px);
    border-radius: 18px;
  }
}

/* Animation-Fix: keine automatischen Re-Animations beim View-Wechsel */

.screen,
.screen-header h1,
.mini-pill,
.upload-card,
.dashboard-card {
  animation: none;
}

/* Nur explizite View-Wechsel animieren */
.screen.is-leaving-left {
  animation: swipeOutLeft 0.48s cubic-bezier(0.7, 0, 0.84, 0) both;
}

.screen.is-entering-right {
  animation: swipeInRight 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Dashboard/Upload-Card nur beim echten Screen-Enter animieren */
.screen.is-entering-right .dashboard-card,
.screen.is-entering-right .upload-card {
  animation: cardReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Headline nur beim echten Screen-Enter animieren */
.screen.is-entering-right .screen-header h1 {
  animation: titleLift 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Pills nur beim echten Screen-Enter animieren */
.screen.is-entering-right .mini-pill {
  animation: pillPop 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen.is-entering-right .mini-pill:nth-child(2) {
  animation-delay: 0.06s;
}

.screen.is-entering-right .mini-pill:nth-child(3) {
  animation-delay: 0.12s;
}

/* Status-Animationen sollen weiterhin funktionieren */
.status-card {
  animation: statusSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.status-icon.is-loading {
  animation: spinPulse 1s linear infinite;
}

.upload-card.is-loading,
.upload-card.is-success,
.upload-card.is-error {
  animation: statusBump 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Popup und Toast sollen weiterhin funktionieren */
.cancel-popup {
  animation: popupIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.screen-dashboard.is-entering-right .subscription-item {
  animation: listItemIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Cleaner Dashboard Cards */

.dashboard-header-row {
  align-items: flex-start;
}

.dashboard-footer {
  display: flex;
  justify-content: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.subtle-action {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.subtle-action:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.cancelled-note {
  display: inline-flex;
  margin-top: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ced5ff;
  background: rgba(129, 140, 248, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.subscription-item {
  padding: 18px;
}

.subscription-meta {
  font-size: 13px;
}

@media (max-width: 720px) {
  .dashboard-footer {
    margin-top: 14px;
  }

  .subtle-action {
    width: 100%;
    padding: 13px 16px;
    background: rgba(255, 255, 255, 0.035);
  }
}
