/* ========================================
   CONFYD ONLINE - MAIN STYLESHEET
   Aesthetic Anonymous Story Sharing Platform
   ======================================== */

/* ========================================
   CSS CUSTOM PROPERTIES (THEME VARIABLES)
   ======================================== */
:root {
  /* Color Palette - Light Mode */
  --primary-gradient: linear-gradient(135deg, #8B1A1A 0%, #CD853F 50%, #DAA520 100%);
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-card: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: #cccccc;
  --text-muted: #999999;
  --accent-red: #8B1A1A;
  --accent-bronze: #CD853F;
  --accent-gold: #DAA520;
  --accent-warm: #FF6B6B;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(218, 165, 32, 0.3);
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
  
  /* Typography */
  --font-title: 'Playfair Display', serif;
  --font-body: 'Poppins', sans-serif;
  --font-alt: 'Inter', sans-serif;
}

/* Light Mode Variables */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-input: #fafafa;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #666666;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --border-light: rgba(139, 26, 26, 0.15);
}

/* ========================================
   GLOBAL RESETS & BASE STYLES
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition-base), color var(--transition-base);
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: all var(--transition-base);
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-2xl) 0;
}

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

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fade-in {
  opacity: 0;
  animation: fadeIn var(--transition-slow) forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.slide-up {
  opacity: 0;
  transform: translateY(30px);
  animation: slideUp var(--transition-slow) forwards;
}

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

/* ========================================
   NAVBAR
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: var(--spacing-md) 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  padding: var(--spacing-sm) 0;
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  transition: transform var(--transition-fast);
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  box-shadow: var(--shadow-glow);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  list-style: none;
}

.navbar-menu a {
  position: relative;
  font-weight: 500;
  padding: var(--spacing-xs) 0;
}

.navbar-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-gradient);
  transition: width var(--transition-base);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
  width: 100%;
}

.theme-toggle {
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--bg-card);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  cursor: pointer;
  transition: all var(--transition-base);
}

.theme-toggle:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.btn-subscribe-nav {
  padding: var(--spacing-xs) var(--spacing-md);
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(139, 26, 26, 0.4);
}

.btn-subscribe-nav:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(218, 165, 32, 0.6);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  border-radius: 3px;
  transition: all var(--transition-base);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--primary-gradient);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-bg.jpg') center/cover;
  opacity: 0.3;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: var(--spacing-xl);
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: white;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  animation: fadeIn 1s ease-out;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--spacing-xl);
  line-height: 1.8;
  animation: fadeIn 1s ease-out 0.3s backwards;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeIn 1s ease-out 0.6s backwards;
}

.btn {
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: white;
  color: var(--accent-red);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--accent-red);
  transform: translateY(-2px);
}

/* Floating particles animation */
.particles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float 20s infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* ========================================
   CARD COMPONENTS
   ======================================== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(218, 165, 32, 0.3);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-glow);
}

.card-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.card-description {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   GRID LAYOUTS
   ======================================== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   REASONS SECTION
   ======================================== */
.reasons-section {
  background: var(--bg-secondary);
  position: relative;
}

/* ========================================
   WHO IT'S FOR SECTION
   ======================================== */
.who-section {
  text-align: center;
  padding: var(--spacing-2xl) 0;
  background: var(--primary-gradient);
  color: white;
  position: relative;
  overflow: hidden;
}

.who-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
}

.who-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: var(--spacing-xl);
}

.who-content h2 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.who-content p {
  font-size: 1.25rem;
  line-height: 1.9;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.glowing-divider {
  width: 100px;
  height: 4px;
  background: white;
  margin: var(--spacing-lg) auto;
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6);
}

/* ========================================
   STORY CARDS
   ======================================== */
.story-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.story-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: var(--primary-gradient);
  transition: height var(--transition-base);
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(218, 165, 32, 0.3);
}

.story-card:hover::before {
  height: 100%;
}

.story-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing-sm);
}

.story-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
  line-height: 1.4;
}

.story-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
}

.story-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--spacing-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.story-tags {
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: rgba(218, 165, 32, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--accent-gold);
}

.story-engagement {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.engagement-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-base);
}

.engagement-stat svg {
  opacity: 0.7;
}

.btn-like-story-card {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.btn-like-story-card:hover {
  color: var(--accent-red);
  background: rgba(255, 69, 58, 0.1);
  transform: scale(1.05);
}

.btn-like-story-card.liked {
  color: var(--accent-red);
}

.btn-like-story-card.liked svg {
  fill: var(--accent-red);
}

.btn-like-story-card svg {
  transition: all var(--transition-base);
}

.btn-like-story-card:active {
  transform: scale(0.95);
}

[data-theme="light"] .btn-like-story-card:hover {
  color: var(--accent-red);
  background: rgba(139, 26, 26, 0.1);
}

/* ========================================
   COMMENTS SECTION
   ======================================== */
.comments-section {
  animation: fadeIn 0.5s ease;
}

.comments-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  color: var(--bg-primary);
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  min-width: 1.5rem;
}

.comment-char-counter {
  transition: color var(--transition-base);
}

.comment-char-counter.warning {
  color: var(--accent-red);
  font-weight: 600;
}

.comments-list-container {
  max-height: 500px;
  overflow-y: auto;
  padding-right: var(--spacing-sm);
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
.comments-list-container::-webkit-scrollbar {
  width: 8px;
}

.comments-list-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
}

.comments-list-container::-webkit-scrollbar-thumb {
  background: var(--accent-gold);
  border-radius: var(--radius-full);
  transition: background var(--transition-base);
}

.comments-list-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

[data-theme="light"] .comments-list-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .comments-list-container::-webkit-scrollbar-thumb {
  background: var(--accent-bronze);
}

[data-theme="light"] .comments-list-container::-webkit-scrollbar-thumb:hover {
  background: var(--accent-red);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.comment-item {
  background: rgba(255, 255, 255, 0.03);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-gold);
  transition: all var(--transition-base);
  animation: fadeInUp 0.3s ease;
}

.comment-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

[data-theme="light"] .comment-item {
  background: rgba(205, 133, 63, 0.05);
  border-left-color: var(--accent-bronze);
}

[data-theme="light"] .comment-item:hover {
  background: rgba(205, 133, 63, 0.08);
  box-shadow: 0 4px 12px rgba(139, 26, 26, 0.1);
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.comment-author {
  font-weight: 600;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.comment-author svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

[data-theme="light"] .comment-author {
  color: var(--accent-bronze);
}

.comment-date {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.comment-content {
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

[data-theme="light"] .comment-content {
  color: var(--text-primary);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(218, 165, 32, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

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

/* ========================================
   FORMS
   ======================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-primary);
}

[data-theme="light"] .form-label {
  color: var(--accent-red);
  font-weight: 700;
  letter-spacing: 0.3px;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  transition: all var(--transition-base);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

/* Light Mode Form Styling */
[data-theme="light"] .form-input,
[data-theme="light"] .form-textarea,
[data-theme="light"] .form-select {
  background: linear-gradient(135deg, #fef9f0 0%, #fff5e8 100%);
  border: 2px solid var(--border-light);
  box-shadow: inset 0 2px 4px rgba(139, 26, 26, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder {
  color: rgba(74, 74, 74, 0.5);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
  transform: translateY(-2px);
  outline: none;
}

[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-textarea:focus,
[data-theme="light"] .form-select:focus {
  background: #ffffff;
  border-color: var(--accent-bronze);
  box-shadow: 0 0 0 4px rgba(205, 133, 63, 0.15), 0 4px 12px rgba(139, 26, 26, 0.15);
  transform: translateY(-2px);
}

.form-textarea {
  min-height: 200px;
  resize: vertical;
  font-family: inherit;
}

.char-counter {
  text-align: right;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: var(--spacing-xs);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.checkbox-wrapper input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* ========================================
   MODAL
   ======================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

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

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--spacing-xl);
  position: relative;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

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

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: var(--accent-red);
  transform: rotate(90deg);
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */
.search-filter-bar {
  display: flex;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  transition: all var(--transition-base);
}

[data-theme="light"] .search-input {
  background: linear-gradient(135deg, #fef9f0 0%, #fff5e8 100%);
  border: 2px solid var(--border-light);
  box-shadow: inset 0 2px 4px rgba(139, 26, 26, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .search-input::placeholder {
  color: rgba(74, 74, 74, 0.5);
}

.search-input:focus {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
  outline: none;
}

[data-theme="light"] .search-input:focus {
  background: #ffffff;
  border-color: var(--accent-bronze);
  box-shadow: 0 0 0 4px rgba(205, 133, 63, 0.15), 0 4px 12px rgba(139, 26, 26, 0.15);
}

.filter-select {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 1rem;
  min-width: 200px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23DAA520' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  padding-right: calc(var(--spacing-md) * 2.5);
}

.filter-select:hover {
  border-color: var(--accent-gold);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-glow);
}

[data-theme="light"] .filter-select {
  background: linear-gradient(135deg, #fef9f0 0%, #fff5e8 100%);
  border: 2px solid var(--border-light);
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%238B1A1A' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--spacing-md) center;
  box-shadow: inset 0 2px 4px rgba(139, 26, 26, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .filter-select:focus {
  background: #ffffff;
  border-color: var(--accent-bronze);
  box-shadow: 0 0 0 4px rgba(205, 133, 63, 0.15), 0 4px 12px rgba(139, 26, 26, 0.15);
}

.filter-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: var(--spacing-sm) var(--spacing-md);
  border: none;
}

.filter-select option:hover,
.filter-select option:checked {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-bronze));
  color: white;
}

/* For better cross-browser support */
.filter-select option:checked {
  background: var(--accent-bronze);
  font-weight: 600;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-xl);
}

.pagination button {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 600;
  transition: all var(--transition-base);
}

.pagination button:hover {
  background: var(--primary-gradient);
  color: white;
  transform: translateY(-2px);
}

.pagination button.active {
  background: var(--primary-gradient);
  color: white;
}

/* ========================================
   DONATION TIERS
   ======================================== */
.donation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.donation-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.donation-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 0;
}

.donation-card:hover::before {
  opacity: 0.1;
}

.donation-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}

.donation-card > * {
  position: relative;
  z-index: 1;
}

.donation-amount {
  font-family: var(--font-title);
  font-size: 3rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--spacing-sm);
}

.donation-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--spacing-md);
}

.donation-description {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.7;
}

.btn-donate {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1.125rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-donate::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-donate:hover::before {
  width: 400px;
  height: 400px;
}

.btn-donate:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--bg-secondary);
  padding: var(--spacing-xl) 0 var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-section h3 {
  font-family: var(--font-title);
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-gold);
}

.footer-social {
  display: flex;
  gap: var(--spacing-md);
}

.social-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.social-icon:hover {
  background: var(--primary-gradient);
  transform: translateY(-5px);
  box-shadow: var(--shadow-glow);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ========================================
   FLOATING CHAT BUTTON
   ======================================== */
.floating-chat {
  position: fixed;
  bottom: var(--spacing-lg);
  right: var(--spacing-lg);
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 1500;
  transition: all var(--transition-base);
  animation: floatBounce 2s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.floating-chat:hover {
  transform: scale(1.1) translateY(0);
  box-shadow: 0 8px 40px rgba(218, 165, 32, 0.5);
  animation: none;
}

/* Chat Icon Tooltip */
.chat-tooltip {
  position: absolute;
  bottom: 75px;
  right: 0;
  background: white;
  color: var(--accent-red);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  font-weight: 600;
  font-size: 0.9rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  pointer-events: none;
  z-index: 1501;
  border: 2px solid var(--accent-gold);
}

.chat-tooltip::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid white;
}

.chat-tooltip.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  animation: tooltipPulse 2s ease-in-out infinite;
}

@keyframes tooltipPulse {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

[data-theme="light"] .chat-tooltip {
  background: var(--accent-red);
  color: white;
  border-color: var(--accent-bronze);
}

[data-theme="light"] .chat-tooltip::after {
  border-top-color: var(--accent-red);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(218, 165, 32, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(218, 165, 32, 0);
  }
}

/* ========================================
   LOADER ANIMATION
   ======================================== */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity var(--transition-base);
}

.loader-wrapper.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 80px;
  height: 80px;
  border: 4px solid rgba(218, 165, 32, 0.2);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loader-logo {
  text-align: center;
  animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ========================================
   SUCCESS MESSAGE
   ======================================== */
.success-message {
  position: fixed;
  top: 2rem;
  right: 2rem;
  transform: translateX(400px);
  background: linear-gradient(135deg, rgba(139, 26, 26, 0.98) 0%, rgba(205, 133, 63, 0.95) 100%);
  backdrop-filter: blur(10px);
  padding: 1.5rem 2rem;
  border-radius: var(--radius-lg);
  text-align: left;
  z-index: 3000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(218, 165, 32, 0.3);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  min-width: 320px;
  max-width: 450px;
  border: 1px solid rgba(218, 165, 32, 0.5);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.success-message.active {
  transform: translateX(0);
  opacity: 1;
}

.success-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, #DAA520 0%, #FFD700 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
  animation: successPulse 1.5s ease-in-out infinite;
}

.success-message h2 {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: white;
  line-height: 1.5;
  font-family: var(--font-body);
  flex: 1;
  padding-top: 0.5rem;
}

.success-message-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.25rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  opacity: 0.7;
}

.success-message-close:hover {
  background: rgba(255, 255, 255, 0.2);
  opacity: 1;
  transform: scale(1.1);
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(218, 165, 32, 0.6);
  }
}

/* Light theme for success message */
[data-theme="light"] .success-message {
  background: linear-gradient(135deg, rgba(139, 26, 26, 0.95) 0%, rgba(205, 133, 63, 0.92) 100%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(218, 165, 32, 0.4);
}

/* Mobile responsive styling */
@media (max-width: 768px) {
  .success-message {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    transform: translateY(-150px);
    min-width: auto;
    max-width: none;
    padding: 1.25rem 1.5rem;
  }

  .success-message.active {
    transform: translateY(0);
  }

  .success-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 1.25rem;
  }

  .success-message h2 {
    font-size: 1rem;
    padding-top: 0.25rem;
  }
}

@media (max-width: 480px) {
  .success-message {
    padding: 1rem 1.25rem;
  }

  .success-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1.125rem;
  }

  .success-message h2 {
    font-size: 0.9375rem;
  }

  .success-message-close {
    width: 24px;
    height: 24px;
    font-size: 1rem;
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* ========================================
   COLLAPSIBLE FAQ
   ======================================== */
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-question {
  padding: var(--spacing-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.faq-question:hover {
  background: rgba(218, 165, 32, 0.1);
}

.faq-icon {
  transition: transform var(--transition-base);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 var(--spacing-md) var(--spacing-md);
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .navbar-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: var(--spacing-2xl) var(--spacing-lg);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-base);
  }
  
  .navbar-menu.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .section {
    padding: var(--spacing-xl) 0;
  }
  
  .search-filter-bar {
    flex-direction: column;
  }
  
  .search-input {
    width: 100%;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }
  
  .container {
    padding: 0 var(--spacing-sm);
  }
  
  .card {
    padding: var(--spacing-md);
  }
  
  .modal-content {
    padding: var(--spacing-md);
  }
}

/* ========================================
   VOICE SELECTOR
   ======================================== */
/* ========================================
   TEXT-TO-SPEECH PLAYER
   ======================================== */
.tts-player {
  margin-top: var(--spacing-xl);
  padding: var(--spacing-lg);
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(218, 165, 32, 0.2);
}

.tts-header h4 {
  color: var(--accent-gold);
  font-size: 1.125rem;
}

.tts-controls {
  margin-top: var(--spacing-md);
}

.tts-selectors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.tts-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tts-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.tts-select {
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all var(--transition-base);
}

.tts-select:hover {
  border-color: var(--accent-gold);
}

.tts-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px rgba(218, 165, 32, 0.1);
}

.tts-playback {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
}

.tts-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
  color: white;
}

.tts-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.tts-btn:active {
  transform: scale(0.95);
}

.tts-play-btn {
  width: 56px;
  height: 56px;
}

.tts-progress {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.tts-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--primary-gradient);
  transition: width 0.3s ease;
  border-radius: var(--radius-full);
}

.tts-status {
  font-size: 0.875rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
}

/* ========================================
   SPEECH-TO-TEXT (STT)
   ======================================== */
.stt-controls {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.stt-language-select {
  padding: 0.5rem;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-base);
}

.stt-language-select:hover {
  border-color: var(--accent-gold);
}

.btn-mic {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-gradient);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 0.875rem;
}

.btn-mic:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.btn-mic:active {
  transform: translateY(0);
}

.btn-mic.recording {
  background: var(--accent-red);
  animation: pulse 1.5s infinite;
}

.btn-mic.recording .mic-icon {
  animation: micPulse 0.5s infinite alternate;
}

.stt-status {
  margin-top: var(--spacing-sm);
  padding: var(--spacing-md);
  background: rgba(218, 165, 32, 0.1);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-gold);
}

.stt-recording-indicator {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.stt-pulse {
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border-radius: 50%;
  animation: pulse 1s infinite;
}

.stt-status-text {
  font-weight: 600;
  color: var(--accent-gold);
  font-size: 0.875rem;
}

.stt-transcript-preview {
  font-style: italic;
  color: var(--text-secondary);
  min-height: 20px;
  line-height: 1.5;
}

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

@keyframes micPulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.2);
  }
}

/* Light theme adjustments */
[data-theme="light"] .tts-player {
  background: rgba(205, 133, 63, 0.05);
  border-color: var(--accent-bronze);
}

[data-theme="light"] .tts-header h4 {
  color: var(--accent-bronze);
}

[data-theme="light"] .stt-status {
  background: rgba(205, 133, 63, 0.1);
  border-left-color: var(--accent-bronze);
}

[data-theme="light"] .stt-status-text {
  color: var(--accent-bronze);
}

/* Responsive */
@media (max-width: 768px) {
  .tts-selectors {
    grid-template-columns: 1fr;
  }
  
  .tts-playback {
    flex-wrap: wrap;
  }
  
  .tts-progress {
    width: 100%;
    order: 3;
  }
  
  .stt-controls {
    flex-wrap: wrap;
  }
}

.play-audio-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.play-audio-btn:active {
  transform: translateY(0);
}

@media (min-width: 640px) {
  .voice-selector {
    flex-direction: row;
    align-items: center;
  }
  
  .voice-selector label {
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .voice-selector select {
    flex: 1;
    min-width: 0;
  }
  
  .play-audio-btn {
    width: auto;
    flex-shrink: 0;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  .navbar,
  .floating-chat,
  .theme-toggle,
  .hero-buttons,
  .btn {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 3px solid var(--accent-gold);
  outline-offset: 2px;
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-gold);
}

/* ========================================
   ANONYMOUS CHAT SYSTEM
   ======================================== */

/* Chat Overlay */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

[data-theme="light"] .chat-overlay {
  background: rgba(0, 0, 0, 0.5);
}

/* Chat Unread Badge */
.chat-unread-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--accent-red);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* Chat Container */
.chat-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  max-height: 800px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.chat-container.active {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

.chat-panel {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .chat-panel {
  border: 2px solid var(--border-light);
  box-shadow: 0 8px 32px rgba(139, 26, 26, 0.2);
}

/* Chat Header */
.chat-header {
  padding: var(--spacing-md);
  background: var(--primary-gradient);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.chat-header h2 {
  font-size: 1.25rem;
  margin: 0;
  font-family: var(--font-title);
}

.chat-subtitle {
  font-size: 0.875rem;
  opacity: 0.9;
  margin: 0;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* Chat Type Selector */
.chat-type-selector {
  display: flex;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.chat-type-btn {
  flex: 1;
  min-width: 120px;
  padding: var(--spacing-sm);
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  font-weight: 600;
  transition: all var(--transition-fast);
  font-size: 0.9rem;
}

.chat-type-btn:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.chat-type-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
}

[data-theme="light"] .chat-type-btn {
  border: 2px solid var(--border-light);
}

[data-theme="light"] .chat-type-btn:hover {
  background: rgba(218, 165, 32, 0.1);
}

/* Chat View */
.chat-view {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Critical: allows flex children to shrink */
}

/* AI Chat View specific sizing */
#aiChatView {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Topic Selection */
.topic-selection {
  padding: var(--spacing-md);
  overflow-y: auto;
}

.topic-selection h3 {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
  color: var(--text-primary);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-sm);
}

.topic-card {
  background: var(--bg-card);
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
  border-color: var(--accent-gold);
}

[data-theme="light"] .topic-card {
  background: linear-gradient(135deg, #fef9f0 0%, #fff5e8 100%);
  border: 2px solid var(--border-light);
}

.topic-icon {
  font-size: 2rem;
  margin-bottom: var(--spacing-xs);
}

.topic-card h4 {
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xs);
  color: var(--text-primary);
}

.topic-card p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Chat Interface */
.chat-interface {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Ensure AI Chat Interface is visible */
#aiChatInterface {
  display: flex !important;
  flex-direction: column;
  flex: 1; /* Take remaining space after disclaimer */
  min-height: 0; /* Allow flexbox to shrink below content size */
  overflow: hidden; /* Prevent overflow */
}

.active-chat-header {
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--bg-card);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  flex-shrink: 0;
}

.back-btn {
  background: transparent;
  border: none;
  color: var(--accent-gold);
  cursor: pointer;
  font-weight: 600;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(218, 165, 32, 0.1);
}

.active-chat-header h3 {
  font-size: 1rem;
  margin: 0;
  color: var(--text-primary);
}

/* Chat Messages */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  min-height: 0; /* Allow shrinking */
  max-height: 100%; /* Don't exceed parent */
}

.chat-message {
  max-width: 85%;
  animation: slideIn 0.3s ease-out;
}

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

.chat-message.self {
  align-self: flex-end;
}

.chat-message.other {
  align-self: flex-start;
}

.chat-message.system {
  align-self: center;
  max-width: 90%;
  text-align: center;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
  gap: var(--spacing-sm);
}

.message-username {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent-gold);
}

.chat-message.self .message-username {
  color: var(--accent-bronze);
}

.message-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.message-content {
  background: var(--bg-card);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  word-wrap: break-word;
  line-height: 1.5;
}

.chat-message.self .message-content {
  background: var(--primary-gradient);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.other .message-content {
  border-bottom-left-radius: 4px;
}

.chat-message.system .message-content {
  background: rgba(218, 165, 32, 0.15);
  color: var(--accent-gold);
  font-size: 0.875rem;
  font-style: italic;
  padding: var(--spacing-xs) var(--spacing-md);
}

[data-theme="light"] .message-content {
  background: linear-gradient(135deg, #fef9f0 0%, #fff5e8 100%);
  border: 1px solid var(--border-light);
}

[data-theme="light"] .chat-message.self .message-content {
  background: var(--primary-gradient);
  color: white;
  border: none;
}

/* Chat Input Area */
.chat-input-area {
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: var(--spacing-sm);
  flex-shrink: 0; /* Never shrink the input area */
  min-height: 80px; /* Ensure minimum height */
}

.chat-input-area textarea {
  flex: 1;
  padding: var(--spacing-sm);
  background: var(--bg-secondary);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all var(--transition-fast);
}

.chat-input-area textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

[data-theme="light"] .chat-input-area textarea {
  background: white;
  border: 2px solid var(--border-light);
}

/* Safety Notice */
.chat-safety-notice {
  flex-shrink: 0; /* Don't shrink */
  padding: var(--spacing-xs) var(--spacing-md);
  text-align: center;
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.send-btn {
  background: var(--primary-gradient);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-glow);
}

.send-btn:active {
  transform: scale(0.95);
}

/* Chat Safety Notice */
.chat-safety-notice {
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(218, 165, 32, 0.1);
  border-top: 1px solid rgba(218, 165, 32, 0.2);
  text-align: center;
  flex-shrink: 0;
}

.chat-safety-notice small {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Chat Warning */
.chat-warning {
  background: var(--accent-red);
  color: white;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  margin: 0 var(--spacing-md) var(--spacing-sm);
  animation: shake 0.5s ease-in-out;
  font-size: 0.875rem;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

/* Coming Soon */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
  height: 100%;
}

.coming-soon-icon {
  font-size: 4rem;
  margin-bottom: var(--spacing-md);
}

.coming-soon h3 {
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

.coming-soon p {
  color: var(--text-secondary);
  max-width: 300px;
}

/* AI Chat Disclaimer */
.ai-disclaimer {
  background: rgba(255, 193, 7, 0.1);
  border: 2px solid rgba(255, 193, 7, 0.3);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  margin: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  align-items: flex-start;
  flex-shrink: 0; /* Don't shrink, maintain fixed height */
}

.ai-disclaimer-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.ai-disclaimer-content {
  flex: 1;
}

.ai-disclaimer-title {
  font-weight: 700;
  color: #FFC107;
  margin-bottom: var(--spacing-xs);
  font-size: 1rem;
}

.ai-disclaimer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

[data-theme="light"] .ai-disclaimer {
  background: rgba(255, 193, 7, 0.15);
  border-color: rgba(255, 152, 0, 0.4);
}

[data-theme="light"] .ai-disclaimer-title {
  color: #FF6F00;
}

/* AI Chat Messages */
.chat-message.ai .message-username {
  color: #9C27B0;
}

.chat-message.ai .message-content {
  background: linear-gradient(135deg, rgba(156, 39, 176, 0.1), rgba(103, 58, 183, 0.1));
  border-left: 3px solid #9C27B0;
}

/* Typing Indicator */
.chat-message.typing-indicator .message-content {
  display: flex;
  gap: 4px;
  padding: 1rem;
}

.typing-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  40% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* System Messages */
.chat-message.system {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  text-align: center;
}

.chat-message.system .message-content {
  background: rgba(255, 193, 7, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .chat-container {
    width: 95%;
    height: 90vh;
    max-height: 90vh;
  }
  
  .topic-grid {
    grid-template-columns: 1fr;
  }
  
  .chat-type-btn span:last-child {
    display: none;
  }
}

@media (min-width: 769px) {
  /* Desktop: Wider chat messages container */
  .chat-messages {
    padding: var(--spacing-lg);
  }
  
  .chat-message {
    max-width: 75%;
  }
  
  .topic-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .chat-container {
    max-width: 1400px;
    height: 88vh;
    max-height: 900px;
  }
  
  .chat-message {
    max-width: 70%;
  }
}

/* ========================================
   NOTIFICATION & FEEDBACK ANIMATIONS
   ======================================== */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notification {
  animation: slideIn 0.3s ease-out;
}

/* Like Button States */
.btn-like-story {
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-like-story.liked {
  animation: likeAnimation 0.6s ease-out;
  transform: scale(1.1);
}

@keyframes likeAnimation {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1.1);
  }
}

.btn-like-story:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Success Message Styling */
.success-message {
  background: var(--accent-green, #4CAF50);
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  animation: slideIn 0.3s ease-out;
}

.error-message {
  background: var(--accent-red);
  color: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin: var(--spacing-md) 0;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  animation: slideIn 0.3s ease-out;
}

/* ========================================
   SUBSCRIBE SECTION
   ======================================== */
.subscribe-section {
  background: var(--bg-card);
  padding: 4rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(218, 165, 32, 0.2);
  position: relative;
  overflow: hidden;
  margin: 4rem 0;
}

.subscribe-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-gradient);
}

.subscribe-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.subscribe-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.subscribe-content h2 {
  font-family: var(--font-title);
  font-size: 2rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.subscribe-content p {
  color: var(--text-secondary);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.subscribe-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.subscribe-input {
  flex: 1;
  padding: 1rem 1.5rem;
  background: var(--bg-secondary);
  border: 2px solid rgba(218, 165, 32, 0.3);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.subscribe-input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
}

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

.subscribe-btn {
  padding: 1rem 2rem;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  font-size: 1rem;
}

.subscribe-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.subscribe-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.subscribe-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.subscribe-note svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent-gold);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Subscribe Modal */
.subscribe-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}

.subscribe-modal.active {
  display: flex;
}

.subscribe-modal-content {
  background: var(--bg-card);
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(218, 165, 32, 0.3);
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

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

.subscribe-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.subscribe-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
  .subscribe-section {
    padding: 3rem 1.5rem;
  }

  .subscribe-content h2 {
    font-size: 1.5rem;
  }

  .subscribe-content p {
    font-size: 1rem;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-btn {
    width: 100%;
  }

  .subscribe-note {
    flex-direction: column;
    gap: 0.5rem;
  }

  .subscribe-modal-content {
    padding: 2rem 1.5rem;
  }
  
  .btn-subscribe-nav {
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .subscribe-section {
    padding: 2rem 1rem;
  }

  .subscribe-icon {
    font-size: 2rem;
  }

  .subscribe-content h2 {
    font-size: 1.25rem;
  }

  .subscribe-input {
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
  }

  .subscribe-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ========================================
   PWA INSTALL PROMPT STYLES
   ======================================== */

/* PWA Install Banner */
.pwa-install-banner {
  position: fixed;
  bottom: -200px;
  left: 0;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border-top: 2px solid var(--accent-gold);
  padding: 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transition: all 0.3s ease-in-out;
}

.pwa-install-banner.show {
  bottom: 0;
}

.pwa-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.pwa-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pwa-banner-text strong {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
}

.pwa-banner-text span {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.pwa-install-btn {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.pwa-install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(218, 165, 32, 0.4);
}

.pwa-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.pwa-dismiss-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* iOS Install Banner */
.pwa-install-banner.ios-install .pwa-banner-text span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pwa-install-banner.ios-install svg {
  vertical-align: middle;
}

/* PWA Update Notification */
.pwa-update-notification {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gold);
  color: #1a1a1a;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transition: all 0.3s ease-in-out;
}

.pwa-update-notification.show {
  top: 20px;
}

.pwa-update-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwa-update-content span {
  font-weight: 600;
}

.pwa-update-btn {
  background: #1a1a1a;
  color: var(--accent-gold);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.pwa-update-btn:hover {
  background: #2a2a2a;
  transform: scale(1.05);
}

/* Responsive PWA Banners */
@media (max-width: 768px) {
  .pwa-banner-content {
    flex-wrap: wrap;
  }
  
  .pwa-banner-icon {
    font-size: 1.5rem;
  }
  
  .pwa-banner-text strong {
    font-size: 0.9rem;
  }
  
  .pwa-banner-text span {
    font-size: 0.8rem;
  }
  
  .pwa-install-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .pwa-install-banner {
    padding: 0.75rem;
  }
  
  .pwa-banner-content {
    gap: 0.75rem;
  }
  
  .pwa-banner-icon {
    font-size: 1.25rem;
  }
  
  .pwa-banner-text {
    flex: 1;
    min-width: 0;
  }
  
  .pwa-banner-text span {
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .pwa-install-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
  }
  
  .pwa-update-notification {
    left: 10px;
    right: 10px;
    transform: none;
  }
  
  .pwa-update-content {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}


