@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ---------- Splash Screen ---------- */
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #011624;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: white;
}

#ocean {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.rayLayer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -20%, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.splash-text {
  position: relative;
  z-index: 10;
  text-align: center;
  animation: fadeIn 1.2s ease-out;
}

.splash-text h1 {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 4px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff 0%, #a5d8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.splash-text p {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.logo {
  width: 300px;
  height: 300px;
  margin-bottom: 24px;
  position: relative;
  z-index: 10;
  filter: drop-shadow(0 0 20px rgba(31, 111, 134, 0.5));
  animation: logoPulse 2s infinite ease-in-out;
}

@keyframes logoPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.05);
    opacity: 1;
  }

  100% {
    transform: scale(1);
    opacity: 0.9;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


:root {
  /* Core Colors */
  --brand: #1F6F86;
  --brand-gradient: linear-gradient(135deg, #1F6F86 0%, #154a5a 100%);
  --brand-soft: rgba(31, 111, 134, 0.1);
  --brand-light: #e6f6f9;

  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-soft: #94a3b8;

  --stroke: rgba(15, 23, 42, 0.08);
  --stroke-strong: rgba(15, 23, 42, 0.15);

  --accent: #38b2ac;
  --danger: #ef4444;
  --warning: #f59e0b;
  --ok: #10b981;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
}

.dark-mode {
  --bg-body: #020617;
  --bg-card: #0f172a;
  --bg-glass: rgba(15, 23, 42, 0.8);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #64748b;

  --stroke: rgba(255, 255, 255, 0.1);
  --stroke-strong: rgba(255, 255, 255, 0.2);

  --brand-soft: rgba(34, 211, 238, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

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

/* Utilities */
.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--stroke);
}

.card-shadow {
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card-shadow:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Common Components */
.pv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.pv-btn-primary {
  background: var(--brand-gradient);
  color: white;
}

.pv-btn-primary:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 15px rgba(31, 111, 134, 0.4);
}

.pv-btn-primary:active {
  transform: scale(0.98);
}

.pv-btn-ghost {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.pv-btn-ghost:hover {
  background: var(--brand-soft);
}

.divLine {
  height: 1px;
  background: var(--stroke);
  margin: 12px 0;
}

.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group img {
  border: 2px solid var(--bg-card);
  margin-left: -8px;
}

.avatar-group img:first-child {
  margin-left: 0;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.avatarBtn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  padding: 0;
  overflow: hidden;
  background: var(--brand-soft);
  cursor: pointer;
  border: 1px solid var(--stroke);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.avatarBtn:hover {
  transform: scale(1.05);
}

.avatar-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  font-size: 14px;
}

.pv-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--stroke-strong);
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.pv-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* Navigation System */
/* Navigation System */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--stroke);
}

/* Base App Layout */
.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  width: 100%;
  padding-bottom: 80px;
  background: var(--bg-body);
}

.wrap {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 16px;
}

.sidebar {
  display: none;
  width: 260px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: var(--bg-card);
  border-right: 1px solid var(--stroke);
  padding: 24px 16px;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  margin-bottom: 32px;
  padding: 0 12px;
  text-decoration: none;
}

.bottomNav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  padding: 12px 16px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--stroke);
}

.navItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.navItem:hover {
  background: var(--brand-soft);
  color: var(--brand);
}

.navItem.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.navItem i {
  font-size: 20px;
}

/* Sidebar Specific Nav Items */
.sidebar .navItem {
  flex-direction: row;
  gap: 12px;
  font-size: 14px;
  padding: 12px 16px;
}

/* Desktop Responsiveness */
@media (min-width: 1024px) {
  .topbar {
    /* Show topbar for Search & Avatar */
    display: flex;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--stroke);
  }

  .topbar .topLeft {
    display: none;
    /* Handled by sidebar */
  }

  .topbar .brandIcon,
  .topbar .brandName {
    display: none;
  }

  .sidebar {
    display: flex;
  }

  .main-content {
    margin-left: 260px;
    padding-bottom: 0;
  }

  .bottomNav {
    display: none;
  }

  .feed-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px;
  }

  .wrap {
    max-width: 760px;
    padding: 40px 24px;
  }
}

/* Toast System */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 24px;
  background: #0f172a;
  color: white;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-xl);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  z-index: 1000;
}

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

/* Animations */
@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.animate-slide-up {
  animation: slideUp 0.4s ease forwards;
}

/* Skeleton Screens */
.skeleton {
  background: linear-gradient(90deg, var(--stroke) 25%, var(--stroke-strong) 50%, var(--stroke) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ---------- Comments System ---------- */
.pv-commentsWrap {
  background: var(--bg-body);
  border-top: 1px solid var(--stroke);
  padding: 16px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-top: -1px;
  /* overlap border */
}

.pv-commentsTitle {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pv-commentsList {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.pv-commentRow {
  display: flex;
  gap: 10px;
}

.pv-commentReply {
  margin-left: 48px;
  position: relative;
}

.pv-commentReply::before {
  content: "";
  position: absolute;
  left: -24px;
  top: -12px;
  width: 16px;
  height: 24px;
  border-left: 2px solid var(--stroke);
  border-bottom: 2px solid var(--stroke);
  border-radius: 0 0 0 10px;
}

.pv-commentAvatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-soft);
  text-decoration: none;
}

.pv-commentAvatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pv-commentAvatar .sAv {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
}

.pv-commentBody {
  flex: 1;
  background: var(--bg-card);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
}

.pv-commentTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.pv-commentName {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
}

.pv-commentMeta {
  font-size: 11px;
  color: var(--text-muted);
}

.pv-commentText {
  color: var(--text-main);
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.pv-commentActions {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}

.pv-commentActionBtn {
  background: none;
  border: none;
  padding: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.pv-commentActionBtn:hover {
  color: var(--text-main);
}

.pv-commentActionBtn.active {
  color: var(--danger);
  /* or brand */
}

/* Composer */
.pv-commentComposer {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pv-commentComposer input {
  flex: 1;
  border: 1px solid var(--stroke);
  padding: 10px 14px;
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  transition: all 0.2s;
}

.pv-commentComposer input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

/* Utility Defaults */
.hidden {
  display: none !important;
}