:root, [data-theme="light"] {
  --bg-main: #fdfdfe;
  --bg-card: #ffffff;
  --bg-card-hover: #f8faff;
  --bg-surface: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-subtle: #ede9fe;
  --border-focus: #8b5cf6;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --primary-purple: #8b5cf6;
  --primary-gradient: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #6366f1 100%);
  --primary-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  --accent-orange: #f59e0b;
  --card-shadow: 0 10px 25px -5px rgba(124, 58, 237, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --nav-bg: rgba(253, 253, 254, 0.9);
  --modal-bg: rgba(0, 0, 0, 0.9);
  --tag-bg: #f8fafc;
  --tag-border: #e2e8f0;
  --tag-hover: #ede9fe;
}

[data-theme="dark"] {
  --bg-main: #090b14;
  --bg-card: #111422;
  --bg-card-hover: #171c2e;
  --bg-surface: #191e30;
  --bg-input: #111422;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(139, 92, 246, 0.25);
  --border-focus: #a855f7;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary-purple: #a855f7;
  --primary-gradient: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #6366f1 100%);
  --primary-shadow: 0 4px 20px rgba(168, 85, 247, 0.4);
  --accent-orange: #fbbf24;
  --card-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --nav-bg: rgba(9, 11, 20, 0.9);
  --modal-bg: rgba(0, 0, 0, 0.92);
  --tag-bg: #151928;
  --tag-border: rgba(255, 255, 255, 0.1);
  --tag-hover: #1f253d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* Background watermark graphic */
.ambient-watermark {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 50% 20%, rgba(139, 92, 246, 0.04) 0%, transparent 60%);
  z-index: 0;
}

.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Navbar */
.navbar {
  border-bottom: 1px solid var(--border-color);
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.35);
}

.logo-icon svg {
  width: 18px;
  height: 18px;
}

.brand-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
  text-transform: uppercase;
  user-select: none;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.control-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn svg {
  width: 18px;
  height: 18px;
}

.control-btn:hover {
  border-color: var(--primary-purple);
  color: var(--primary-purple);
  transform: translateY(-1px);
}

/* Main Content */
.main-content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 3rem 1.5rem 5rem;
}

/* Hero Section */
.hero-section {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Signature Orange Underline Brush */
.orange-underline {
  position: relative;
  display: inline-block;
  color: var(--text-primary);
}

.orange-underline::after {
  content: '';
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 2px;
  height: 6px;
  background: var(--accent-orange);
  border-radius: 4px;
  z-index: -1;
  transform: rotate(-0.8deg);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  max-width: 660px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

/* Search Card Container */
.search-container {
  max-width: 760px;
  margin: 0 auto;
}

.search-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 0.45rem 0.5rem 0.45rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--card-shadow);
  transition: all 0.25s ease;
}

.search-form-card:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 12px 35px -5px rgba(139, 92, 246, 0.18), 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.search-prefix-icon {
  color: var(--primary-purple);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.search-prefix-icon svg {
  width: 20px;
  height: 20px;
}

.search-form-card input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.98rem;
  color: var(--text-primary);
  min-width: 0;
}

.search-form-card input::placeholder {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.paste-action-btn, .clear-action-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.paste-action-btn:hover, .clear-action-btn:hover {
  background: var(--tag-hover);
  color: var(--primary-purple);
  border-color: var(--primary-purple);
}

.paste-action-btn svg, .clear-action-btn svg {
  width: 17px;
  height: 17px;
}

.search-submit-btn {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 11px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--primary-shadow);
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.btn-search-icon {
  width: 16px;
  height: 16px;
}

.search-submit-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.search-submit-btn:active {
  transform: translateY(1px);
}

.search-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Sparkle Note Under Search */
.search-note {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--primary-purple);
  font-size: 0.85rem;
  font-weight: 500;
}

.search-note svg {
  width: 16px;
  height: 16px;
}

/* Quick Test Tags */
.quick-tags {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.tag-pill {
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.32rem 0.75rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-pill:hover {
  background: var(--tag-hover);
  color: var(--primary-purple);
  border-color: var(--primary-purple);
  transform: translateY(-1px);
}

/* Feedback Banner */
.status-banner {
  max-width: 760px;
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-content {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.status-banner.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #ef4444;
}

.status-banner.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #d97706;
}

.close-banner-btn {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Skeleton Loading */
.loading-state {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-card-hover) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 12px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--border-color);
}

.skeleton-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.skeleton-line {
  height: 16px;
}

.title-line { width: 45%; height: 22px; }
.sub-line { width: 70%; }

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1.25rem;
}

.skeleton-card {
  aspect-ratio: 9 / 16;
  border-radius: 12px;
}

/* Results Section */
.results-section {
  margin-top: 3rem;
  animation: fadeIn 0.4s ease;
}

/* Profile Card */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1.25rem;
  padding: 1.75rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-gradient);
}

.profile-avatar-wrapper {
  flex-shrink: 0;
}

.avatar-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  padding: 3px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--primary-shadow);
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-surface);
  border: 2px solid var(--bg-card);
}

.profile-details {
  flex: 1;
  min-width: 0;
}

.profile-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.profile-username {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 9999px;
}

.badge-private {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-stories {
  background: rgba(139, 92, 246, 0.12);
  color: var(--primary-purple);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.profile-fullname {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

.profile-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.action-btn-primary {
  margin-left: auto;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.65rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: var(--primary-shadow);
  transition: all 0.25s ease;
}

.action-btn-primary svg {
  width: 15px;
  height: 15px;
}

.action-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Stories Grid Header */
.grid-header {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.grid-title h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.expiry-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Stories Grid Cards */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 1.25rem;
}

.story-card {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--card-shadow);
}

.story-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary-purple);
  box-shadow: 0 14px 30px rgba(139, 92, 246, 0.2);
}

.story-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.story-card:hover .story-thumbnail {
  transform: scale(1.06);
}

.story-type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  z-index: 2;
}

.story-type-badge svg {
  width: 12px;
  height: 12px;
}

.story-time-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  z-index: 2;
}

.story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 3;
}

.story-card:hover .story-overlay {
  opacity: 1;
}

.overlay-actions {
  display: flex;
  gap: 0.5rem;
}

.card-action-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s;
}

.card-action-btn:hover {
  background: #fff;
  color: #000;
}

.card-action-btn.primary {
  background: var(--primary-gradient);
  border: none;
}

.card-action-btn.primary:hover {
  filter: brightness(1.15);
  color: #fff;
}

/* ========================================================
   FOOTER
   ======================================================== */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
  padding: 3.5rem 1.5rem 2.75rem;
  text-align: center;
  transition: background 0.3s ease, border-color 0.3s ease;
}

.footer-content {
  max-width: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.footer-credit {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.12rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.heart-pulse {
  display: inline-block;
  color: #ef4444;
  font-size: 1.15rem;
  animation: heartBeat 1.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.28); }
  30% { transform: scale(1); }
  45% { transform: scale(1.2); }
}

.footer-author-link {
  color: var(--primary-purple);
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  font-weight: 800;
  position: relative;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.footer-author-link:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.footer-author-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-gradient);
  border-radius: 2px;
  transform: scaleX(0.92);
  transition: transform 0.2s ease;
}

.footer-author-link:hover::after {
  transform: scaleX(1.05);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
}

.footer-meta .bullet {
  color: var(--border-color);
  font-size: 0.65rem;
}

.footer-disclaimer {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
  line-height: 1.5;
}

/* ========================================================
   FULLSCREEN INSTAGRAM STORY VIEWER MODAL
   ======================================================== */
.story-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--modal-bg);
  backdrop-filter: blur(20px);
}

.modal-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.5rem;
}

.story-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 9 / 16;
  max-height: 88vh;
  background: #000;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  user-select: none;
}

.progress-bar-container {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 20;
}

.progress-segment {
  flex: 1;
  height: 2.5px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: #ffffff;
  border-radius: 2px;
  transition: width 0.05s linear;
}

.progress-segment.completed .progress-fill {
  width: 100% !important;
}

.story-header {
  position: absolute;
  top: 24px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 20;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.modal-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid #fff;
}

.story-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.modal-username {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.modal-time {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.7);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.story-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.modal-action-btn {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-action-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.06);
}

.modal-action-btn svg {
  width: 15px;
  height: 15px;
}

.story-media-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.story-media {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.media-spinner {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  z-index: 10;
}

.tap-zone {
  position: absolute;
  top: 60px;
  bottom: 0;
  z-index: 15;
  cursor: pointer;
}

.tap-left { left: 0; width: 35%; }
.tap-right { right: 0; width: 65%; }

.desktop-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 30;
}

.desktop-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn { left: -65px; }
.next-btn { right: -65px; }

.desktop-nav-btn svg { width: 24px; height: 24px; }

.keyboard-hints {
  margin-top: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.keyboard-hints kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--text-secondary);
}

.hidden { display: none !important; }

/* Responsive Media Queries */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .main-content {
    padding: 1.5rem 1rem 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .search-form-card {
    flex-wrap: wrap;
    padding: 0.75rem;
  }

  .search-prefix-icon {
    display: none;
  }

  .search-submit-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .profile-card {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
    gap: 1.25rem;
  }

  .profile-title-row {
    justify-content: center;
  }

  .profile-stats {
    justify-content: center;
  }

  .action-btn-primary {
    margin: 0.5rem auto 0;
    width: 100%;
    justify-content: center;
  }

  .stories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .desktop-nav-btn {
    display: none;
  }

  .story-frame {
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-container {
    padding: 0;
  }

  .keyboard-hints {
    display: none;
  }
}
