/* ===== PAGE TITLES ===== */
.page-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  gap: var(--sp-3);
  flex-wrap: wrap;
}

.page-title {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* ===== HERO SECTION (HomePage only) ===== */
.hero-section {
  position: relative;
  width: 100%;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: transform 10s ease;
}

.hero-section:hover .hero-bg-wrap img {
  transform: scale(1.1);
}

.hero-gradient-top {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, hsl(224, 47%, 5%) 0%, hsl(224, 47%, 5%, 0.5) 50%, transparent 100%);
}

.hero-gradient-left {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, hsl(224, 47%, 5%) 0%, hsl(224, 47%, 5%, 0.8) 30%, transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

.hero-content-inner {
  max-width: 700px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  background: rgba(0, 163, 255, 0.15);
  border: 1px solid rgba(0, 163, 255, 0.3);
  color: var(--accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  margin-bottom: var(--sp-6);
}

.hero-title {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: var(--weight-black);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--sp-6);
  letter-spacing: 0.02em;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--accent), #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
}

.hero-description {
  font-size: var(--text-lg);
  color: hsl(215, 20%, 70%);
  margin-bottom: var(--sp-8);
  max-width: 600px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4);
}

.hero-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.3), inset 0 0 10px rgba(0, 163, 255, 0.1);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.5), inset 0 0 15px rgba(0, 163, 255, 0.2);
}

.hero-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-8);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  background: transparent;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

/* ===== HOME SECTION TITLES ===== */
.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
}

.home-section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  letter-spacing: 0.03em;
}

.home-section-title .title-accent {
  display: inline-block;
  width: var(--sp-8);
  height: 3px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* ===== HOME PAGE ===== */
.home-left-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--sp-5));
}

/* ===== POST PAGE (article view) ===== */
.post-header {
  margin-bottom: var(--sp-5);
}

.post-header h1 {
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: 1.2;
  margin-bottom: var(--sp-3);
}

.post-category {
  margin-bottom: var(--sp-3);
}

.post-category a {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--accent);
  transition: color var(--transition-fast), text-shadow 0.3s ease;
}

.post-category a:hover {
  color: var(--accent-hover);
  text-shadow: 0 0 8px rgba(0, 163, 255, 0.3);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.post-cover {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-6);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.post-body {
  font-size: var(--text-base);
  color: var(--text-primary);
  line-height: 1.7;
}

.post-body h2 {
  font-size: var(--text-xl);
  margin-top: var(--sp-8);
  margin-bottom: var(--sp-3);
}

.post-body h3 {
  font-size: var(--text-lg);
  margin-top: var(--sp-6);
  margin-bottom: var(--sp-2);
}

.post-body p {
  margin-bottom: var(--sp-4);
  color: var(--text-primary);
}

.post-body ul, .post-body ol {
  margin-bottom: var(--sp-4);
  padding-left: var(--sp-6);
}

.post-body ul li { list-style: disc; }
.post-body ol li { list-style: decimal; }

.post-body li {
  margin-bottom: var(--sp-1);
  color: var(--text-primary);
}

.post-body blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0;
  background: rgba(0, 163, 255, 0.05);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-body img {
  border-radius: var(--radius-md);
  margin: var(--sp-4) 0;
}

.post-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.post-body a:hover {
  text-shadow: 0 0 8px rgba(0, 163, 255, 0.3);
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== COMMENTS SECTION ===== */
.comments-section {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.comments-section h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-4);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.comments-section .comment-form {
  margin-bottom: var(--sp-6);
}

/* ===== REPLIES SECTION ===== */
.replies-section {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.replies-section h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-4);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

/* ===== RELATED POSTS ===== */
.related-posts {
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.related-posts h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-4);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

/* ===== FORUM PAGE ===== */
.forum-stats-bar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-5);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.forum-stats-bar strong {
  color: var(--accent);
}

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

.forum-online-indicator {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.online-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.5);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.forum-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.forum-category-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.forum-category-card:hover {
  border-color: rgba(0, 163, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 163, 255, 0.1);
}

.category-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}

.category-info h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--sp-1);
  color: var(--text-primary);
}

.category-info p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: var(--sp-1);
}

.forum-thread-count {
  font-size: var(--text-xs);
  color: var(--accent);
}

/* ===== THREAD PAGE ===== */
.thread-header {
  margin-bottom: var(--sp-5);
}

.thread-header h1 {
  font-size: var(--text-2xl);
  margin-top: var(--sp-2);
}

.thread-badges {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}

.thread-content {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
}

.thread-footer {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== AUTH PAGES ===== */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: var(--sp-8) var(--sp-4);
}

.auth-card {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  width: 100%;
  max-width: 400px;
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.1);
}

.auth-card h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-2);
  text-align: center;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

.auth-subtitle {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

.auth-footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-footer a {
  color: var(--accent);
  font-weight: var(--weight-medium);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Telegram login widget container */
.telegram-login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) 0;
}

.telegram-login-container .telegram-info {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
}

/* ===== PROFILE PAGE ===== */
.profile-header {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-5);
  padding: var(--sp-6);
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-5);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-info h1 {
  font-size: var(--text-2xl);
  margin-bottom: var(--sp-1);
}

.profile-info .username {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.profile-info .bio {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
  line-height: 1.5;
}

.profile-stats {
  display: flex;
  gap: var(--sp-6);
}

.profile-stat {
  text-align: center;
}

.profile-stat .stat-value {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
}

.profile-stat .stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===== SEARCH PAGE ===== */
.search-filters {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  flex-wrap: wrap;
}

.search-result {
  padding: var(--sp-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.search-result:hover {
  background: rgba(255, 255, 255, 0.03);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result h4 {
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  margin-bottom: var(--sp-1);
}

.search-result h4 a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

.search-result h4 a:hover {
  color: var(--accent);
}

.search-result p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--sp-2);
}

.search-result-meta {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===== MESSAGES PAGE ===== */
.messages-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-4);
  min-height: 400px;
}

.messages-list {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.message-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.message-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.message-item.unread {
  background: rgba(0, 163, 255, 0.05);
  border-left: 2px solid var(--accent);
}

.message-preview {
  flex: 1;
  min-width: 0;
}

.message-subject {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-snippet {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.message-view {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  min-height: 300px;
}

.message-body {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.6;
}

/* ===== NOTIFICATIONS PAGE ===== */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition-fast);
}

.notification-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

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

.notification-item.unread {
  background: rgba(0, 163, 255, 0.05);
}

.notification-icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.4;
}

.notification-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* ===== SETTINGS PAGE ===== */
.settings-form {
  max-width: 560px;
}

.settings-section {
  background: rgba(11, 14, 23, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
}

.settings-section h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

/* ===== NEW THREAD PAGE ===== */
.new-thread-form {
  max-width: 700px;
  margin: 0 auto;
}

.new-thread-form h1 {
  margin-bottom: var(--sp-6);
  font-family: var(--font-display);
  letter-spacing: 0.05em;
}

/* ===== ERROR PAGE ===== */
.error-page {
  text-align: center;
  padding: var(--sp-16) var(--sp-4);
}

.error-code {
  font-size: 72px;
  font-weight: var(--weight-bold);
  font-family: var(--font-display);
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--sp-3);
  text-shadow: 0 0 30px rgba(0, 163, 255, 0.3);
}

.error-page h2 {
  margin-bottom: var(--sp-3);
}

.error-page p {
  font-size: var(--text-sm);
  margin-bottom: var(--sp-6);
}

/* ===== RECENT REPLIES (forum page) ===== */
.recent-replies-section {
  margin-top: var(--sp-6);
}

.section-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
  margin-bottom: var(--sp-4);
}

.recent-replies-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.recent-reply-card {
  padding: var(--sp-4);
  display: block;
  transition: all 0.3s ease;
}

.recent-reply-card:hover {
  border-color: rgba(0, 163, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 163, 255, 0.1);
}

.reply-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-1);
}

/* ===== TELEGRAM SIDEBAR CTA CARD ===== */
.telegram-cta-card {
  background: linear-gradient(135deg, rgba(0, 163, 255, 0.15), rgba(29, 78, 216, 0.15));
  border: 1px solid rgba(0, 163, 255, 0.2);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  position: relative;
  overflow: hidden;
}

.telegram-cta-card::before {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 80px;
  height: 80px;
  background: rgba(0, 163, 255, 0.2);
  border-radius: 50%;
  filter: blur(20px);
}

.telegram-cta-card h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
  position: relative;
  z-index: 1;
}

.telegram-cta-card p {
  font-size: var(--text-sm);
  color: rgba(147, 197, 253, 0.8);
  margin-bottom: var(--sp-6);
  position: relative;
  z-index: 1;
}

.telegram-cta-card .btn {
  position: relative;
  z-index: 1;
}
