@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
  --brand-primary: #ff6b6b;
  --brand-primary-dark: #e04848;
  --brand-secondary: #4f46e5;
  --brand-bg: linear-gradient(135deg, #fff8f0 0%, #f4f4ff 100%);
  --card-bg: #ffffff;
  --text-color: #1f2933;
  --muted-text: #6b7280;
  --border-radius-lg: 1.25rem;
  --border-radius-md: 1rem;
  --shadow-soft: 0 20px 50px -25px rgba(79, 70, 229, 0.55);
  --shadow-card: 0 18px 40px -20px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', Arial, sans-serif;
  color: var(--text-color);
  background: var(--brand-bg);
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--brand-secondary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.navbar-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.navbar-logo {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.8);
}

.navbar-custom {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-soft);
  margin-top: 1.5rem;
  padding: 0.75rem 1.5rem;
}

.navbar-custom .nav-link.active {
  color: var(--brand-primary) !important;
  font-weight: 600;
}

.hero-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: 3rem;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 2.75rem);
}

.hero-text {
  color: var(--muted-text);
}

.auth-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  padding: 2.5rem 2.75rem;
}

.form-floating > label {
  color: var(--muted-text);
}

.auth-card .btn-primary {
  background: var(--brand-secondary);
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  box-shadow: 0 14px 30px -12px rgba(79, 70, 229, 0.6);
}

.auth-card .btn-primary:hover {
  background: var(--brand-primary);
}

.alert-custom {
  border-radius: var(--border-radius-md);
}

.feed-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  justify-items: center;
  margin-bottom: 4rem;
}

.post-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: min(100%, 30rem);
}

.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px -30px rgba(79, 70, 229, 0.5);
}

.post-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.08),
    rgba(255, 107, 107, 0.08)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.post-card-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: calc(var(--border-radius-md) * 0.75);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.post-card .card-body {
  padding: 1.75rem;
}

.badge-soft {
  background: rgba(79, 70, 229, 0.12);
  color: var(--brand-secondary);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
  font-size: 0.8rem;
}

.btn-pill {
  border-radius: 999px;
  padding: 0.55rem 1.35rem;
  font-weight: 600;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.muted-text {
  color: var(--muted-text);
}

.comment-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
}

.footer-space {
  margin-top: auto;
  padding: 2rem 0 1rem;
  text-align: center;
  color: var(--muted-text);
  font-size: 0.9rem;
}

@media (max-width: 992px) {
  .navbar-custom {
    margin-top: 1rem;
  }

  .auth-card {
    padding: 2rem 1.5rem;
  }

  .hero-card {
    padding: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-card {
    text-align: center;
  }

  .hero-card img {
    margin-top: 2rem;
  }
}
