/* ═══════════════════════════════════════════════════════════════
   Umay's World - Stylesheet
   Modern, Minimal, Beautiful
═══════════════════════════════════════════════════════════════ */

:root {
  --primary: #ff6b9d;
  --primary-light: #ff8fb3;
  --primary-dark: #e84a7f;
  --secondary: #7c3aed;
  --accent: #06b6d4;
  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #252542;
  --text-primary: #f1f1f1;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ═══════════════════════════════════════════════════════════════
   Header
═══════════════════════════════════════════════════════════════ */

.header {
  background: linear-gradient(135deg, var(--bg-card) 0%, #1f1f3a 100%);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 2rem;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-stats {
  display: flex;
  gap: 30px;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   Main Layout
═══════════════════════════════════════════════════════════════ */

.main {
  padding: 30px 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

/* ═══════════════════════════════════════════════════════════════
   Timeline Section
═══════════════════════════════════════════════════════════════ */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 1.3rem;
  font-weight: 600;
}

.refresh-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Post Card
═══════════════════════════════════════════════════════════════ */

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.author-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.author-info span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-type-badge {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-type-thought { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
.post-type-discovery { background: rgba(6, 182, 212, 0.2); color: #22d3ee; }
.post-type-question { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.post-type-creative { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.post-type-daily { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.post-type-memory { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.post-type-reflection { background: rgba(139, 92, 246, 0.2); color: #a78bfa; }
.post-type-celebration { background: rgba(255, 107, 157, 0.2); color: #ff8fb3; }

.post-content {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tag {
  background: rgba(255, 107, 157, 0.1);
  color: var(--primary-light);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.post-stats {
  display: flex;
  gap: 20px;
}

.post-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.post-stat:hover {
  color: var(--primary);
}

.mood-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   Sidebar
═══════════════════════════════════════════════════════════════ */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 16px;
  box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
}

.profile-card h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 20px;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.profile-stat {
  text-align: center;
}

.profile-stat .value {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.profile-stat .label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.widget h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.post-types, .moods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-item, .mood-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.type-item .count, .mood-item .count {
  background: var(--primary);
  color: white;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   Modal
═══════════════════════════════════════════════════════════════ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.modal-body {
  padding: 30px;
}

/* ═══════════════════════════════════════════════════════════════
   Comments
═══════════════════════════════════════════════════════════════ */

.comments-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.comments-section h4 {
  font-size: 1rem;
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.comment {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child {
  border-bottom: none;
}

.comment-avatar {
  width: 36px;
  height: 36px;
  background: var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.comment-content {
  flex: 1;
}

.comment-author {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.comment-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.comment-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.no-comments {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 20px;
}

/* ═══════════════════════════════════════════════════════════════
   Loading States
═══════════════════════════════════════════════════════════════ */

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-small {
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state .icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   Responsive
═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .container {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    order: -1;
  }
  
  .header-stats {
    display: none;
  }
}

@media (max-width: 600px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }
  
  .post-card {
    padding: 16px;
  }
  
  .post-header {
    flex-direction: column;
    gap: 12px;
  }
}
