/* ==========================================================================
   MYSHORTLINK — ULTRA-MINIMALIST CYBER-RUST DESIGN SYSTEM
   Faithful aesthetic replica of safdns.top / skyandfly.lol
   Aesthetic: Hollow Vector Lines / Obsidian Void / Minimalist Brutalism
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@700;800;900&display=swap');

:root {
  /* Obsidian Void & Surfaces */
  --bg-void: #060504;
  --bg-card: rgba(16, 12, 10, 0.75);
  --bg-card-hover: rgba(22, 16, 13, 0.90);
  --bg-code: rgba(10, 7, 5, 0.92);

  /* Rust & Dark Orange Accent Scale */
  --rust-900: #381408;
  --rust-700: #822e0f;
  --rust-600: #b04117;
  --rust-primary: #e05a2b;
  --rust-bright: #ff6a38;
  --amber-glow: #ff8c42;
  --cyber-green: #00ff88;
  --cyber-red: #ff3344;

  /* Borders & Strokes */
  --border-subtle: rgba(224, 90, 43, 0.15);
  --border-hover: rgba(224, 90, 43, 0.45);
  --border-bright: rgba(255, 106, 56, 0.7);

  /* Typography Colors */
  --text-main: #f5eeea;
  --text-sub: #a89890;
  --text-muted: #6e6059;

  /* Fonts */
  --font-hollow: 'Syne', sans-serif;
  --font-body: 'Space Grotesk', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 0.3s var(--ease-expo);

  /* Layout */
  --radius-sm: 6px;
  --radius-md: 12px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-void);
  color: var(--text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-void);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  padding: max(24px, env(safe-area-inset-top, 24px)) max(14px, env(safe-area-inset-right, 14px)) max(28px, env(safe-area-inset-bottom, 28px)) max(14px, env(safe-area-inset-left, 14px));
}

/* Architectural Grid Background (safdns.top exact) */
.bg-grid {
  position: fixed;
  inset: 0;
  background-size: 48px 48px;
  background-image: 
    linear-gradient(to right, rgba(224, 90, 43, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(224, 90, 43, 0.035) 1px, transparent 1px);
  pointer-events: none;
  z-index: 1;
}

/* Ambient Rust Atmosphere */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(140px);
}

.glow-rust {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(224, 90, 43, 0.12) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.8;
}

/* ==========================================================================
   HOLLOW STROKE TYPOGRAPHY (SIGNATURE SAFDNS / SKYANDFLY FEATURE)
   ========================================================================== */
.hollow-title {
  font-family: var(--font-hollow);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.8px var(--rust-primary);
  text-stroke: 1.8px var(--rust-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-block;
  user-select: none;
  transition: all var(--transition);
}

.hollow-massive {
  font-size: clamp(2.2rem, 5.8vw, 3.8rem);
  line-height: 1.05;
  -webkit-text-stroke: 2px var(--rust-primary);
  text-stroke: 2px var(--rust-primary);
}

.hollow-massive:hover {
  -webkit-text-stroke-color: var(--rust-bright);
  filter: drop-shadow(0 0 24px rgba(224, 90, 43, 0.45));
}

.hollow-accent {
  -webkit-text-stroke-color: var(--rust-bright);
  text-stroke-color: var(--rust-bright);
}

.hollow-sub {
  font-size: clamp(1.1rem, 2.8vw, 1.8rem);
  line-height: 1.2;
  -webkit-text-stroke: 1.2px var(--rust-primary);
  text-stroke: 1.2px var(--rust-primary);
  display: block;
  margin-top: 6px;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--rust-bright);
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
}

.section-heading {
  font-family: var(--font-hollow);
  font-size: clamp(1.6rem, 3.8vw, 2.4rem);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1.6px var(--rust-primary);
  text-stroke: 1.6px var(--rust-primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   CENTER WRAPPER & MAIN APP CARD
   ========================================================================== */
.center-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 680px;
  margin: auto;
}

.app-card {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 44px 36px 36px;
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(224, 90, 43, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.app-card:hover {
  border-color: var(--border-hover);
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--rust-bright), var(--rust-primary), transparent);
}

/* Brand Telemetry Badge */
.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-sub);
  letter-spacing: 0.12em;
  padding: 4px 12px;
  background: rgba(224, 90, 43, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: 22px;
  user-select: none;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyber-green);
  box-shadow: 0 0 8px var(--cyber-green);
  animation: hudPulse 2s infinite ease-in-out;
}

@keyframes hudPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.badge-text {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--rust-bright);
}

.hero-title-group {
  margin-bottom: 14px;
  text-align: center;
  width: 100%;
}

.main-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 12px;
  margin-bottom: 2px;
  text-align: center;
}

.hollow-part {
  display: inline-block;
  white-space: nowrap;
}

.main-subtitle {
  font-size: 0.96rem;
  color: var(--text-sub);
  font-weight: 300;
  line-height: 1.6;
  max-width: 520px;
  margin: 0 auto 30px;
}

/* ==========================================================================
   SHORTEN FORM & INPUT CONTROLS
   ========================================================================== */
.input-card {
  width: 100%;
  margin-bottom: 20px;
}

.input-inner {
  display: flex;
  align-items: center;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 8px 6px 14px;
  gap: 10px;
  transition: all var(--transition);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.input-inner:focus-within {
  border-color: var(--rust-bright);
  box-shadow: 
    0 0 20px rgba(224, 90, 43, 0.3),
    inset 0 2px 8px rgba(0, 0, 0, 0.6);
}

.input-icon {
  color: var(--rust-primary);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.styled-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.92rem;
  min-width: 0;
  line-height: 1.5;
}

.styled-input::placeholder {
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.quick-paste-btn {
  background: rgba(16, 12, 10, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.quick-paste-btn:hover {
  border-color: var(--rust-bright);
  color: var(--text-main);
  background: rgba(22, 16, 13, 0.95);
  box-shadow: 0 0 14px rgba(224, 90, 43, 0.25);
}

.glow-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--rust-primary);
  color: #ffffff;
  border: 1px solid var(--rust-bright);
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 0 20px rgba(224, 90, 43, 0.35);
  transition: all var(--transition);
  white-space: nowrap;
}

.glow-submit-btn:hover {
  background: var(--rust-bright);
  box-shadow: 0 0 28px rgba(224, 90, 43, 0.55);
  transform: translateY(-1px);
}

.glow-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow {
  font-family: var(--font-mono);
  font-weight: 700;
}

.error-msg {
  color: #ff6b7a;
  background: rgba(255, 51, 68, 0.08);
  border: 1px solid rgba(255, 51, 68, 0.3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-top: 12px;
  padding: 8px 14px;
  text-align: left;
}

/* ==========================================================================
   RESULT CONTAINER (MATCHES SAFDNS .ADDR-CARD.FEATURED)
   ========================================================================== */
.result-container {
  width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(224, 90, 43, 0.45);
  border-radius: var(--radius-md);
  padding: 24px 26px;
  margin-bottom: 22px;
  box-shadow: 
    0 16px 36px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(224, 90, 43, 0.15);
  position: relative;
  overflow: hidden;
  text-align: left;
  animation: fadeIn 0.3s var(--ease-expo);
}

.result-glow-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rust-primary), var(--rust-bright), var(--amber-glow));
}

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

.ready-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyber-green);
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.result-label {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--rust-bright);
  letter-spacing: 0.12em;
  font-weight: 600;
}

.result-content-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
}

.result-info-col {
  flex: 1;
  min-width: 0;
}

.short-url-field {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  word-break: break-all;
  user-select: all;
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.domain-part {
  color: var(--text-muted);
}

.slug-part {
  color: var(--rust-bright);
  font-weight: 600;
}

.result-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Action Buttons (Matches safdns .btn-minimal) */
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-copy {
  background: rgba(224, 90, 43, 0.14);
  color: var(--rust-bright);
  border: 1px solid var(--rust-primary);
  font-weight: 600;
}

.btn-copy:hover {
  background: var(--rust-primary);
  color: #fff;
  border-color: var(--rust-bright);
  box-shadow: 0 0 20px rgba(224, 90, 43, 0.45);
  transform: translateY(-1px);
}

.btn-copy.copied {
  background: rgba(0, 255, 136, 0.15);
  color: var(--cyber-green);
  border-color: var(--cyber-green);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.3);
}

.btn-open, .btn-qr {
  color: var(--text-sub);
  border: 1px solid var(--border-subtle);
  background: rgba(16, 12, 10, 0.55);
}

.btn-open:hover, .btn-qr:hover {
  color: var(--text-main);
  border-color: var(--border-hover);
  background: rgba(22, 16, 13, 0.85);
  transform: translateY(-1px);
}

.original-url-row {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-top: 4px;
}

.orig-label,
.original-url-row span {
  color: var(--text-muted);
  flex-shrink: 0;
}

.original-url-row a {
  color: var(--text-sub);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--transition);
}

.original-url-row a:hover {
  color: var(--rust-bright);
  text-decoration: underline;
}

.qr-preview-box {
  background: #ffffff;
  padding: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 0 20px rgba(224, 90, 43, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-preview-box img {
  width: 96px;
  height: 96px;
  display: block;
}

/* ==========================================================================
   "MY LINKS" CARD (MATCHES SAFDNS .PANE STYLE)
   ========================================================================== */
.my-links-card {
  width: 100%;
  margin-top: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-align: left;
}

.my-links-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.my-links-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.my-links-title {
  font-family: var(--font-mono);
  font-size: 0.80rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--rust-bright);
  text-transform: uppercase;
}

.my-links-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.blur-toggle-btn {
  background: rgba(16, 12, 10, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 0.74rem;
  font-family: var(--font-mono);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition);
}

.blur-toggle-btn:hover {
  border-color: var(--rust-bright);
  color: var(--text-main);
  background: rgba(22, 16, 13, 0.95);
}

.clear-history-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 4px 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.clear-history-btn:hover {
  color: var(--cyber-red);
}

.my-links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Privacy Blur Effect */
.my-links-list.blurred .my-link-title-text,
.my-links-list.blurred .expanded-url-box,
.my-links-list.blurred .original-url-row a {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  transition: filter 0.25s ease;
}

.my-links-list.blurred .expanded-qr-col img {
  filter: blur(8px);
  user-select: none;
  transition: filter 0.25s ease;
}

.my-link-title-text,
.expanded-url-box,
.original-url-row a,
.expanded-qr-col img {
  transition: filter 0.25s ease;
}

/* Accordion Item */
.my-link-accordion-item {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition);
}

.my-link-accordion-item:hover {
  border-color: var(--border-hover);
  background: rgba(14, 10, 8, 0.95);
}

.my-link-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  gap: 12px;
  user-select: none;
}

.my-link-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.chevron-icon {
  color: var(--rust-primary);
  transition: transform 0.2s var(--ease-expo);
  flex-shrink: 0;
}

.my-link-accordion-item.open .chevron-icon {
  transform: rotate(180deg);
  color: var(--rust-bright);
}

.my-link-title-text {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--rust-bright);
  word-break: break-all;
}

.my-link-header-right {
  display: flex;
  gap: 6px;
}

.btn-mini-copy {
  background: rgba(16, 12, 10, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-mini-copy:hover {
  color: var(--rust-bright);
  border-color: var(--rust-primary);
  background: rgba(224, 90, 43, 0.1);
}

.my-link-expanded-body {
  display: none;
  padding: 0 14px 14px;
  border-top: 1px solid var(--border-subtle);
  animation: fadeIn 0.2s var(--ease-expo);
}

.my-link-accordion-item.open .my-link-expanded-body {
  display: block;
}

.expanded-card-inner {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 12px;
}

.expanded-info-col {
  flex: 1;
  min-width: 0;
}

.expanded-url-box {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 500;
  word-break: break-all;
  background: rgba(6, 5, 4, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 10px;
  line-height: 1.45;
  user-select: all;
}

.expanded-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.expanded-qr-col {
  background: #ffffff;
  padding: 5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 0 14px rgba(224, 90, 43, 0.2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expanded-qr-col img {
  width: 80px;
  height: 80px;
  display: block;
}

/* ==========================================================================
   FOOTER (MATCHING SAFDNS / SKYANDFLY.LOL FOOTER)
   ========================================================================== */
.center-footer {
  margin-top: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.saf-link {
  color: var(--rust-bright) !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: all var(--transition);
}

.saf-link:hover {
  color: #fff !important;
  filter: drop-shadow(0 0 8px rgba(224, 90, 43, 0.7));
}

/* ==========================================================================
   TOAST NOTIFICATION (MATCHING SAFDNS .TOAST-NOTICE)
   ========================================================================== */
.toast-box {
  position: fixed;
  bottom: max(24px, env(safe-area-inset-bottom, 24px));
  left: 50%;
  transform: translateX(-50%) translateY(50px);
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  background: rgba(18, 13, 10, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--rust-bright);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(224, 90, 43, 0.3);
  color: var(--text-main);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  z-index: 99999;
  opacity: 0;
  transition: all var(--transition);
  pointer-events: none;
}

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

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (ALL DEVICES: PHONES, TABLETS, DESKTOPS)
   ========================================================================== */
@media (max-width: 680px) {
  body {
    padding: max(20px, env(safe-area-inset-top, 20px)) max(12px, env(safe-area-inset-right, 12px)) max(24px, env(safe-area-inset-bottom, 24px)) max(12px, env(safe-area-inset-left, 12px));
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .center-wrapper {
    margin: auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .app-card {
    padding: 32px 18px 24px;
    border-radius: var(--radius-md);
  }

  .hollow-massive {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
    line-height: 1.1;
  }

  .main-subtitle {
    font-size: 0.88rem;
    margin-bottom: 20px;
    padding: 0 4px;
  }

  .input-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 12px;
    gap: 8px;
  }

  /* 16px font-size prevents iOS Safari auto-zoom on input focus */
  .styled-input {
    flex: 1 1 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    order: 1;
    font-size: 16px !important;
    padding: 6px 4px;
  }

  .input-icon {
    display: none;
  }

  .quick-paste-btn {
    order: 2;
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 0.78rem;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .glow-submit-btn {
    order: 3;
    flex: 1 1 auto;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.82rem;
    min-height: 42px;
  }

  .result-container {
    padding: 18px 14px;
  }

  .result-content-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .qr-preview-box {
    align-self: center;
    margin-top: 4px;
  }

  .my-links-card {
    padding: 16px 14px;
  }

  .expanded-card-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .expanded-qr-col {
    align-self: center;
  }
}

@media (max-width: 520px) {
  .result-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .btn-copy {
    grid-column: span 2;
  }

  .btn-action {
    justify-content: center;
    min-height: 40px;
    font-size: 0.80rem;
    padding: 8px 10px;
  }

  .expanded-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .btn-expanded-copy {
    grid-column: span 2;
  }

  .my-link-item-header {
    min-height: 44px;
    padding: 8px 10px;
  }
}

@media (max-width: 380px) {
  body {
    padding: 12px 6px;
  }

  .app-card {
    padding: 22px 12px 16px;
  }

  .hollow-massive {
    font-size: 1.65rem;
  }

  .main-subtitle {
    font-size: 0.82rem;
  }

  .my-links-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .my-links-actions-top {
    width: 100%;
    justify-content: space-between;
  }

  .short-url-field,
  .expanded-url-box {
    font-size: 0.78rem;
    padding: 8px 10px;
  }

  .center-footer {
    font-size: 0.72rem;
  }
}

/* Touchscreen Device Normalization: prevent hover states sticking after tap */
@media (hover: none) {
  .app-card:hover,
  .btn-action:hover,
  .quick-paste-btn:hover,
  .glow-submit-btn:hover,
  .my-link-accordion-item:hover,
  .btn-mini-copy:hover {
    transform: none !important;
  }
}
