/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&family=Dancing+Script:wght@400;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --bg-input: #1e1e1e;
  --bg-glass: rgba(26, 26, 26, 0.85);
  --pink-primary: #ff2d75;
  --pink-light: #ff6b9d;
  --pink-dark: #cc1155;
  --pink-glow: rgba(255, 45, 117, 0.3);
  --red-primary: #e63946;
  --red-dark: #b01a28;
  --gradient-love: linear-gradient(135deg, #ff2d75, #e63946, #ff6b9d);
  --gradient-card: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
  --gradient-bg: radial-gradient(ellipse at top, #1a0a10 0%, #0a0a0a 60%);
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --border-color: #2a2a2a;
  --border-pink: rgba(255, 45, 117, 0.3);
  --shadow-pink: 0 0 20px rgba(255, 45, 117, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

input, textarea, button, select {
  font-family: inherit;
  font-size: inherit;
}

a {
  color: var(--pink-primary);
  text-decoration: none;
}

/* ===== APP CONTAINER ===== */
#app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--gradient-bg);
  position: relative;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
  padding-bottom: 4rem;
  animation: fadeIn 0.5s ease;
  position: relative;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
  align-items: center;
  justify-content: center;
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.login-screen::before {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--pink-glow) 0%, transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  animation: pulse-glow 3s ease-in-out infinite;
}

.login-container {
  text-align: center;
  z-index: 1;
  max-width: 380px;
  width: 100%;
  padding: 2rem;
}

.login-heart {
  font-size: 4rem;
  margin-bottom: 1rem;
  animation: heartbeat 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(255, 45, 117, 0.5));
}

.login-title {
  font-family: 'Dancing Script', cursive;
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-love);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  font-weight: 300;
}

.login-input-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.login-input-group input {
  width: 100%;
  padding: 1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
  transition: var(--transition-fast);
}

.login-input-group input:focus {
  border-color: var(--pink-primary);
  box-shadow: var(--shadow-pink);
}

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

.login-error {
  color: var(--red-primary);
  font-size: 0.85rem;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
  display: none;
  animation: shake 0.5s ease;
}

.login-error.show {
  display: block;
}

.settings-btn-login {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0.3;
  transition: var(--transition-fast);
  z-index: 10;
  padding: 0.5rem;
}

.settings-btn-login:hover {
  opacity: 0.8;
  transform: rotate(45deg);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.btn:hover::after {
  opacity: 1;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--gradient-love);
  color: white;
  box-shadow: 0 4px 15px rgba(255, 45, 117, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px rgba(255, 45, 117, 0.5);
  transform: translateY(-1px);
}

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

.btn-secondary:hover {
  border-color: var(--pink-primary);
  background: var(--bg-card-hover);
}

.btn-danger {
  background: var(--red-dark);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  border-radius: var(--radius-md);
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  font-size: 1.1rem;
}

/* ===== HEADER ===== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(var(--bg-primary) 60%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.app-header .back-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.app-header .back-btn:hover {
  border-color: var(--pink-primary);
}

.app-header .header-title {
  font-family: 'Dancing Script', cursive;
  font-size: 1.3rem;
  background: var(--gradient-love);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ===== HOME SCREEN ===== */
.home-screen {
  align-items: center;
  padding-top: 0;
}

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  width: 100%;
  max-width: 500px;
}

.home-photo {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--pink-primary);
  box-shadow: 0 0 30px rgba(255, 45, 117, 0.25);
  margin-bottom: 1.5rem;
  animation: fadeInZoom 0.8s ease;
}

.home-photo-placeholder {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 3px dashed var(--border-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

.home-couple-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.home-message {
  font-family: 'Dancing Script', cursive;
  font-size: 1.4rem;
  color: var(--pink-light);
  margin-bottom: 2rem;
  line-height: 1.4;
}

.home-counter {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.home-counter-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.home-counter-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-love);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== FEATURE GRID ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem;
  width: 100%;
  max-width: 500px;
  padding: 0 0.5rem;
}

.feature-card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-medium);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-love);
  opacity: 0;
  transition: var(--transition-fast);
}

.feature-card:hover {
  border-color: var(--border-pink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-pink);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:active {
  transform: translateY(0) scale(0.98);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.feature-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== CARDS / SECTIONS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 1rem;
  transition: var(--transition-fast);
}

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

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--pink-primary);
  box-shadow: 0 0 0 3px rgba(255, 45, 117, 0.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* ===== LIST ITEMS ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 0.5rem;
  transition: var(--transition-fast);
}

.list-item:hover {
  border-color: var(--border-pink);
}

.list-item-text {
  flex: 1;
  font-size: 0.9rem;
  word-break: break-word;
}

.list-item .btn-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  font-size: 0.85rem;
}

/* ===== PHOTO PREVIEW ===== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.photo-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview .photo-delete {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  background: rgba(230, 57, 70, 0.9);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-fast);
}

.photo-preview:hover .photo-delete {
  opacity: 1;
}

/* ===== MESSAGES SCREEN ===== */
.message-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  border-bottom-left-radius: 4px;
  padding: 1rem 1.2rem;
  margin-bottom: 0.8rem;
  position: relative;
  animation: fadeInUp 0.4s ease;
}

.message-bubble.highlight {
  border-color: var(--pink-primary);
  box-shadow: var(--shadow-pink);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(255, 45, 117, 0.05) 100%);
}

.message-bubble p {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.random-msg-display {
  text-align: center;
  padding: 3rem 2rem;
}

.random-msg-display .msg-emoji {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: heartbeat 1.5s infinite;
}

.random-msg-display .msg-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.6rem;
  color: var(--pink-light);
  line-height: 1.6;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== ROULETTE ===== */
.roulette-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.roulette-wheel {
  width: 280px;
  height: 280px;
  border-radius: var(--radius-full);
  border: 4px solid var(--pink-primary);
  box-shadow: 0 0 40px rgba(255, 45, 117, 0.2), inset 0 0 40px rgba(255, 45, 117, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 2rem;
  background: var(--bg-card);
  overflow: hidden;
}

.roulette-wheel::before {
  content: '▼';
  position: absolute;
  top: -18px;
  font-size: 1.5rem;
  color: var(--pink-primary);
  z-index: 5;
  filter: drop-shadow(0 0 5px var(--pink-glow));
}

.roulette-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-inner.spinning {
  animation: none;
}

.roulette-center-text {
  font-family: 'Dancing Script', cursive;
  font-size: 1.2rem;
  color: var(--pink-light);
  text-align: center;
  padding: 1rem;
  z-index: 2;
  position: relative;
}

.roulette-segments {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
}

.roulette-segment {
  position: absolute;
  width: 100%;
  height: 100%;
  clip-path: polygon(50% 50%, 50% 0%, 100% 0%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.roulette-result {
  text-align: center;
  margin-top: 1rem;
  min-height: 60px;
}

.roulette-result-text {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  color: var(--pink-primary);
  animation: fadeInZoom 0.5s ease;
}

.roulette-result-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  animation: heartbeat 1s ease;
}

/* ===== TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--pink-primary), var(--pink-dark), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.5s ease;
}

.timeline-item::before {
  content: '💖';
  position: absolute;
  left: -2rem;
  top: 0.2rem;
  font-size: 0.85rem;
  width: 20px;
  text-align: center;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: var(--transition-fast);
}

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

.timeline-date {
  font-size: 0.75rem;
  color: var(--pink-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.timeline-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.timeline-photo {
  width: 100%;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
  max-height: 200px;
  object-fit: cover;
}

/* ===== MUSIC PLAYER ===== */
.music-player {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.music-player::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255, 45, 117, 0.05) 0%, transparent 70%);
}

.music-disc {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: conic-gradient(from 0deg, #1a1a1a, #333, #1a1a1a, #333, #1a1a1a);
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--border-color);
  position: relative;
}

.music-disc.playing {
  animation: spin 3s linear infinite;
  border-color: var(--pink-primary);
  box-shadow: 0 0 20px var(--pink-glow);
}

.music-disc-center {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--pink-primary);
  border: 3px solid var(--bg-card);
}

.music-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  position: relative;
}

.music-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  position: relative;
}

.music-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.music-play-btn {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--gradient-love);
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(255, 45, 117, 0.4);
  transition: var(--transition-fast);
}

.music-play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 30px rgba(255, 45, 117, 0.5);
}

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

/* ===== MUSIC LYRICS ===== */
.music-lyrics {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  max-height: 350px;
  overflow-y: auto;
  position: relative;
  animation: fadeInUp 0.6s ease;
}

.music-lyrics::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-love);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.music-lyrics-title {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--pink-light);
  margin-bottom: 1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
}

.music-lyrics-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--text-secondary);
  text-align: center;
  font-style: italic;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ===== ADMIN PANEL ===== */
.admin-screen {
  padding-bottom: 6rem;
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  margin-bottom: 1rem;
}

.admin-section-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--pink-light);
}

.admin-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 200;
}

.admin-actions .btn {
  flex: 1;
}

.inline-add {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.inline-add input {
  flex: 1;
}

/* ===== FILE INPUT ===== */
.file-input-wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* ===== WATERMARK ===== */
.watermark {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 300;
  letter-spacing: 0.5px;
  position: relative;
}

.watermark::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--border-color);
  margin: 0 auto 0.8rem;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  animation: fadeInZoom 0.3s ease;
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.modal-actions .btn {
  flex: 1;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-pink);
  border-radius: var(--radius-lg);
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
  z-index: 2000;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease;
  white-space: nowrap;
}

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

/* ===== NAV BOTTOM (on home) ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  z-index: 100;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.4rem 0.8rem;
  border: none;
  background: none;
  color: var(--text-secondary);
  font-size: 0.65rem;
  cursor: pointer;
  transition: var(--transition-fast);
  font-weight: 500;
}

.bottom-nav-item span:first-child {
  font-size: 1.3rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: var(--pink-primary);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
  60% { transform: scale(1); }
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50% { opacity: 0.8; transform: translateX(-50%) scale(1.1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

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

@keyframes floatHearts {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-150px) scale(0.5);
  }
}

.floating-heart {
  position: fixed;
  bottom: 10%;
  font-size: 1.5rem;
  animation: floatHearts 3s ease-in forwards;
  pointer-events: none;
  z-index: 50;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pink-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 380px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .login-title {
    font-size: 2rem;
  }
  .roulette-wheel {
    width: 230px;
    height: 230px;
  }
}

@media (min-width: 768px) {
  .screen {
    max-width: 500px;
    margin: 0 auto;
  }
  .admin-actions {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
  }
  .bottom-nav {
    max-width: 500px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
}

/* ===== TABS (on Messages Screen) ===== */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  flex: 1;
  padding: 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
}

.tab-btn.active {
  background: var(--pink-primary);
  border-color: var(--pink-primary);
  color: white;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 0.95rem;
}

/* ===== Upload area ===== */
.upload-area {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.upload-area:hover {
  border-color: var(--pink-primary);
  background: rgba(255, 45, 117, 0.03);
}

.upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-area-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.upload-area-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Fix for hidden elements */
.hidden {
  display: none !important;
}
