/* ==========================================================================
   CSS Variables & Theme Setup
   ========================================================================== */
:root {
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', var(--font-primary);
  
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #192238;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  
  --primary: #6366f1;
  --primary-light: #818cf8;
  
  --border-color: #1e293b;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Layout Containers
   ========================================================================== */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ==========================================================================
   Header & Banner Styling
   ========================================================================== */
.site-header {
  background-color: rgba(19, 27, 46, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Brand Logo Layout (using logo.png) */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.logo-accent {
  color: var(--primary);
}

/* Navigation List */
.main-nav ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--text-main);
}

/* Sign In button link style */
.btn-signin {
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-main) !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.btn-signin:hover {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.1);
}

/* ==========================================================================
   Thread Header
   ========================================================================== */
.modern-thread-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.thread-badge {
  display: inline-block;
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.modern-thread-header h1 {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.thread-meta-bar {
  display: flex;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   Post Cards Stream
   ========================================================================== */
.posts-stream {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s ease;
}

.post-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.post-card.is-op {
  border-left: 4px solid var(--primary);
}

.post-user-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.post-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.post-user-info {
  display: flex;
  flex-direction: column;
}

.post-username {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-main);
}

.post-time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.post-text p {
  color: #cbd5e1;
  font-size: 1.025rem;
  margin-bottom: 1rem;
}

.post-text p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Modern Reply Box
   ========================================================================== */
.modern-reply-box {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 3rem;
  opacity: 0.85;
}

.modern-reply-box h3 {
  font-family: var(--font-heading);
  margin-bottom: 0.25rem;
}

.modern-reply-box p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.modern-reply-box textarea {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: var(--text-main);
  font-family: inherit;
  resize: none;
  margin-bottom: 1rem;
}

/* FLOATING CONVERSION CTA BUTTON */
.floating-cta-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    padding: 0.8rem 1.35rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    box-shadow: 0 8px 25px -4px rgba(16, 185, 129, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: pulse-subtle 3s infinite;
}

.floating-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px -4px rgba(16, 185, 129, 0.7);
    color: #ffffff;
}

@keyframes pulse-subtle {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .floating-cta-btn {
        bottom: 12px;
        right: 12px;
        padding: 0.4rem 0.75rem; /* Much smaller padding */
        font-size: 0.75rem;       /* Smaller font */
        border-radius: 30px;
        box-shadow: 0 4px 15px -2px rgba(16, 185, 129, 0.4);
    }
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: not-allowed;
  opacity: 0.7;
}

/* ==========================================================================
   Responsive Query Adjustments
   ========================================================================== */
@media (max-width: 640px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }
  
  .modern-thread-header h1 {
    font-size: 1.75rem;
  }
}