/* === VARIABLES === */
:root {
  --bg-color: #1c1c1c;
  --text-color: #fff;
  --accent-color: #f0c040;
  --blur-bg: rgba(0, 0, 0, 0.5);
  --sidebar-bg: rgba(0, 0, 0, 0.3);
  --details-bg: rgba(0, 0, 0, 0.4);
  --post-bg: rgba(0, 0, 0, 0.5);
  --overlay-bg: rgba(0, 0, 0, 0.95);
  --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 90px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-color);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: #000;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: url('../images/Header-Updated.png') no-repeat center center;
  background-size: cover;
  z-index: -1;
  opacity: 1;
}


/* === NAVIGATION BAR === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  padding: 0 5vw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--blur-bg);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
  z-index: 1000;
}

nav .logo img {
  height: clamp(26px, 5vw, 40px);
  margin-left: clamp(-37px, -2vw, 0px);
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav ul li a {
  text-decoration: none;
  color: var(--text-color);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  padding: 6px 16px;
  transition: 0.3s;
}

nav ul li a:hover {
  color: var(--accent-color);
}

/* === LAYOUT GRID === */
.container {
  display: grid;
  grid-template-columns: 250px 1fr 300px;
  height: calc(100vh - 80px);
  overflow: hidden;
  margin-top: 80px;
}

/* === SIDEBAR === */
.sidebar {
  padding: 20px;
  border-right: 1px solid #333;
  backdrop-filter: blur(5px);
  background: var(--sidebar-bg);
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin: 15px 0;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: background 0.3s, color 0.3s, transform 0.2s;
}

.sidebar ul li:hover,
.sidebar ul li.active {
  background: var(--accent-color);
  color: #111;
  transform: translateX(5px);
  box-shadow: 2px 4px 12px rgba(0, 0, 0, 0.2);
}

/* === MAIN FEED === */
.main-feed {
  padding: 45px 20px 0;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.main-feed::-webkit-scrollbar {
  display: none;
}

.main-feed h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  text-align: center;
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 600;
  transition: font-size 0.3s;
}

.main-feed h2 {
  font-size: clamp(1rem, 2vw, 1.2rem);
  text-align: center;
  font-weight: 300;
  color: #ddd;
  margin-bottom: 30px;
  letter-spacing: 0.5px;
}

.art-post {
  background: var(--post-bg);
  padding: 20px;
  margin-bottom: 30px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  transition: background 0.3s, transform 0.3s;
}

.art-post h3 {
  text-align: center;
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.art-post img,
.art-post video,
#mobileMergedPost img,
#mobileMergedPost video {
  max-width: 100%;
  max-height: 60vh;
  margin: 0 auto 20px;
  display: block;
}

/* === DETAILS PANEL === */
.details-panel {
  padding: 20px;
  border-left: 1px solid #333;
  backdrop-filter: blur(5px);
  background: var(--details-bg);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.details-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid #444;
  border-radius: 8px;
  padding: 15px;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.3s ease forwards;
}

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

.details-box h4 {
  font-size: 1rem;
  margin-bottom: 5px;
  color: #fafafa;
}

.details-box p {
  font-size: 0.85rem;
  color: #bbb;
  margin: 0;
}

/* === HAMBURGER & OVERLAY (Mobile only) === */
#hamburger-toggle,
#fullscreen-overlay {
  display: none;
}

/* === MOBILE POPUP === */
body.popup-active {
  overflow: hidden;
}

#mobile-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#mobile-popup .popup-content {
  background: #111;
  padding: 30px 20px;
  border-radius: 10px;
  max-width: 90%;
  width: 100%;
  text-align: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

#mobile-popup .popup-content p {
  margin: 10px 0;
  font-size: 1rem;
}

#mobile-popup button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: var(--accent-color);
  border: none;
  color: #000;
  border-radius: 6px;
  cursor: pointer;
}

/* === PREFERENCE FOR REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* === MEDIA QUERIES: MOBILE === */
@media (max-width: 768px) {
  nav ul.nav-links {
    display: none !important;
  }

  nav .logo img {
    margin-left: 5px;
  }

  #hamburger-toggle {
    display: block;
    position: fixed;
    top: 25px;
    right: 25px;
    width: 35px;
    height: 30px;
    z-index: 1100;
    cursor: pointer;
  }

  #hamburger-toggle span {
    position: relative;
    display: block;
    background: white;
    height: clamp(1.5px, 0.25vw, 2px);
    width: clamp(12px, 7vw, 25px);
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.4s;
  }

  #hamburger-toggle span::before,
  #hamburger-toggle span::after {
    content: "";
    position: absolute;
    left: 0;
    background: white;
    height: clamp(1.5px, 0.25vw, 2px);
    width: 100%;
    transition: transform 0.4s, top 0.4s;
  }

  #hamburger-toggle span::before {
    top: clamp(-7px, -2vw, -10px);
  }

  #hamburger-toggle span::after {
    top: clamp(7px, 2vw, 10px);
  }

  #hamburger-toggle.open span {
    background: transparent;
  }

  #hamburger-toggle.open span::before {
    transform: rotate(45deg);
    top: 0;
  }

  #hamburger-toggle.open span::after {
    transform: rotate(-45deg);
    top: 0;
  }

  #fullscreen-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    clip-path: circle(0% at 100% 0);
    transition: clip-path 0.8s ease-in-out;
    z-index: 1090;
    justify-content: center;
    align-items: center;
  }

  #fullscreen-overlay.active {
    clip-path: circle(150% at 100% 0);
  }

  #fullscreen-overlay ul {
    list-style: none;
    text-align: center;
    padding: 0;
  }

  #fullscreen-overlay ul li {
    margin: 20px 0;
  }

  #fullscreen-overlay ul li a {
    font-size: 1.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
  }

  #fullscreen-overlay ul li a:hover {
    color: #ccc;
  }

  .container {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    overflow: auto;
    margin-top: 80px;
  }

  .sidebar,
  .details-panel {
    display: none !important;
  }

  .main-feed {
    padding-top: 50px;
  }

  .main-feed h1 {
    font-size: 1.8rem !important;
    font-weight: 500 !important;
  }

  .main-feed h2 {
    font-size: 1rem !important;
    color: #ccc;
  }

  .art-post h3 {
    display: none;
  }

  .art-post:not(#mobileMergedPost) {
    display: none !important;
  }

  #mobileMergedPost {
    display: block;
  }

  .mobile-merged-heading {
    color: #fff;
    text-align: center;
    margin: 20px 0 10px;
    font-size: 1.5rem;
  }

  #mediaPreviewOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
  }

  #mediaPreviewOverlay.active {
    display: flex;
    opacity: 1;
  }
}

@media (min-width: 769px) {
  #mobileMergedPost,
  .mobile-merged-heading {
    display: none;
  }
}
