/* Dexterify Share Design System - Glassmorphic Smokey Shader Theme */
:root {
  /* 4px spacing grid */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Deep slate/graphite canvas colors */
  --bg-page: #0b0f19;
  --bg-glass: rgba(255, 255, 255, 0.06);
  --bg-glass-input: rgba(0, 0, 0, 0.32);
  --bg-glass-subtle: rgba(255, 255, 255, 0.04);
  --border-glass: rgba(255, 255, 255, 0.16);
  --border-glass-subtle: rgba(255, 255, 255, 0.09);
  --border-focus: #3b82f6;

  /* Typography roles */
  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  /* Blue accent from user specification */
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-active: #1e40af;
  --color-accent-subtle: rgba(37, 99, 235, 0.2);

  /* Semantic status colors */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Radius math (outer 16px, inner 8px) */
  --radius-outer: 16px;
  --radius-inner: 8px;

  /* Typography fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Glassmorphic shadows */
  --shadow-glass: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-btn: 0 4px 14px rgba(37, 99, 235, 0.35);
  --transition-smooth: 200ms ease;
}

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

html, body {
  min-height: 100%;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Background canvas and blur layer */
.smokey-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.smokey-blur-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 1;
}

/* Tabular numbers */
select, input, .pipeline-step, .payload-meta {
  font-variant-numeric: tabular-nums;
}

/* Visibility */
.view-hidden {
  display: none !important;
}

/* Main app container */
.app-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: row;
}

/* Glassmorphism card class */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-glass);
}

/* Left Sidebar */
.sidebar {
  width: 440px;
  min-width: 380px;
  max-width: 480px;
  border-radius: 0;
  border-top: none;
  border-left: none;
  border-bottom: none;
  border-right: 1px solid var(--border-glass);
  padding: var(--space-12) var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sidebar-top {
  display: flex;
  flex-direction: column;
}

/* Brand Header */
.brand-header {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  width: fit-content;
}

.brand-header:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 4px;
  border-radius: var(--radius-inner);
}

.brand-logo {
  width: 34px;
  height: 34px;
  background-color: var(--color-accent);
  border-radius: var(--radius-inner);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  background-color: var(--color-accent-subtle);
  color: #93c5fd;
  border-radius: 4px;
  border: 1px solid rgba(59, 130, 246, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Sidebar Copy */
.sidebar-content {
  margin-top: var(--space-8);
}

.sidebar-title {
  font-size: 1.85rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-4);
}

.sidebar-subtitle {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

/* Cryptographic Security Pipeline */
.security-pipeline {
  display: flex;
  align-items: center;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass-subtle);
  border-radius: var(--radius-inner);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-8);
  backdrop-filter: blur(8px);
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pipeline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #60a5fa;
  box-shadow: 0 0 8px rgba(96, 165, 250, 0.6);
}

.pipeline-label {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.pipeline-connector {
  flex: 1;
  height: 1px;
  background-color: var(--border-glass-subtle);
  margin: 0 var(--space-3);
}

/* Features */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.feature-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background-color: var(--color-accent-subtle);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.feature-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.feature-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Sidebar Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-glass-subtle);
}

.sidebar-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-smooth);
}

.sidebar-footer a:hover {
  color: var(--text-secondary);
}

.sidebar-footer a:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-sep {
  color: var(--text-muted);
  font-size: 0.6rem;
  opacity: 0.5;
}

/* Main workspace */
.main-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10) var(--space-6);
}

/* Glass Modal Box */
.modal-box {
  width: 100%;
  max-width: 490px;
  border-radius: var(--radius-outer);
  padding: var(--space-8);
}

/* Card titles */
.card-header {
  margin-bottom: var(--space-5);
}

.card-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.card-subtitle {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Forms */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.secret-textarea {
  width: 100%;
  height: 165px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-primary);
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.secret-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

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

/* Expiration Row */
.expire-split {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.select-wrapper {
  flex: 1;
  position: relative;
}

.custom-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-2) var(--space-8) var(--space-2) var(--space-3);
  font-size: 0.88rem;
  color: var(--text-primary);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.custom-select::-ms-expand {
  display: none;
}

.custom-select:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.custom-select:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.select-icon {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.split-or {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  user-select: none;
}

/* Text Inputs */
.text-input {
  width: 100%;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-2) var(--space-3);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.text-input:focus-visible {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

/* Buttons */
.btn-primary {
  width: 100%;
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-inner);
  padding: var(--space-3) var(--space-4);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
  box-shadow: var(--shadow-btn);
  transition: background-color var(--transition-smooth), transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.btn-primary:active:not(:disabled) {
  background-color: var(--color-accent-active);
  transform: translateY(0);
}

.btn-primary:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-icon {
  flex-shrink: 0;
  transition: transform var(--transition-smooth);
}

.btn-primary:hover .btn-icon {
  transform: translateX(2px);
}

.btn-secondary {
  width: 100%;
  background: var(--bg-glass-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-2) var(--space-4);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  text-decoration: none;
  transition: background-color var(--transition-smooth), color var(--transition-smooth), border-color var(--transition-smooth);
}

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

.btn-secondary:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Link Box */
.link-box {
  display: flex;
  align-items: stretch;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.link-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #93c5fd;
  outline: none;
}

.link-input:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}

.btn-copy {
  background-color: var(--color-accent-subtle);
  color: #93c5fd;
  border: none;
  border-left: 1px solid var(--border-glass);
  padding: 0 var(--space-3);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

.btn-copy:hover {
  background-color: rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.btn-copy:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: -2px;
}

/* Checkbox */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  margin-bottom: var(--space-5);
}

.checkbox-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
}

.checkbox-label input[type="checkbox"]:checked::before {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
}

.checkbox-label input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* Separate Password Display Box */
.password-display-box {
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-3);
  margin-bottom: var(--space-5);
}

.password-box-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.password-box-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #93c5fd;
}

.password-box-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.password-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.password-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #ffffff;
  word-break: break-all;
}

.btn-copy-inline {
  background: var(--bg-glass-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: color var(--transition-smooth), border-color var(--transition-smooth);
}

.btn-copy-inline:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-copy-inline:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 1px;
}

/* Social Share Row */
.social-share-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: var(--space-5) 0;
}

.social-share-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.social-share-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.social-btn {
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  padding: var(--space-1) var(--space-3);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  transition: background-color var(--transition-smooth), color var(--transition-smooth), border-color var(--transition-smooth);
}

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

.social-btn:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* View Limit Counter Pill */
.view-limit-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #93c5fd;
  margin-bottom: var(--space-4);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(8px);
}

.view-limit-pill .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.8);
  flex-shrink: 0;
}

.view-limit-pill.burned {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.view-limit-pill.burned .pill-dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Notice Banners */
.notice-banner {
  border-radius: var(--radius-inner);
  padding: var(--space-3);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
}

.notice-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.notice-banner.info {
  background-color: rgba(37, 99, 235, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  color: #93c5fd;
}

.notice-banner.warning {
  background-color: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.notice-banner.success {
  background-color: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.notice-banner.burned {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fecaca;
}

/* Decrypted Payload Container */
.payload-container {
  background: var(--bg-glass-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-inner);
  margin-bottom: var(--space-4);
  overflow: hidden;
}

.payload-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  background-color: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-glass-subtle);
}

.payload-tag {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.payload-meta {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.decrypted-secret-view {
  padding: var(--space-3);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #f8fafc;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow-y: auto;
  line-height: 1.55;
}

/* Burned state details */
.burned-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: var(--space-5);
}

/* Error text */
.error-text {
  color: var(--color-danger);
  font-size: 0.82rem;
  margin-top: var(--space-2);
  display: none;
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-glass);
    padding: var(--space-8) var(--space-6);
  }
  .sidebar-title {
    font-size: 1.5rem;
  }
  .security-pipeline {
    margin-bottom: var(--space-6);
  }
  .main-stage {
    padding: var(--space-8) var(--space-4);
  }
  .modal-box {
    padding: var(--space-6);
  }
}
