﻿/* ============================================================
   SocialHub – Modern Attractive UI
   Glass-morphism + gradients + animations
   ============================================================ */

/* ---------- Base ---------- */
:root {
  --primary: #6C63FF;
  --primary-dark: #5A52D5;
  --primary-light: #8B83FF;
  --secondary: #FF6584;
  --gradient-bg: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--gradient-bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* ---------- Glassmorphism ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius);
}

.glass-dark {
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
}

/* ---------- Header ---------- */
header {
  background: rgba(108, 99, 255, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.25);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

header a {
  color: white !important;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 6px 12px;
  border-radius: 8px;
}

header a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

header .brand {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, #f0e6ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Buttons ---------- */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white !important;
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(108, 99, 255, 0.5);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white !important;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.post-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.post-card img {
  border-radius: var(--radius-sm);
}

/* ---------- Feed & Create Post ---------- */
#createPostBox {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

#createPostBox textarea {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.6);
}

#createPostBox textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.15);
}

#createPostBox input[type="file"] {
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  padding: 10px;
  background: rgba(255, 255, 255, 0.4);
}

/* ---------- Suggestions ---------- */
#suggestions {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

#suggestions h3 {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

/* ---------- Profile ---------- */
.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(108, 99, 255, 0.3);
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.2);
  transition: all 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeInUp 0.5s ease forwards;
}

.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.2s; }
.post-card:nth-child(4) { animation-delay: 0.3s; }

/* ---------- Toast ---------- */
#toast {
  background: rgba(26, 26, 46, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 14px 28px;
  color: white;
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* ---------- Like button animation ---------- */
.like-btn {
  transition: all 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.1rem;
  padding: 4px 10px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.like-btn:hover {
  transform: scale(1.1);
}

.like-btn.liked {
  color: #FF6584;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  header .brand {
    font-size: 1.3rem;
  }
  .container {
    padding: 12px;
  }
  .post-card {
    padding: 16px;
  }
  #createPostBox {
    padding: 16px;
  }
}
