/* ==========================================================================
   SSOSYAL // CYBER SOCIAL NETWORK STYLESHEET
   Hybrid Twitter/X + Instagram + Facebook Cybernetic Glassmorphism
   ========================================================================== */

:root {
  --sosyal-bg: #07090e;
  --sosyal-surface: rgba(15, 20, 31, 0.75);
  --sosyal-surface-hover: rgba(22, 29, 46, 0.85);
  --sosyal-border: rgba(255, 255, 255, 0.08);
  --sosyal-border-glow: rgba(0, 240, 255, 0.3);
  --sosyal-accent: #00f0ff;
  --sosyal-accent-purple: #a855f7;
  --sosyal-accent-pink: #ec4899;
  --sosyal-text: #f1f5f9;
  --sosyal-text-muted: #94a3b8;
  --sosyal-radius: 16px;
  --sosyal-radius-sm: 10px;
  --sosyal-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.sosyal-layout {
  min-height: 100vh;
  background: var(--sosyal-bg);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 240, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.04) 0%, transparent 40%);
  color: var(--sosyal-text);
  padding-top: 80px;
  padding-bottom: 60px;
}

.sosyal-grid {
  display: grid;
  grid-template-columns: 260px 1fr 320px;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ─── LEFT SIDEBAR ─────────────────────────────────────────────────────────── */
.sosyal-sidebar-left {
  position: sticky;
  top: 100px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sosyal-user-widget {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--sosyal-shadow);
  position: relative;
  overflow: hidden;
}

.sosyal-user-widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(168, 85, 247, 0.2));
  z-index: 0;
}

.widget-avatar {
  position: relative;
  z-index: 1;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid #07090e;
  object-fit: cover;
  margin: 12px auto 8px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3);
  background: #1e293b;
}

.widget-name {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
}

.widget-handle {
  font-size: 0.8rem;
  color: var(--sosyal-text-muted);
  font-family: var(--font-mono);
}

.widget-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--sosyal-border);
}

.widget-stat-val {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--sosyal-accent);
}

.widget-stat-lbl {
  font-size: 0.7rem;
  color: var(--sosyal-text-muted);
  text-transform: uppercase;
}

/* Nav Menu */
.sosyal-nav-menu {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sosyal-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--sosyal-radius-sm);
  color: var(--sosyal-text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.sosyal-nav-item:hover, .sosyal-nav-item.active {
  background: rgba(0, 240, 255, 0.1);
  color: var(--sosyal-accent);
  transform: translateX(4px);
}

.sosyal-nav-item .icon {
  font-size: 1.25rem;
}

.sosyal-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
}

/* ─── CENTER FEED ─────────────────────────────────────────────────────────── */
.sosyal-feed-center {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Stories Bar */
.sosyal-stories-bar {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 14px 16px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.sosyal-stories-bar::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  width: 64px;
}

.story-avatar-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(45deg, var(--sosyal-accent), var(--sosyal-accent-pink), var(--sosyal-accent-purple));
  position: relative;
  transition: transform 0.2s ease;
}

.story-item:hover .story-avatar-wrap {
  transform: scale(1.06);
}

.story-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #07090e;
}

.story-name {
  font-size: 0.72rem;
  color: var(--sosyal-text-muted);
  width: 100%;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Post Creator Box */
.sosyal-create-post {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 18px;
  box-shadow: var(--sosyal-shadow);
}

.create-post-top {
  display: flex;
  gap: 12px;
}

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

.create-post-textarea {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--sosyal-text);
  font-size: 0.95rem;
  resize: none;
  min-height: 70px;
  outline: none;
  font-family: inherit;
}

.create-post-textarea::placeholder {
  color: var(--sosyal-text-muted);
}

.media-preview-container {
  position: relative;
  margin-top: 12px;
  border-radius: var(--sosyal-radius-sm);
  overflow: hidden;
  max-height: 280px;
  background: #000;
  display: none;
}

.media-preview-container img, .media-preview-container video {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

.btn-remove-media {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.create-post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--sosyal-border);
  flex-wrap: wrap;
  gap: 10px;
}

.create-post-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-tool {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--sosyal-border);
  color: var(--sosyal-text-muted);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-tool:hover {
  background: rgba(0, 240, 255, 0.1);
  color: var(--sosyal-accent);
  border-color: rgba(0, 240, 255, 0.3);
}

.privacy-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--sosyal-border);
  color: var(--sosyal-text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

.btn-submit-post {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
  color: #07090e;
  font-weight: 700;
  border: none;
  border-radius: 99px;
  padding: 8px 22px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 240, 255, 0.3);
}

.btn-submit-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
}

.btn-submit-post:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── POST CARD ──────────────────────────────────────────────────────────── */
.sosyal-post-card {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 20px;
  box-shadow: var(--sosyal-shadow);
  transition: border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sosyal-post-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.avatar-wrapper-status {
  position: relative;
  display: inline-flex;
}

.post-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.online-status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #10b981;
  border: 2px solid #07090e;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.post-author-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-verified {
  color: var(--sosyal-accent);
  font-size: 0.85rem;
}

.badge-founder {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(168, 85, 247, 0.2));
  color: var(--sosyal-accent);
  border: 1px solid rgba(0, 240, 255, 0.3);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.post-meta {
  font-size: 0.78rem;
  color: var(--sosyal-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-privacy-tag {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 6px;
  border-radius: 4px;
}

.post-more-btn {
  background: transparent;
  border: none;
  color: var(--sosyal-text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.post-more-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sosyal-text);
}

.post-content {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--sosyal-text);
  word-break: break-word;
  white-space: pre-wrap;
}

.post-content a {
  color: var(--sosyal-accent);
  text-decoration: none;
}

.post-media-wrap {
  border-radius: var(--sosyal-radius-sm);
  overflow: hidden;
  background: #000;
  max-height: 480px;
  border: 1px solid var(--sosyal-border);
}

.post-media-wrap img, .post-media-wrap video {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  display: block;
}

.post-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--sosyal-border);
}

.post-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--sosyal-text-muted);
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px 10px;
  border-radius: 8px;
}

.post-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--sosyal-text);
}

.post-action-btn.liked {
  color: var(--sosyal-accent-pink);
}

.post-action-btn.bookmarked {
  color: var(--sosyal-accent);
}

/* Comments section */
.post-comments-section {
  padding-top: 12px;
  border-top: 1px dashed var(--sosyal-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.comment-input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--sosyal-border);
  border-radius: 99px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: var(--sosyal-text);
  outline: none;
}

.btn-send-comment {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: var(--sosyal-accent);
  border-radius: 99px;
  padding: 6px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.comment-item {
  display: flex;
  gap: 10px;
  font-size: 0.86rem;
}

.comment-bubble {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 8px 12px;
  flex: 1;
}

/* ─── RIGHT SIDEBAR ────────────────────────────────────────────────────────── */
.sosyal-sidebar-right {
  position: sticky;
  top: 100px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sosyal-panel {
  background: var(--sosyal-surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  padding: 18px;
  box-shadow: var(--sosyal-shadow);
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trend-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--sosyal-border);
  cursor: pointer;
}

.trend-item:last-child {
  border-bottom: none;
}

.trend-tag {
  font-weight: 600;
  color: var(--sosyal-accent);
  font-size: 0.88rem;
}

.trend-count {
  font-size: 0.75rem;
  color: var(--sosyal-text-muted);
}

.suggested-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--sosyal-border);
}

.suggested-user-item:last-child {
  border-bottom: none;
}

.btn-follow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--sosyal-border);
  color: var(--sosyal-text);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-follow:hover, .btn-follow.active {
  background: var(--sosyal-accent);
  color: #07090e;
  border-color: var(--sosyal-accent);
}

/* ─── MODAL & FLOATING DM ──────────────────────────────────────────────────── */
.sosyal-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.sosyal-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.sosyal-modal-box {
  background: #0c111a;
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  width: 100%;
  max-width: 480px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: transparent;
  border: none;
  color: var(--sosyal-text-muted);
  font-size: 1.3rem;
  cursor: pointer;
}

/* DM Floating Drawer */
.dm-floating-box {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  height: 480px;
  background: #0c111a;
  border: 1px solid var(--sosyal-border);
  border-radius: var(--sosyal-radius);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.8);
  z-index: 900;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  display: none;
}

.dm-floating-box.active {
  display: flex;
}

.dm-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--sosyal-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dm-messages-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 0.86rem;
  word-break: break-word;
}

.dm-bubble.mine {
  align-self: flex-end;
  background: linear-gradient(135deg, #00f0ff, #a855f7);
  color: #07090e;
  border-bottom-right-radius: 2px;
  font-weight: 500;
}

.dm-bubble.other {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  color: var(--sosyal-text);
  border-bottom-left-radius: 2px;
}

.dm-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--sosyal-border);
  display: flex;
  gap: 8px;
}

/* ─── MOBILE BOTTOM DOCK NAVIGATION ────────────────────────────────────────── */
.sosyal-mobile-dock {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(7, 9, 14, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  z-index: 1000;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: space-around;
}

.sosyal-dock-btn {
  background: transparent;
  border: none;
  color: var(--sosyal-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  font-family: inherit;
}

.sosyal-dock-btn .dock-icon {
  font-size: 1.25rem;
}

.sosyal-dock-btn .dock-text {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.sosyal-dock-btn.active,
.sosyal-dock-btn:hover {
  color: var(--sosyal-accent);
}

.sosyal-dock-btn.active .dock-text {
  color: var(--sosyal-accent);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

.sosyal-dock-btn .dock-badge {
  position: absolute;
  top: 4px;
  right: 14px;
  background: #f43f5e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 99px;
  border: 1px solid #07090e;
}

.dock-btn-compose {
  background: linear-gradient(135deg, #00f0ff 0%, #a855f7 100%);
  color: #07090e;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-10px);
  box-shadow: 0 6px 20px rgba(0, 240, 255, 0.5);
  border: 2px solid #07090e;
}

.dock-btn-compose .dock-icon-plus {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  color: #07090e;
}

/* ─── RESPONSIVE & MOBILE PHONE OPTIMIZATION ──────────────────────────────── */
@media (max-width: 1024px) {
  .sosyal-grid {
    grid-template-columns: 80px 1fr 280px;
    gap: 16px;
  }
  .widget-name, .widget-handle, .widget-stats, .sosyal-nav-item span {
    display: none;
  }
  .sosyal-nav-item {
    justify-content: center;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .sosyal-main-container {
    padding: 10px 10px 90px 10px;
  }

  .sosyal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sosyal-sidebar-left, 
  .sosyal-sidebar-right {
    display: none;
  }

  .sosyal-mobile-dock {
    display: flex;
  }

  .sosyal-create-post {
    padding: 14px 12px;
    border-radius: 12px;
  }

  .create-post-avatar {
    width: 38px;
    height: 38px;
  }

  .create-post-textarea {
    font-size: 0.88rem;
    min-height: 55px;
  }

  .create-post-tools {
    gap: 6px;
  }

  .btn-tool {
    padding: 5px 9px;
    font-size: 0.75rem;
  }

  .privacy-select {
    padding: 5px 8px;
    font-size: 0.75rem;
  }

  .btn-submit-post {
    padding: 6px 16px;
    font-size: 0.82rem;
  }

  .sosyal-post-card {
    padding: 14px 12px;
    border-radius: 12px;
    gap: 10px;
  }

  .post-avatar {
    width: 38px;
    height: 38px;
  }

  .post-author-name {
    font-size: 0.9rem;
  }

  .post-content {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .post-actions {
    padding-top: 8px;
  }

  .post-action-btn {
    padding: 5px 8px;
    font-size: 0.8rem;
  }

  /* Full Screen Mobile DM Drawer */
  .dm-floating-box {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
    z-index: 99999;
  }

  .dm-header {
    padding: 14px 16px;
    background: #0c111a;
  }

  .dm-footer {
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: #0c111a;
  }

  /* Mobile Modals */
  .modal-box {
    width: 95%;
    max-height: 90vh;
    padding: 20px 16px;
    border-radius: 16px;
  }

  /* Stories bar touch scroll */
  .sosyal-stories-bar {
    padding: 10px 8px;
    gap: 12px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .sosyal-stories-bar::-webkit-scrollbar {
    display: none;
  }

  .story-avatar-wrap {
    width: 52px;
    height: 52px;
  }

  .story-name {
    font-size: 0.72rem;
  }
}

