/* CutLink.site Premium Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #08080a;
  --bg-secondary: #101014;
  --bg-card: rgba(18, 18, 22, 0.85);
  --border-color: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(255, 45, 45, 0.2);
  
  --primary: #ff2d2d;
  --primary-hover: #e02424;
  --primary-glow: rgba(255, 45, 45, 0.4);
  
  --text-primary: #ffffff;
  --text-secondary: #9da0a6;
  --text-muted: #5e6166;
  
  --success: #00e676;
  --warning: #ffd600;
  --danger: #ff1744;
  
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets & scrollbar */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  outline: none;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 45, 45, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(255, 45, 45, 0.03) 0%, transparent 40%);
  background-attachment: fixed;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #25252b;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.02em;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}
a:hover {
  color: var(--text-primary);
}

/* Layout containers */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Floating Navigation Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 8, 10, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
  transition: var(--transition-normal);
}

header .nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.logo-text span {
  background: linear-gradient(135deg, #ffffff 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  color: var(--primary);
  font-size: 22px;
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* Custom premium buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-normal);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(255, 45, 45, 0.2);
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(255, 45, 45, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #18181f;
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
  background: var(--danger);
  color: var(--text-primary);
}

.btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 80px 0 40px;
}

.hero h1 {
  font-size: 54px;
  line-height: 1.1;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #ffffff 60%, #9999aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 32px;
}

/* Service Selector Grid (Home view) */
.service-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 36px 30px;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.service-card:hover::before {
  transform: translateX(100%);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: 0 12px 30px rgba(255, 45, 45, 0.05);
}

.service-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: rgba(255, 45, 45, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 45, 45, 0.2);
  color: var(--primary);
  font-size: 24px;
  transition: var(--transition-normal);
}

.service-card:hover .service-icon-wrapper {
  background: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.service-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
  flex-grow: 1;
}

.service-card-action {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.service-card-action i {
  transition: transform var(--transition-fast);
}

.service-card:hover .service-card-action i {
  transform: translateX(4px);
}

/* Feature View Container */
.feature-view-container {
  animation: fadeIn 0.4s ease;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.view-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-title i {
  color: var(--primary);
  font-size: 24px;
}

/* Input Fields styling */
.input-group {
  margin-bottom: 20px;
  position: relative;
}

.input-label {
  display: block;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.input-control-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

.input-control-wrapper i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
}

.input-control {
  width: 100%;
  padding: 14px 16px;
  padding-left: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  transition: var(--transition-fast);
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 45, 45, 0.1);
  background: #141419;
}

/* Tab panels and styling */
.tab-navigation {
  display: flex;
  gap: 8px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 32px;
  width: fit-content;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--primary);
  color: var(--text-primary);
}

/* Feature layouts */
.shortener-layout, .qr-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .shortener-layout, .qr-layout {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Shortener features */
.result-card {
  background: rgba(255, 45, 45, 0.05);
  border: 1px dashed var(--primary);
  border-radius: 10px;
  padding: 20px;
  margin-top: 24px;
  display: none;
  animation: slideUp 0.3s ease;
}

.result-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 10px;
  font-family: var(--font-heading);
}

.result-link-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.result-url {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 18px;
  word-break: break-all;
  flex-grow: 1;
}

/* History table */
.history-section {
  margin-top: 48px;
}

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

.table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background: var(--bg-secondary);
  padding: 16px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.01);
}

.short-url-cell {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--text-primary);
}

.long-url-cell {
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.clicks-badge {
  background: rgba(255, 45, 45, 0.08);
  border: 1px solid rgba(255, 45, 45, 0.2);
  color: var(--primary);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  display: inline-block;
}

/* QR Code details */
.qr-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  padding: 24px;
  position: relative;
}

#qrcode {
  padding: 12px;
  background: #ffffff;
  border-radius: 8px;
  display: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#qrcode canvas, #qrcode img {
  max-width: 100%;
  display: block;
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
}

.qr-placeholder i {
  font-size: 48px;
}

.qr-placeholder p {
  font-size: 14px;
}

.qr-customization {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
}

.color-picker-wrapper input[type="color"] {
  border: none;
  width: 32px;
  height: 32px;
  background: transparent;
  cursor: pointer;
}

/* YouTube Analyzer Styles */
.analyzer-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.analyzer-results {
  display: none;
  animation: fadeIn 0.4s ease;
}

.video-overview-card {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
}

@media (max-width: 768px) {
  .video-overview-card {
    grid-template-columns: 1fr;
  }
}

.video-thumbnail-wrapper {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.video-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-metadata-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.video-channel {
  color: var(--primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.video-title-display {
  font-size: 26px;
  line-height: 1.3;
  margin-bottom: 16px;
}

.video-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.stat-item i {
  color: var(--primary);
}

/* Analytics Stats Grid */
.analytics-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
  margin-top: 28px;
}

@media (max-width: 900px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* Circular score dial */
.score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px;
}

.score-dial-wrapper {
  position: relative;
  width: 150px;
  height: 150px;
  margin-bottom: 20px;
}

.score-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.score-track, .score-fill {
  fill: none;
  stroke-width: 10;
}

.score-track {
  stroke: var(--bg-secondary);
}

.score-fill {
  stroke: var(--primary);
  stroke-dasharray: 440;
  stroke-dashoffset: 440;
  transition: stroke-dashoffset 1s ease-out;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--primary-glow));
}

.score-text-absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.score-number {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
}

.score-total {
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-heading);
}

.score-label {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
}

.score-sublabel {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 4px;
}

/* Audit checklist */
.audit-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  width: 100%;
}

.audit-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 13px;
}

.audit-item-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
}

.audit-item-status {
  font-weight: 600;
  font-family: var(--font-heading);
}

.audit-pass { color: var(--success); }
.audit-warning { color: var(--warning); }
.audit-fail { color: var(--danger); }

/* YouTube Detailed tabs layout */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}

@media (max-width: 768px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  transition: var(--transition-fast);
}

.tag-badge:hover {
  border-color: var(--primary);
  color: var(--text-primary);
}

.hash-badge {
  background: rgba(255, 45, 45, 0.05);
  border: 1px solid rgba(255, 45, 45, 0.15);
  color: var(--primary);
}

.hash-badge:hover {
  background: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 0 10px var(--primary-glow);
}

.copy-all-btn {
  font-size: 13px;
  padding: 6px 12px;
  margin-left: auto;
}

/* Recommendations styling */
.rec-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.rec-item {
  display: flex;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.rec-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rec-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 45, 45, 0.08);
  border: 1px solid rgba(255, 45, 45, 0.2);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.rec-content h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.rec-content p {
  font-size: 13px;
  color: var(--text-secondary);
}

.title-suggestions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.title-suggestion-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.title-suggestion-item:hover {
  border-color: var(--primary);
}

.copy-inline-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-fast);
  padding: 4px;
}

.title-suggestion-item:hover .copy-inline-btn {
  color: var(--primary);
}

.copy-inline-btn:hover {
  transform: scale(1.1);
}

/* Modals & Setup Info overlays */
.setup-alert-banner {
  background: rgba(255, 214, 0, 0.08);
  border: 1px solid rgba(255, 214, 0, 0.2);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 32px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: #ffe082;
  font-size: 14px;
}

.setup-alert-banner i {
  font-size: 20px;
  margin-top: 2px;
}

.setup-alert-banner a {
  color: #ffd600;
  text-decoration: underline;
  font-weight: 600;
}

.setup-alert-banner a:hover {
  color: var(--text-primary);
}

/* Footer Section */
footer {
  text-align: center;
  padding: 60px 0 40px;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
  color: var(--text-muted);
  font-size: 14px;
}

footer p {
  margin-bottom: 8px;
}

/* Utility / Helpers */
.hidden {
  display: none !important;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 50%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Spinner loader styling */
.loader-spinner {
  border: 3px solid rgba(255, 255, 255, 0.05);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Setup Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  width: 90%;
  max-width: 580px;
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-title {
  margin-bottom: 24px;
  font-size: 24px;
}

.modal-title i {
  color: var(--primary);
  margin-right: 8px;
}

.steps-list {
  margin: 16px 0;
  padding-left: 20px;
}

.steps-list li {
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.code-snippet {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 13px;
  color: #fff;
  margin-top: 8px;
  overflow-x: auto;
  user-select: all;
  white-space: pre-wrap;
}

/* Tooltips */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #1a1a24;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #121216;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  color: var(--text-primary);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 2000;
  font-size: 14px;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast i {
  color: var(--primary);
  font-size: 18px;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & PREVENTING EDGE LEAKS
   ========================================================================== */

html, body {
  overflow-x: hidden;
  width: 100%;
}

.flex-mobile-stack {
  display: flex;
  gap: 12px;
}

/* Service Selector Grid safety override */
.service-selector-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 600px) {
  /* Prevent header compression leaks */
  header {
    padding: 12px 0;
  }
  
  header .nav-wrapper {
    flex-direction: column;
    gap: 16px;
    align-items: center;
  }
  
  .header-actions {
    width: 100%;
    justify-content: center;
  }
  
  .tab-navigation {
    width: 100%;
    justify-content: space-around;
    margin-bottom: 0;
  }
  
  .tab-btn {
    padding: 8px 12px;
    font-size: 13px;
    gap: 4px;
  }
  
  .btn-icon-only {
    width: 38px;
    height: 38px;
  }
  
  /* Prevent Hero overflows */
  .hero {
    padding: 40px 0 20px;
  }
  
  .hero h1 {
    font-size: 34px;
    margin-bottom: 12px;
  }
  
  .hero p {
    font-size: 15px;
    margin-bottom: 24px;
  }
  
  /* Form components mobile stacking */
  .flex-mobile-stack {
    flex-direction: column;
  }
  
  .flex-mobile-stack button {
    width: 100%;
    padding: 14px 16px;
  }
  
  /* Link Shortener result card wrap */
  .result-link-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .result-url {
    text-align: center;
    font-size: 16px;
  }
  
  #copy-short-url-btn {
    width: 100%;
  }
  
  /* App width containers padding spacing */
  .app-container {
    padding: 0 16px;
  }
  
  .feature-card {
    padding: 20px;
  }
  
  /* Setup Modal padding reduction to fit instructions */
  .modal-content {
    padding: 24px 20px;
    width: 95%;
  }
  
  /* Toast center alignment at bottom screen */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    justify-content: center;
    text-align: center;
  }
}

/* Additional safety for very small screens (e.g. iPhone SE / 320px) */
@media (max-width: 350px) {
  .logo-text {
    font-size: 20px;
  }
  .tab-btn {
    padding: 6px 8px;
    font-size: 11px;
  }
  .service-card {
    padding: 24px 20px;
  }
}

