/* ═══════════════════════════════════════════════════════════════════════════
   CRAVLON WEB SHARE - PRODUCTION STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Color Palette - Cravlon Original Theme */
  --primary: #FF9D6F;
  --primary-dark: #E67E50;
  --accent-purple: #A78BDD;
  --accent-purple-dark: #8B73C2;
  
  /* Dark Mode Backgrounds */
  --bg-main: #1A1A1A;
  --bg-card: #2A2A2A;
  --bg-elevated: #3A3A3A;
  
  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #CCCCCC;
  --text-tertiary: #999999;
  
  /* Borders & UI */
  --border: #444444;
  --border-light: #333333;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 16px;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  background: linear-gradient(180deg, var(--bg-main) 0%, #0F0F0F 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT
   ═══════════════════════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: 500px;
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER & LOGO
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeIn 0.8s ease-out 0.2s backwards;
}

.logo-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.logo-image {
  height: 48px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(255, 157, 111, 0.25));
  animation: fadeInScale 0.8s ease-out 0.3s backwards;
}

.tagline {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   POST CARD - MAIN COMPONENT
   ═══════════════════════════════════════════════════════════════════════════ */

.post-card {
  background: var(--bg-card);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: fadeIn 0.8s ease-out 0.4s backwards;
  border: 1px solid var(--border-light);
  transition: var(--transition);
  min-height: 200px;
}

.post-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

/* POST HEADER */
.post-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-light);
}

.user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
  object-fit: cover;
  border: 2px solid var(--border);
  box-shadow: 0 4px 12px rgba(255, 157, 111, 0.2);
  animation: fadeInScale 0.8s ease-out 0.45s backwards;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.user-info {
  flex: 1;
  min-width: 0;
  animation: fadeIn 0.8s ease-out 0.5s backwards;
}

.user-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.username {
  font-size: 13px;
  color: var(--text-secondary);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border-radius: 50%;
  font-size: 10px;
  color: white;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(255, 157, 111, 0.3);
}

.mood-indicator {
  font-size: 28px;
  margin-left: auto;
  animation: bounce 2s ease-in-out infinite;
  flex-shrink: 0;
}

/* POST CONTENT */
.post-content {
  padding: 16px;
}

.post-text {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  word-break: break-word;
  font-weight: 500;
}

/* MEDIA CONTAINER */
.media-container {
  width: 100%;
  margin: 0 -16px -16px -16px;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-card) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  min-height: 300px;
  border-radius: 0 0 24px 24px;
  animation: fadeIn 0.8s ease-out 0.55s backwards;
}

.media-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  animation: fadeIn 0.6s ease-out 0.6s backwards;
}

.media-video {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.media-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 8px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.media-pagination {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  display: none;
  border: 1px solid rgba(255, 157, 111, 0.2);
}

.media-pagination.show {
  display: block;
  animation: fadeInScale 0.3s ease-out;
}

/* POST STATS */
.post-stats {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.stat {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.stat:hover {
  color: var(--primary);
}

.stat-icon {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.stat-value {
  font-weight: 700;
  color: var(--text-primary);
}

/* POST ACTIONS */
.post-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
  animation: fadeIn 0.8s ease-out 0.65s backwards;
}

.action-btn {
  flex: 1;
  padding: 10px;
  border: 1.5px solid var(--border);
  background: transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.action-btn:hover {
  background: var(--bg-elevated);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CTA SECTION - PLAY STORE FOCUSED
   ═══════════════════════════════════════════════════════════════════════════ */

.cta-section {
  margin-top: 28px;
  animation: fadeIn 0.8s ease-out 0.6s backwards;
}

.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
  border-radius: 24px;
  padding: 32px 24px;
  color: white;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.cta-icon {
  font-size: 48px;
  margin-bottom: 16px;
  animation: slideUp 0.6s ease-out 0.7s backwards;
}

.cta-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
  animation: fadeInScale 0.6s ease-out 0.72s backwards;
}

.cta-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
  animation: slideUp 0.6s ease-out 0.75s backwards;
}

.cta-subtitle {
  font-size: 14px;
  opacity: 0.95;
  margin-bottom: 24px;
  line-height: 1.6;
  animation: slideUp 0.6s ease-out 0.8s backwards;
}

.cta-buttons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cta-btn {
  padding: 14px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  animation: fadeInScale 0.6s ease-out 0.85s backwards;
}

.cta-btn-primary {
  background: white;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.cta-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.cta-btn-primary:active {
  transform: translateY(0);
}

.cta-btn svg {
  width: 20px;
  height: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */

.footer {
  text-align: center;
  margin-top: 28px;
  font-size: 12px;
  color: var(--text-tertiary);
  animation: fadeIn 0.8s ease-out 0.9s backwards;
}

.footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.footer a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ERROR STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.error-state {
  text-align: center;
  padding: 40px 20px;
  animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.error-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: slideUp 0.6s ease-out 0.45s backwards;
}

.error-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  animation: slideUp 0.6s ease-out 0.5s backwards;
}

.error-message {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
  animation: slideUp 0.6s ease-out 0.55s backwards;
}

.debug-box {
  background: var(--bg-elevated);
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-tertiary);
  text-align: left;
  font-family: 'Monaco', 'Courier New', monospace;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  animation: fadeInScale 0.6s ease-out 0.6s backwards;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════════════════════ */

.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 40px 20px;
  gap: 16px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
  .container {
    max-width: 100%;
  }

  body {
    padding: 16px;
  }

  .header {
    margin-bottom: 24px;
  }

  .logo-image {
    height: 40px;
  }

  .post-card {
    border-radius: 20px;
  }

  .post-header {
    padding: 12px;
  }

  .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .post-content {
    padding: 12px;
  }

  .media-container {
    min-height: 250px;
    margin: 0 -12px -12px -12px;
    border-radius: 0 0 20px 20px;
  }

  .post-text {
    font-size: 14px;
  }

  .post-stats {
    gap: 16px;
    padding: 10px 12px;
  }

  .post-actions {
    padding: 10px 12px;
    gap: 6px;
  }

  .action-btn {
    padding: 8px;
    font-size: 12px;
  }

  .cta-banner {
    border-radius: 20px;
    padding: 28px 20px;
  }

  .cta-title {
    font-size: 20px;
  }

  .cta-subtitle {
    font-size: 13px;
  }

  .footer {
    margin-top: 20px;
    font-size: 11px;
  }
}

@media (max-width: 360px) {
  .container {
    max-width: 100%;
  }

  body {
    padding: 12px;
  }

  .post-header {
    padding: 10px;
    gap: 10px;
  }

  .user-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .user-name {
    font-size: 14px;
  }

  .username {
    font-size: 12px;
  }

  .post-text {
    font-size: 13px;
  }

  .action-btn {
    font-size: 11px;
    padding: 6px;
  }

  .cta-title {
    font-size: 18px;
  }

  .cta-subtitle {
    font-size: 12px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY & UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

.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 states for keyboard navigation */
.action-btn:focus-visible,
.cta-btn:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .cta-section,
  .footer {
    display: none;
  }
}