:root {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-card: rgba(18, 18, 42, 0.8);
  --text-primary: #e8e8f0;
  --text-secondary: #8888aa;
  --accent: #6c5ce7;
  --accent2: #00cec9;
  --accent3: #fd79a8;
  --gradient-1: linear-gradient(135deg, #6c5ce7, #00cec9);
  --gradient-2: linear-gradient(135deg, #fd79a8, #6c5ce7);
  --gradient-3: linear-gradient(135deg, #00cec9, #fd79a8);
  --border: rgba(108, 92, 231, 0.2);
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --glow: 0 0 20px rgba(108, 92, 231, 0.3);
  --radius: 16px;
  --radius-sm: 8px;
  --font: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-height: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(108,92,231,0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(0,206,201,0.05) 0%, transparent 50%),
              radial-gradient(circle at 50% 80%, rgba(253,121,168,0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* Navigation */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(10, 10, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s;
}

.navbar.scrolled { background: rgba(10, 10, 26, 0.98); box-shadow: var(--shadow); }

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.brand-icon { font-size: 1.8rem; background: var(--gradient-1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.brand-text { background: var(--gradient-1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.3s;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link:hover, .nav-link.active { color: var(--text-primary); background: rgba(108,92,231,0.1); }

.login-btn { border: 1px solid var(--border); }
.register-btn { background: var(--gradient-1); color: white !important; border: none; }
.register-btn:hover { opacity: 0.9; background: var(--gradient-1) !important; }

.nav-profile {
  position: relative;
  cursor: pointer;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 50px;
  border: 1px solid var(--border);
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s;
  z-index: 100;
}

.nav-profile:hover .profile-dropdown { opacity: 1; visibility: visible; transform: translateY(5px); }

.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.profile-dropdown a:hover { background: rgba(108,92,231,0.1); color: var(--text-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Main Content */
#main-content {
  padding-top: var(--nav-height);
  min-height: calc(100vh - var(--nav-height));
  position: relative;
  z-index: 1;
}

/* Pages */
.page { display: none; animation: fadeIn 0.4s ease; }
.page.active-page { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Hero Section */
.hero-section {
  min-height: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 80px 20px 60px;
  position: relative;
  overflow: hidden;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 30% center, rgba(108,92,231,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content { 
  flex: 1; 
  max-width: 650px; 
  position: relative; 
  z-index: 1; 
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  margin-bottom: 15px;
  line-height: 1.1;
}

.gradient-text { background: var(--gradient-1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.hero-subtitle {
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  color: var(--text-secondary);
  margin-bottom: 25px;
  max-width: 550px;
}

.hero-actions { 
  display: flex; 
  gap: 16px; 
  justify-content: flex-start; 
  flex-wrap: wrap; 
}

.hero-stats {
  display: flex;
  gap: 20px;
  margin-top: 0;
  flex-wrap: wrap;
  justify-content: center;
  background: rgba(255,255,255,0.02);
  padding: 25px 40px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  min-width: 300px;
}

.stat-item { text-align: center; padding: 10px; flex: 1; }

.stat-number {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 1px; }

@media (max-width: 900px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    padding: 60px 20px 30px;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-stats { width: 100%; margin-top: 20px; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary { background: var(--gradient-1); color: white; }
.btn-primary:hover { opacity: 0.9; box-shadow: var(--glow); }

.btn-secondary {
  background: rgba(108,92,231,0.1);
  color: var(--accent);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: rgba(108,92,231,0.2); }

.btn-google { background: white; color: #333; }
.btn-google:hover { background: #f0f0f0; }

.btn-success { background: linear-gradient(135deg, #00b894, #00cec9); color: white; }
.btn-danger { background: linear-gradient(135deg, #d63031, #e17055); color: white; }

.btn-block { width: 100%; justify-content: center; }

.glow-btn { animation: glowPulse 3s infinite; }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 10px rgba(108,92,231,0.2); } 50% { box-shadow: 0 0 25px rgba(108,92,231,0.4); } }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}
.btn-icon:hover { background: rgba(108,92,231,0.1); color: var(--accent); }

/* Sections */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title i { background: var(--gradient-1); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }

/* Posts Grid */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.post-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: var(--glow); }

.post-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.post-card-img-placeholder {
  width: 100%;
  height: 200px;
  background: var(--gradient-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  opacity: 0.5;
}

.post-card-body { padding: 20px; }

.post-card-category {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108,92,231,0.15);
  color: var(--accent);
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-excerpt {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.post-card-meta i { margin-right: 4px; }

.post-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
}

.post-card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.post-card-author span { font-size: 0.85rem; color: var(--text-secondary); }

/* Auth Pages */
.auth-container {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-header { text-align: center; margin-bottom: 30px; }
.auth-header h2 { font-size: 1.8rem; margin-bottom: 8px; }
.auth-header p { color: var(--text-secondary); }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.form-group label i { margin-right: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="url"], textarea, .form-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 0.95rem;
  transition: all 0.3s;
  outline: none;
}

input:focus, textarea:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108,92,231,0.1); }

textarea { resize: vertical; min-height: 100px; }

.form-select { cursor: pointer; }
.form-select option { background: var(--bg-secondary); color: var(--text-primary); }

.form-row { display: flex; justify-content: flex-end; margin-bottom: 20px; }
.form-link { color: var(--accent); text-decoration: none; font-size: 0.85rem; }
.form-link:hover { text-decoration: underline; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.85rem; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-label a { color: var(--accent); }

.divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { padding: 0 15px; }

.auth-footer {
  text-align: center;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.auth-footer a { color: var(--accent); text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }

.highlight { color: var(--accent); font-weight: 600; }

/* OTP Input */
.otp-input-group {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.otp-box {
  width: 50px;
  height: 60px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  background: rgba(255,255,255,0.03);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s;
}

.otp-box:focus { border-color: var(--accent); box-shadow: 0 0 10px rgba(108,92,231,0.2); }

/* Blog Controls */
.blog-controls { display: flex; gap: 12px; flex-wrap: wrap; }

.search-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0 16px;
  gap: 10px;
}

.search-box i { color: var(--text-secondary); }
.search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  padding: 10px 0;
  width: 200px;
  outline: none;
  font-family: var(--font);
}

/* Post Detail */
.post-detail-container {
  max-width: 800px;
  margin: 40px auto;
}

.post-detail-header { margin-bottom: 30px; }
.post-detail-category { display: inline-block; padding: 4px 12px; background: rgba(108,92,231,0.15); color: var(--accent); border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 15px; }
.post-detail-title { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 900; line-height: 1.2; margin-bottom: 15px; }
.post-detail-meta { display: flex; align-items: center; gap: 20px; color: var(--text-secondary); font-size: 0.9rem; flex-wrap: wrap; }
.post-detail-meta .author-info { display: flex; align-items: center; gap: 10px; }
.post-detail-meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.post-detail-image { width: 100%; max-height: 400px; object-fit: cover; border-radius: var(--radius); margin: 20px 0; }
.post-detail-content { font-size: 1.05rem; line-height: 1.8; color: var(--text-primary); }
.post-detail-content h1, .post-detail-content h2, .post-detail-content h3 { margin: 30px 0 15px; }
.post-detail-content p { margin-bottom: 20px; }
.post-detail-content img { max-width: 100%; border-radius: var(--radius-sm); margin: 20px 0; }
.post-detail-content code { background: rgba(108,92,231,0.1); padding: 2px 8px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.9em; }
.post-detail-content pre { background: rgba(0,0,0,0.3); padding: 20px; border-radius: var(--radius-sm); overflow-x: auto; margin: 20px 0; border: 1px solid var(--border); }
.post-detail-content pre code { background: none; padding: 0; }
.post-detail-content blockquote { border-left: 3px solid var(--accent); padding-left: 20px; margin: 20px 0; color: var(--text-secondary); }
.post-detail-content a { color: var(--accent); }
.post-detail-content ul, .post-detail-content ol { padding-left: 20px; margin-bottom: 20px; }
.post-detail-content li { margin-bottom: 8px; }

.post-tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.post-tag { padding: 4px 12px; background: rgba(108,92,231,0.1); border-radius: 50px; font-size: 0.8rem; color: var(--accent); }

.post-actions-bar {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 50px;
  transition: all 0.3s;
}

.action-btn:hover { background: rgba(108,92,231,0.1); color: var(--accent); }
.action-btn.liked { color: var(--accent3); }
.action-btn.liked i { font-weight: 900; }

/* Comments Section */
.comments-section { margin-top: 30px; }
.comments-section h3 { margin-bottom: 20px; }

.comment {
  display: flex;
  gap: 15px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.comment:last-child { border-bottom: none; }

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

.comment-body { flex: 1; }

.comment-author { font-weight: 600; font-size: 0.9rem; }
.comment-time { font-size: 0.75rem; color: var(--text-secondary); margin-left: 10px; }
.comment-text { margin-top: 5px; font-size: 0.95rem; color: var(--text-secondary); }
.comment-actions { margin-top: 8px; display: flex; gap: 15px; }
.comment-actions button { background: none; border: none; color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: color 0.2s; }
.comment-actions button:hover { color: var(--accent); }

.comment-form { display: flex; gap: 15px; margin-top: 20px; }
.comment-form textarea {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  resize: none;
  outline: none;
  min-height: 60px;
}

/* Create Post */
.create-post-form {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
}

.editor-toolbar {
  display: flex;
  gap: 5px;
  padding: 10px 0;
  flex-wrap: wrap;
}

.editor-toolbar button {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.editor-toolbar button:hover { background: rgba(108,92,231,0.1); color: var(--accent); }

.file-upload { position: relative; }
.file-upload input[type="file"] { position: absolute; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.file-upload-label { display: flex; align-items: center; gap: 10px; padding: 20px; border: 2px dashed var(--border); border-radius: var(--radius-sm); text-align: center; justify-content: center; color: var(--text-secondary); transition: all 0.3s; cursor: pointer; }
.file-upload:hover .file-upload-label { border-color: var(--accent); color: var(--accent); }

.cover-preview { max-width: 100%; max-height: 200px; margin-top: 10px; border-radius: var(--radius-sm); }

/* Chat */
.chat-page {
  display: flex;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height) - 100px);
}

.chat-container {
  width: 100%;
  max-width: 800px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height) - 120px);
  max-height: 700px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.chat-header-info { display: flex; align-items: center; gap: 12px; }
.chat-header-info h3 { font-size: 1.1rem; }
.chat-header-info p { font-size: 0.8rem; color: var(--text-secondary); }

.chat-avatar {
  width: 44px;
  height: 44px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message { display: flex; flex-direction: column; }
.message.user { align-items: flex-end; }
.message.bot { align-items: flex-start; }

.message-content {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.message.user .message-content { flex-direction: row-reverse; }

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
  background: var(--gradient-1);
}

.message.user .message-avatar { background: var(--gradient-2); }

.message-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.message.bot .message-bubble {
  background: rgba(108,92,231,0.1);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message.user .message-bubble {
  background: var(--gradient-1);
  color: white;
  border-bottom-right-radius: 4px;
}

.message-bubble p { margin-bottom: 8px; }
.message-bubble p:last-child { margin-bottom: 0; }
.message-bubble code { background: rgba(0,0,0,0.2); padding: 1px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; }
.message-bubble pre { background: rgba(0,0,0,0.3); padding: 16px; border-radius: var(--radius-sm); overflow-x: auto; margin: 10px 0; }
.message-bubble pre code { background: none; padding: 0; }

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid var(--border);
}

.chat-input-area textarea {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-primary);
  font-family: var(--font);
  resize: none;
  outline: none;
  min-height: 20px;
  max-height: 120px;
}

.chat-input-area textarea:focus { border-color: var(--accent); }

.btn-send {
  width: 48px;
  height: 48px;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
}

.thinking-dots { display: flex; gap: 4px; padding: 8px 0; }
.thinking-dots span {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}
.thinking-dots span:nth-child(1) { animation-delay: -0.32s; }
.thinking-dots span:nth-child(2) { animation-delay: -0.16s; }
.thinking-dots span:nth-child(3) { animation-delay: 0s; }
@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s;
}

.stat-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.stat-icon {
  font-size: 2.2rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(108,92,231,0.1);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.stat-info { flex: 1; }

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Profile */
.profile-card {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px;
}

.profile-avatar-section {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}

.profile-avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
}

.profile-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.profile-avatar-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid var(--bg-primary);
  transition: all 0.3s;
}

.profile-avatar-overlay:hover { transform: scale(1.1); }

/* Admin */
.admin-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.admin-tab {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 50px;
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.9rem;
  white-space: nowrap;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tab:hover { background: rgba(108,92,231,0.1); color: var(--text-primary); }
.admin-tab.active { background: var(--gradient-1); color: white; border-color: transparent; }

.admin-panel { display: block; }
.admin-toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.admin-table-container { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--border);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:hover td { background: rgba(108,92,231,0.03); }
.admin-table .actions { display: flex; gap: 8px; }
.admin-table .actions button { background: none; border: none; color: var(--text-secondary); cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: all 0.2s; }
.admin-table .actions button:hover { background: rgba(108,92,231,0.1); color: var(--accent); }
.admin-table .actions .delete-btn:hover { color: #d63031; background: rgba(214,48,49,0.1); }

.admin-user-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; margin-right: 8px; vertical-align: middle; }

/* Generated Preview */
.generated-preview {
  padding: 20px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  margin: 15px 0;
  max-height: 400px;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.generated-preview h1, .generated-preview h2, .generated-preview h3 { margin: 20px 0 10px; }
.generated-preview p { margin-bottom: 15px; }

/* Static Pages */
.static-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px;
}

.static-page h1 { font-size: 2rem; margin-bottom: 20px; }
.static-page h2 { font-size: 1.4rem; margin: 30px 0 15px; color: var(--accent); }
.static-page p { margin-bottom: 15px; line-height: 1.8; color: var(--text-secondary); }
.static-page ul { padding-left: 20px; margin-bottom: 20px; }
.static-page li { margin-bottom: 10px; color: var(--text-secondary); }
.static-page li i { margin-right: 10px; color: var(--accent); }

.contact-info { margin: 20px 0; }
.contact-info p { margin-bottom: 10px; }
.contact-info i { width: 24px; color: var(--accent); }

/* Loading */
.loading-spinner {
  text-align: center;
  padding: 60px;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.loading-spinner i { margin-right: 10px; }

/* Toast Messages */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 400px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

.toast.success { background: rgba(0,184,148,0.9); color: white; }
.toast.error { background: rgba(214,48,49,0.9); color: white; }
.toast.info { background: rgba(108,92,231,0.9); color: white; }

@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.toast.removing { animation: slideOut 0.3s ease forwards; }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* Footer */
.footer {
  background: rgba(10, 10, 26, 0.9);
  border-top: 1px solid var(--border);
  padding: 40px 20px 20px;
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-brand .brand-icon { font-size: 1.5rem; }
.footer-brand .brand-text { font-size: 1.2rem; font-weight: 800; }
.footer-brand p { color: var(--text-secondary); margin-top: 10px; font-size: 0.85rem; }

.footer-links h4, .footer-contact h4 { font-size: 0.9rem; margin-bottom: 15px; color: var(--text-primary); }
.footer-links a {
  display: block;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 8px;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent); }
.footer-contact p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 8px; }
.footer-contact i { margin-right: 8px; color: var(--accent); }

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 10, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
  }
  .nav-menu.active { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav-auth { display: flex; flex-direction: column; gap: 10px; width: 100%; }
  .nav-auth .nav-link { width: 100%; justify-content: center; }
  .nav-profile { width: 100%; }
  .profile-trigger { width: 100%; justify-content: center; }
  .profile-dropdown { position: static; opacity: 1; visibility: visible; transform: none; display: none; border: none; padding: 0; }
  .nav-profile:hover .profile-dropdown { display: block; }

  .hero-stats { gap: 20px; }
  .posts-grid { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .search-box input { width: 100%; }
  .blog-controls { flex-direction: column; }
  .chat-container { height: calc(100vh - var(--nav-height) - 80px); border-radius: 0; }
  .auth-card { padding: 24px; }
  .admin-tabs { flex-wrap: nowrap; }
  .static-page { padding: 24px; }
  .profile-card { padding: 24px; }
  .create-post-form { padding: 20px; }
  .post-detail-content { font-size: 1rem; }
  .comment-form { flex-direction: column; }
  .otp-box { width: 42px; height: 52px; font-size: 1.3rem; }
  .message-content { max-width: 95%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .otp-input-group { gap: 8px; }
  .otp-box { width: 38px; height: 46px; font-size: 1.1rem; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* New Elements Styling */
.ad-banner-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  justify-content: center;
}

.ad-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: var(--radius-sm);
}

.job-alerts-banner {
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.1));
  border: 1px solid var(--border);
}

.stat-card.glass-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

.stat-card.glass-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

/* ==========================================================================
   SOCIAL MEDIA & CONTENT MANAGEMENT PANEL STYLES
   ========================================================================== */

.social-nav-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.social-nav-btn {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.social-nav-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.social-nav-btn.active {
  background: var(--gradient-1);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow);
}

/* Accounts Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.account-card {
  padding: 20px;
  border-radius: var(--radius);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.account-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.account-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
}

.account-badge.fb { background: rgba(24, 119, 242, 0.2); color: #1877F2; border: 1px solid rgba(24, 119, 242, 0.4); }
.account-badge.blogger { background: rgba(255, 87, 34, 0.2); color: #FF5722; border: 1px solid rgba(255, 87, 34, 0.4); }
.account-badge.yt { background: rgba(255, 0, 0, 0.2); color: #FF0000; border: 1px solid rgba(255, 0, 0, 0.4); }

.account-details {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pages-list-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.page-chip {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.empty-state {
  text-align: center;
  padding: 30px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 2.5rem;
  margin-bottom: 10px;
  opacity: 0.7;
}

/* Modal styling */
.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: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 550px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 25px 30px;
  border-radius: var(--radius);
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.modal-header h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.fb-color { color: #1877F2; }
.blogger-color { color: #FF5722; }
.yt-color { color: #FF0000; }

/* Multi YouTube Video Cards */
.yt-video-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.yt-video-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.yt-video-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 0, 0, 0.15);
  border: 1px solid rgba(255, 0, 0, 0.3);
  color: #FF0000;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.yt-video-info {
  flex: 1;
}

.yt-video-filename {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.yt-status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.yt-status-badge.ready { background: rgba(0, 206, 201, 0.2); color: #00cec9; }
.yt-status-badge.uploading { background: rgba(243, 156, 18, 0.2); color: #f39c12; }
.yt-status-badge.done { background: rgba(46, 204, 113, 0.2); color: #2ecc71; }
.yt-status-badge.failed { background: rgba(231, 76, 60, 0.2); color: #e74c3c; }

.progress-bar-container {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient-1);
  transition: width 0.3s ease;
}

/* Queue Cards */
.queue-card {
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.queue-status-pill {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

.queue-status-pill.scheduled { background: rgba(0, 206, 201, 0.2); color: #00cec9; border: 1px solid rgba(0, 206, 201, 0.4); }
.queue-status-pill.published { background: rgba(46, 204, 113, 0.2); color: #2ecc71; border: 1px solid rgba(46, 204, 113, 0.4); }
.queue-status-pill.failed { background: rgba(231, 76, 60, 0.2); color: #e74c3c; border: 1px solid rgba(231, 76, 60, 0.4); }
.queue-status-pill.publishing { background: rgba(243, 156, 18, 0.2); color: #f39c12; border: 1px solid rgba(243, 156, 18, 0.4); }

.queue-title {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.queue-content-snippet {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.queue-media-thumbnail img {
  max-width: 150px;
  max-height: 100px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.queue-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.queue-meta {
  display: flex;
  gap: 15px;
}

.queue-actions {
  display: flex;
  gap: 8px;
}

/* Social Panel Accounts Grid & Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 15px;
  margin-bottom: 25px;
  min-height: 80px;
}

.account-card {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(108,92,231,0.2);
}

.account-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pages-list-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.page-chip {
  font-size: 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 12px;
  color: var(--text-secondary);
}

.page-chip.blogger {
  background: rgba(255,87,34,0.1);
  color: #FF5722;
  border-color: rgba(255,87,34,0.3);
}

.social-nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  overflow-x: auto;
}

.social-nav-btn {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  transition: all 0.3s;
}

.social-nav-btn:hover, .social-nav-btn.active {
  background: var(--gradient-1);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(108,92,231,0.4);
}

/* Modal Overlay & Dialog Styles */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(10, 10, 26, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  z-index: 100000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-card {
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(18, 18, 38, 0.95) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: var(--radius, 16px) !important;
  padding: 30px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(108, 92, 231, 0.3) !important;
  animation: modalFadeIn 0.3s ease;
  position: relative;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
}

