:root {
  --font-heading: 'Calistoga', serif;
  --font-body: 'Outfit', sans-serif;
  
  --primary: #e63946;
  --dark: #1d3557;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.5);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: #fdf2f8;
  color: var(--dark);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 80px; /* Space for fixed footer */
}

/* --- ANIMATED BACKGROUND --- */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.6;
  animation: float 20s infinite alternate;
}
.blob-1 {
  top: -10%; left: -10%; width: 50vw; height: 50vw;
  background: #ffc2d1;
}
.blob-2 {
  bottom: -10%; right: -10%; width: 60vw; height: 60vw;
  background: #ffe5ec;
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) rotate(0deg); }
  100% { transform: translate(50px, 50px) rotate(20deg); }
}

/* --- LAYOUT --- */
.app-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* --- STICKY HEADER --- */
.glass-header {
  
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  width: 100%;
  padding: 15px 5%;
  margin-bottom: 30px;
}

.header-content { flex: 1; min-width: 280px; }

h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin: 0;
  color: var(--primary);
  letter-spacing: -1px;
}

.theme-line {
  font-size: 1.1rem;
  color: #555;
  margin: 8px 0;
  font-weight: 400;
}

.sarcasm-trigger {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
  border-bottom: 2px dashed var(--primary);
  transition: all 0.2s;
}
.sarcasm-trigger:hover { background: #ffe5ec; }

.subtitle { margin: 5px 0 0; opacity: 0.7; font-size: 0.9rem; }

.stats-pill {
  display: inline-flex;
  align-items: center;
  background: white;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.85em;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 8px;
}

.live-dot {
  width: 8px; height: 8px;
  background: #2ecc71;
  border-radius: 50%;
  margin-right: 8px;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

/* --- BUTTONS --- */
.glass-btn {
  background: white;
  border: 1px solid var(--glass-border);
  padding: 8px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  font-family: inherit;
  transition: all 0.3s;
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}
.glass-btn:hover { transform: translateY(-2px); background: #fff0f3; color: var(--primary); }

.primary-btn {
  width: 100%;
  background: var(--primary);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
  margin-top: 10px;
}
.primary-btn:active { transform: scale(0.98); }

/* --- INSIGHTS PANEL --- */
.insights-panel {
  margin-bottom: 40px;
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1), padding 0.6s;
}

.insights-panel.open {
  padding: 30px 20px;
  max-height: 2000px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.insight-card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.insight-card h4 { margin: 0 0 15px; color: var(--primary); font-size: 1.2em; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }

/* List Styles */
.clean-list { padding: 0; list-style: none; margin: 0; }
.clean-list li { margin-bottom: 12px; font-size: 0.95em; line-height: 1.5; color: #444; padding-left: 5px; }

/* Message Style */
.message-text {
  font-size: 1.05em; line-height: 1.6; color: #555; font-style: italic;
  background: #fff0f3; padding: 15px; border-radius: 10px; border-left: 4px solid var(--primary);
}

/* --- MAIN LAYOUT --- */
.main-grid {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 40px;
  align-items: start;
}

/* --- SIDEBAR --- */
.sticky-sidebar {
  position: sticky;
  top: 130px; /* Below header */
  height: fit-content;
  z-index: 900;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 30px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.input-group { margin-bottom: 15px; }
.input-group label { display: block; font-size: 0.85em; font-weight: 600; margin-bottom: 5px; opacity: 0.7; }

input, select, textarea {
  width: 100%; padding: 12px; border: 2px solid transparent;
  background: rgba(255,255,255,0.6); border-radius: 10px;
  font-family: inherit; transition: 0.2s;
}
input:focus, textarea:focus, select:focus {
  outline: none; background: white; border-color: var(--primary);
}
textarea { resize: vertical; min-height: 80px; }

/* --- PILLS --- */
.filter-pills { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.pill {
  border: none; background: rgba(255,255,255,0.5); padding: 8px 16px;
  border-radius: 20px; cursor: pointer; font-weight: 600; transition: 0.2s;
}
.pill.active { background: var(--dark); color: white; }
.pill.red { color: #e63946; } .pill.pink { color: hotpink; } .pill.yellow { color: #d4a017; }

/* --- WALL STREAM --- */
.wall-stream {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px;
}

.rose-card {
  background: white; border-radius: 18px; padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03); position: relative; overflow: hidden;
  animation: fadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  border-left: 6px solid #ccc; transition: transform 0.2s;
}
.rose-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.rose-card.red { border-left-color: #ff4757; }
.rose-card.pink { border-left-color: #ff6b81; }
.rose-card.yellow { border-left-color: #f1c40f; }
.rose-card.white { border-left-color: #dfe6e9; }
.rose-card.orange { border-left-color: #e67e22; }

.rose-meta { display: flex; justify-content: space-between; font-size: 0.75em; opacity: 0.5; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.rose-msg { font-size: 1.1em; line-height: 1.5; margin: 0 0 15px 0; color: #444; font-weight: 500; word-break: break-word; }
.rose-from { font-size: 0.9em; font-weight: 600; text-align: right; color: var(--primary); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER --- */
.glass-footer {
  position: fixed; bottom: 0; left: 0; width: 100%; z-index: 1100;
  display: flex; justify-content: center; align-items: center;
  background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--glass-border);
  padding: 12px; font-size: 0.85rem; color: #666;
}

/* --- VIDEO MODAL --- */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); z-index: 2000;
  display: flex; justify-content: center; align-items: center;
}
.modal-overlay.hidden { display: none; }
.modal-content {
  background: white; padding: 20px; border-radius: 12px;
  width: 90%; max-width: 600px; position: relative;
}
.close-modal {
  position: absolute; top: -40px; right: 0; background: transparent;
  color: white; border: none; font-size: 24px; cursor: pointer;
}

/* --- RESPONSIVE --- */
@media (max-width: 800px) {
  .glass-header { flex-direction: column; align-items: center; text-align: center; }
  .header-content { width: 100%; }
  .main-grid { grid-template-columns: 1fr; gap: 30px; }
  .sticky-sidebar { position: relative; top: 0; z-index: 1; }
  .glass-btn { width: 100%; justify-content: center; margin-top: 10px; }
}