/*
Theme Name: Socialblog
Theme URI: http://example.com/socialblog/
Author: Antigravity
Author URI: http://example.com/
Description: A Facebook-style dashboard theme.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: socialblog
*/

:root {
  --bg-color: #f0f2f5;
  --header-bg: #ffffff;
  --card-bg: #ffffff;
  --text-primary: #050505;
  --text-secondary: #65676b;
  --primary-color: #1877f2;
  --primary-hover: #166fe5;
  --icon-bg: #e4e6eb;
  --icon-color: #1c1e21;
  --divider-color: #ced0d4;
  --border-radius: 8px;
  --hover-overlay: rgba(0, 0, 0, 0.05);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  overflow-y: scroll;
}

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

.main-content {
  display: flex;
  justify-content: space-between;
  padding-top: 60px; /* Header height */
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
}

/* Column Widths */
.left-sidebar {
  width: 360px;
  position: fixed;
  left: 0;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 16px 8px;
}

.right-sidebar {
  width: 360px;
  position: fixed;
  right: 0;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 16px 8px;
}

.feed-column {
  flex: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 24px 32px;
}

/* Scrollbar hiding for sidebars */
.left-sidebar::-webkit-scrollbar,
.right-sidebar::-webkit-scrollbar {
  width: 8px;
}
.left-sidebar:hover::-webkit-scrollbar-thumb,
.right-sidebar:hover::-webkit-scrollbar-thumb {
  background-color: #bcc0c4;
  border-radius: 4px;
}
.left-sidebar::-webkit-scrollbar-thumb,
.right-sidebar::-webkit-scrollbar-thumb {
  background-color: transparent;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: var(--header-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 320px;
}

.logo {
  color: var(--primary-color);
  font-size: 40px;
  line-height: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--bg-color);
  border-radius: 50px;
  padding: 8px 16px;
  flex: 1;
}

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  margin-left: 8px;
  width: 100%;
}

.header-center {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
  max-width: 600px;
}

.nav-item {
  width: 110px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
  transition: background-color 0.2s;
  font-size: 20px;
}

.nav-item:hover {
  background-color: var(--hover-overlay);
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 320px;
  justify-content: flex-end;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.2s;
  font-size: 18px;
}

.icon-btn:hover {
  background-color: #d8dadf;
}

/* Sidebar Item */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

.sidebar-item:hover {
  background-color: var(--hover-overlay);
}

.sidebar-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--primary-color);
}

.sidebar-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.sidebar-heading {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 17px;
  padding: 16px 8px 8px;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}

/* Create Post */
.create-post {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--divider-color);
  margin-bottom: 12px;
}

.create-post input {
  flex: 1;
  background-color: var(--bg-color);
  border: none;
  border-radius: 20px;
  padding: 12px 16px;
  font-size: 17px;
  outline: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.create-post input:hover {
  background-color: #e4e6eb;
}

.post-actions {
  display: flex;
  justify-content: space-between;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 600;
  transition: background-color 0.2s;
}

.action-btn:hover {
  background-color: var(--hover-overlay);
}

.action-btn.video { color: #e42645; }
.action-btn.photo { color: #41b35d; }
.action-btn.feeling { color: #eab026; }

/* Stories */
.stories-container {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.story-card {
  min-width: 112px;
  height: 200px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.2s;
  background-color: var(--card-bg);
}

.story-card:hover {
  transform: scale(1.02);
}

.story-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-profile {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid var(--primary-color);
  object-fit: cover;
}

.story-name {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.create-story .story-bg {
  height: 60%;
  background-color: var(--divider-color); /* Placeholder */
}

.create-story-btn {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 40px;
  background-color: var(--primary-color);
  border-radius: 50%;
  border: 4px solid var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  line-height: 1;
}

.create-story-text {
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

/* Post Styling */
.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.post-author-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.post-author-name {
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: block;
}

.post-time {
  font-size: 13px;
  color: var(--text-secondary);
}

.post-options {
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
}
.post-options:hover {
  background-color: var(--hover-overlay);
}

.post-content {
  margin-bottom: 12px;
  font-size: 15px;
}

.post-media {
  margin: 0 -16px; /* Break out of card padding */
}

.post-media img {
  width: 100%;
  max-height: 600px;
  object-fit: contain;
  background: black;
  display: block;
}

/* Video Styling */
.post-content .wp-video {
  width: calc(100% + 32px) !important;
  margin-left: -16px;
  margin-right: -16px;
}
.post-content .wp-video-shortcode video {
  width: 100% !important;
  max-height: 600px;
  background: black;
}

/* Sponsored */
.sponsored-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
}
.sponsored-item:hover {
  background-color: var(--hover-overlay);
}
.sponsored-img {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
}
.sponsored-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.sponsored-info p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Contacts */
.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
}
.contact-item:hover {
  background-color: var(--hover-overlay);
}
.contact-avatar-wrapper {
  position: relative;
}
.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background-color: #31a24c;
  border-radius: 50%;
  border: 2px solid var(--card-bg);
}
.contact-name {
  font-weight: 500;
  font-size: 15px;
}

/* --- Watch Page Styles --- */
.watch-page-container {
  display: flex;
  padding-top: 60px; /* Header height */
  min-height: 100vh;
  background-color: var(--bg-color);
}

.watch-sidebar {
  width: 360px;
  position: fixed;
  left: 0;
  top: 60px;
  height: calc(100vh - 60px);
  background-color: var(--card-bg);
  box-shadow: 1px 0 2px rgba(0,0,0,0.1);
  padding: 16px 8px;
  overflow-y: auto;
  z-index: 10;
}

.watch-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.2s;
  color: var(--text-primary);
  font-weight: 500;
}

.watch-sidebar-item:hover {
  background-color: var(--hover-overlay);
}

.watch-sidebar-item.active {
  background-color: #ebf5ff;
  color: var(--primary-color);
}

.watch-sidebar-item .icon-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.watch-sidebar-item.active .icon-circle {
  background-color: var(--primary-color);
  color: white;
}

.watch-main-content {
  flex: 1;
  margin-left: 360px; /* Offset for sidebar */
  padding: 24px 32px;
  max-width: 1400px;
}

.watch-hero-carousel {
  margin-bottom: 32px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  background-color: #000;
}

.hero-video-item {
  width: 100%;
  height: 500px;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
}

.hero-video-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  width: 100%;
  padding: 40px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.hero-video-play-btn {
  font-size: 64px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

.hero-video-play-btn:hover {
  transform: scale(1.1);
}

.hero-video-info h2 {
  color: white;
  font-size: 32px;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-video-info p {
  color: #ddd;
  font-size: 16px;
  max-width: 600px;
}

.video-section {
  margin-bottom: 40px;
}

.video-section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

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

.video-thumbnail {
  position: relative;
  display: block;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-color: #000;
  overflow: hidden;
}

.video-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.2s;
}

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background-color: rgba(0,0,0,0.8);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 40px;
  color: white;
  opacity: 0;
  transition: opacity 0.2s;
}

.video-thumbnail:hover .play-overlay {
  opacity: 1;
}

.video-thumbnail:hover img {
  opacity: 0.8;
}

.video-details {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
}

.channel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.video-text {
  display: flex;
  flex-direction: column;
}

.video-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-details a {
  text-decoration: none;
}

.video-details a:hover .video-title {
  color: var(--primary-color);
}

.video-meta {
  font-size: 13px;
  color: var(--text-secondary);
}

/* --- Responsive Media Queries --- */

/* Large Tablets & Small Desktops (max-width: 1100px) */
@media (max-width: 1100px) {
  .right-sidebar {
    display: none;
  }
  .main-content {
    justify-content: center;
  }
  .feed-column {
    margin: 0;
    margin-right: auto;
    margin-left: 360px; /* Offset for left sidebar */
  }
  .header-right {
    width: auto;
  }
}

/* Tablets (max-width: 900px) */
@media (max-width: 900px) {
  .left-sidebar {
    display: none;
  }
  .feed-column {
    margin: 0 auto; /* Center the feed */
  }
  .header-left {
    width: auto;
  }
  .search-bar {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    cursor: pointer;
  }
  .search-bar input {
    display: none;
  }
  .watch-sidebar {
    display: none;
  }
  .watch-main-content {
    margin-left: 0;
    max-width: 100%;
  }
}

/* Mobile Devices (max-width: 768px) */
@media (max-width: 768px) {
  .header {
    padding: 0 8px;
  }
  .logo {
    font-size: 32px;
  }
  .header-center {
    gap: 0;
  }
  .nav-item {
    width: auto;
    flex: 1;
    font-size: 20px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
  .feed-column {
    padding: 16px 0; /* Remove horizontal padding */
    width: 100%;
    max-width: 100%;
  }
  .card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-bottom: 8px;
  }
  .stories-container {
    padding-left: 16px;
  }
  .story-card {
    min-width: 100px;
    height: 180px;
  }
  .post-actions-bar .action-btn {
    padding: 8px 4px;
    font-size: 14px;
  }
  .hero-video-item {
    height: 300px;
  }
  .hero-video-info h2 {
    font-size: 24px;
  }
}

/* Dynamic Menus */
.dynamic-header-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.dynamic-header-menu li {
  display: flex;
}

.dynamic-header-menu li a {
  width: 110px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  position: relative;
  transition: background-color 0.2s;
  font-size: 20px;
  text-decoration: none;
}

.dynamic-header-menu li a:hover {
  background-color: var(--hover-overlay);
}

.dynamic-header-menu li.current-menu-item a {
  color: var(--primary-color);
}

.dynamic-header-menu li.current-menu-item a::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

.dynamic-sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dynamic-sidebar-menu li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.2s;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
}

.dynamic-sidebar-menu li a:hover {
  background-color: var(--hover-overlay);
}

.dynamic-header-right-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
  margin: 0;
  padding: 0;
}

.dynamic-header-right-menu li a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-primary);
  transition: background-color 0.2s;
  font-size: 18px;
  text-decoration: none;
}

.dynamic-header-right-menu li a:hover {
  background-color: #d8dadf;
}

