:root {
  --bg: #050308;
  --bg-alt: #0e050b;
  --bg-card: #14060d;
  --bg-card-soft: #1c0710;
  --accent: #b21934; /* dark red */
  --accent-soft: #7e0f24;
  --accent-strong: #ff3a5f;
  --accent-glow: rgba(255, 58, 95, 0.4);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text-main: #ffffff;
  --text-muted: #d0d0d0;
  --text-soft: #9b9b9b;
  --danger: #ff4b81;
  --success: #28c76f;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.8);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --transition-fast: 0.18s ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--text-main);
  background: radial-gradient(circle at top left, #33000f 0, #050308 40%, #010104 100%);
}

.page-shell {
  min-height: 100vh;
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

/* HEADER */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.header-left,
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Buttons */

button {
  font-family: inherit;
  border: none;
  outline: none;
  cursor: pointer;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-soft);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  border: 1px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), transform var(--transition-fast);
}

.back-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.primary-button,
.ghost-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast), color var(--transition-fast),
    border-color var(--transition-fast), opacity var(--transition-fast);
}

.primary-button {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: var(--text-main);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 26px rgba(178, 25, 52, 0.65);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 18px 40px rgba(178, 25, 52, 0.8);
}

.primary-button.disabled,
.primary-button:disabled {
  opacity: 0.4;
  box-shadow: none;
  cursor: default;
}

/* Ghost & secondary */

.ghost-button {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border-radius: 999px;
  padding-inline: 14px;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Sizes */

.primary-button.large,
.ghost-button.large {
  padding: 11px 22px;
  font-size: 14px;
}

.full-width {
  width: 100%;
}

/* Icon-only */

.icon-button {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
}

/* MAIN LAYOUT */

.main-view {
  display: none;
}

.main-view.active-view {
  display: block;
}

.page-header {
  margin-bottom: 26px;
}

.title-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-circle {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: radial-gradient(circle at top, #ff3a5f 0, #4b0613 40%, #0d0207 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.9);
}

.brand-logo {
  width: 30px;
  height: auto;
  display: block;
}

.page-header h1 {
  margin: 0 0 4px;
  font-size: 32px;
  letter-spacing: 0.02em;
}

.page-header p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* CENTER CARD */

.center-card {
  margin-top: 30px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, #2f0713 0, #10030a 46%, #050308 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  padding: 40px 32px;
  text-align: center;
}

.card-inner {
  max-width: 700px;
  margin: 0 auto;
}

.card-icon-lock,
.card-icon-success {
  width: 80px;
  height: 80px;
  border-radius: 999px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
}

.card-icon-lock {
  background: radial-gradient(circle at top, #ff3a5f 0, #4b0613 40%, #0d0207 100%);
  color: var(--text-main);
  box-shadow: 0 0 45px var(--accent-glow);
}

.card-icon-success {
  background: radial-gradient(circle at top, #28c76f 0, #08361d 40%, #030806 100%);
  color: #d8ffe9;
}

.center-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.card-subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

/* SUCCESS CARD */

.hash-box {
  margin: 0 auto 26px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  font-family: "DM Sans", monospace;
}

.hash-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.hash-value {
  margin: 0;
  font-size: 13px;
  color: var(--accent-strong);
  word-break: break-all;
}

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

/* UPLOAD CARD */

.upload-card {
  margin-top: 30px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at top left, #330712 0, #11020a 45%, #050308 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-soft);
}

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

.field-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

/* Dropzone */

.dropzone {
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, #380718 0, #0b0206 55%, #050308 100%);
  padding: 2px;
  margin-bottom: 24px;
}

.dropzone-border {
  border-radius: inherit;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  padding: 38px 24px;
  position: relative;
  background: radial-gradient(circle at top left, rgba(255, 58, 95, 0.08), rgba(0, 0, 0, 0.8));
}

.dropzone:hover .dropzone-border {
  border-color: rgba(255, 255, 255, 0.26);
}

.dropzone-content {
  text-align: center;
}

.dropzone-icon {
  font-size: 32px;
  color: var(--accent-strong);
  margin-bottom: 14px;
}

.dropzone-title {
  margin: 0 0 4px;
  font-size: 16px;
}

.dropzone-subtitle {
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--text-soft);
}

.dropzone-hint {
  margin: 10px 0 4px;
  font-size: 12px;
  color: var(--text-soft);
}

.browse-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.browse-button:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.8);
}

.file-input {
  display: none;
}

.selected-file-info {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--accent-strong);
}

/* Password row */

.password-row {
  margin-top: 18px;
}

.password-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.password-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13px;
}

.password-input::placeholder {
  color: var(--text-soft);
}

.password-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: var(--text-soft);
}

.password-note i {
  margin-top: 3px;
  color: var(--accent-strong);
}

.password-note strong {
  color: var(--text-main);
}

/* Feature row */

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.feature-pill {
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(178, 25, 52, 0.22), rgba(5, 3, 8, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #ff3a5f 0, #4b0613 40%, #0d0207 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text-main);
}

.feature-pill h3 {
  margin: 4px 0 0;
  font-size: 13px;
}

.feature-pill p {
  margin: 0;
  font-size: 12px;
  color: var(--text-soft);
}

/* Encrypt row */

.encrypt-row {
  margin-top: 24px;
}

/* FILES VIEW */

.files-header-row {
  margin-top: 30px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.files-section-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.files-section-title i {
  color: var(--accent-strong);
}

.files-count-badge {
  font-size: 12px;
  color: var(--text-soft);
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.file-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: radial-gradient(circle at top, #ff3a5f 0, #4b0613 40%, #0d0207 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

.file-name {
  font-size: 14px;
  margin-bottom: 2px;
}

.file-meta {
  font-size: 12px;
  color: var(--text-soft);
}

.file-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* MODALS */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

.modal {
  width: 100%;
  max-width: 520px;
  background: radial-gradient(circle at top left, #3a0716 0, #0b0206 50%, #030105 100%);
  border-radius: 24px;
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-modal {
  max-width: 560px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-subtitle {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.modal-footer-note {
  margin: 14px 0 0;
  font-size: 12px;
  color: var(--text-soft);
}

.modal-field {
  margin-top: 10px;
}

.text-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 13px;
}

.text-input::placeholder {
  color: var(--text-soft);
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}

/* Wallet options */

.wallet-option-list {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wallet-option {
  width: 100%;
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.wallet-option:hover {
  background: rgba(178, 25, 52, 0.3);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.85);
  transform: translateY(-1px);
}

.wallet-option-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wallet-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  overflow: hidden;
  background: #0c0c10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-avatar img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.wallet-name {
  font-size: 14px;
}

.wallet-status {
  font-size: 12px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-online {
  background: #29c86f;
}

/* Progress steps */

.progress-steps {
  list-style: none;
  padding: 0;
  margin: 14px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-step {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.65;
}

.progress-step.active {
  border-color: rgba(255, 255, 255, 0.2);
  opacity: 1;
}

.progress-step.completed {
  border-color: rgba(40, 199, 111, 0.8);
  opacity: 1;
}

.step-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at top, #ff3a5f 0, #4b0613 40%, #0d0207 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.step-text {
  font-size: 13px;
}

.step-title {
  margin-bottom: 2px;
}

.step-desc {
  font-size: 11px;
  color: var(--text-soft);
}

.step-status-icon {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.2);
}

.progress-step.completed .step-status-icon {
  color: var(--success);
}

/* Progress bar */

.progress-bar-wrapper {
  margin-top: 10px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.progress-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 18px var(--accent-glow);
  transition: width 0.25s ease-out;
}

.progress-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-soft);
}

/* Toast */

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: rgba(0, 0, 0, 0.92);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.85);
  z-index: 50;
}

.toast.error {
  border-color: rgba(255, 76, 121, 0.9);
}

.toast.success {
  border-color: rgba(40, 199, 111, 0.9);
}

/* Utilities */

.hidden {
  display: none !important;
}

/* RESPONSIVE */

@media (max-width: 900px) {
  .page-shell {
    padding: 18px 18px 36px;
  }

  .title-group {
    align-items: flex-start;
  }

  .feature-row {
    grid-template-columns: 1fr;
  }

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

  .center-card {
    padding-inline: 18px;
  }
}

@media (max-width: 600px) {
  .app-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-right {
    justify-content: flex-end;
  }

  .password-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .password-input {
    width: 100%;
  }

  .secondary-button,
  .icon-button {
    width: 100%;
  }

  .modal {
    margin-inline: 14px;
  }

  .file-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-item-right {
    width: 100%;
    justify-content: flex-end;
  }
}
