/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #a855f7;
  --primary-dark: #9333ea;
  --primary-light: #c084fc;
  --primary-glow: rgba(168, 85, 247, 0.4);
  --secondary-color: #7c3aed;
  --text-color: #f1f1f1;
  --text-muted: #a1a1aa;
  --text-light: #71717a;
  --bg-color: #0a0a0a;
  --bg-card: #18181b;
  --bg-elevated: #1f1f23;
  --bg-hover: #27272a;
  --border-color: #27272a;
  --border-light: #3f3f46;
  --success-color: #22c55e;
  --error-color: #ef4444;
  --warning-color: #f59e0b;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(168, 85, 247, 0.15);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --transition: all 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.navbar {
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.nav-brand a {
  text-decoration: none;
}

.nav-brand h1:hover {
  color: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 4px;
  border-radius: 0.25rem;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
  text-align: center;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-light);
}

.btn-outline:hover {
  background-color: var(--bg-hover);
  border-color: var(--primary-color);
  color: var(--primary-light);
}

.btn-outline:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-danger {
  background-color: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background-color: #dc2626;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-card) 100%);
  color: white;
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  animation: fadeInUp 0.6s ease-out;
  position: relative;
}

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

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2.5rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.6s ease-out 0.2s both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease-out 0.4s both;
}

.hero-actions .btn {
  min-width: 160px;
}

/* Sections */
.posts-section,
.tiers-section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: -0.02em;
}

.section-description {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

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

.post-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-color);
  min-height: 450px;
}

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

.post-card:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.post-image-link {
  display: block;
  width: 100%;
  overflow: hidden;
}

.post-image,
.post-image-container {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.post-card:hover .post-image {
  transform: scale(1.05);
}

.post-locked .post-image {
  filter: blur(3px);
  opacity: 0.7;
}

.post-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.post-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  z-index: 1;
}

.post-image-title-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-image-type-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.post-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 200px;
}

.post-locked {
  position: relative;
}

.post-image-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
}

.lock-icon {
  font-size: 2.5rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 3;
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3rem;
  letter-spacing: -0.01em;
}

.post-title-link {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition);
}

.post-title-link:hover {
  color: var(--primary-light);
}

.post-date {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  display: block;
}

.post-tier-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.post-content {
  color: var(--text-muted);
  line-height: 1.8;
}

.post-content p {
  margin-bottom: 1rem;
}

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

.post-content a:hover {
  text-decoration: underline;
}

.post-preview {
  color: var(--text-muted);
  margin: 0.75rem 0 0 0;
  flex: 1;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}

.post-preview p {
  margin: 0 0 0.5rem 0;
}

.read-more {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.5rem;
  transition: var(--transition);
  font-size: 0.9rem;
}

.read-more:hover {
  color: var(--primary-color);
}

/* Tiers Grid */
.tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 2rem;
}

.tier-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tier-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
  transform: translateY(-4px);
}

.tier-card:focus-within {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.tier-card.tier-current {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.tier-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.tier-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.tier-card:hover .tier-image {
  transform: scale(1.05);
}

.tier-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  z-index: 1;
}

.tier-image-name-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.tier-image-badge-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.tier-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tier-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.tier-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.tier-badge {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.7rem;
  font-weight: 600;
}

.tier-description {
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
  line-height: 1.6;
  font-size: 0.95rem;
}

.tier-benefits {
  margin-bottom: 1rem;
  flex: 1;
  overflow-y: auto;
  max-height: 180px;
  padding-right: 0.5rem;
}

.tier-benefits::-webkit-scrollbar {
  width: 4px;
}

.tier-benefits::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

.tier-benefits ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tier-benefits li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.tier-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-weight: 700;
  font-size: 1rem;
}

.tier-status {
  color: var(--success-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

.tier-image-small {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-top: 1rem;
}

/* Dashboard */
.dashboard-container {
  padding: 2rem 0;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.dashboard-section {
  margin-bottom: 3rem;
}

.dashboard-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.account-details {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.detail-item {
  padding: 1rem;
  background-color: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
}

.detail-item strong {
  color: var(--primary-light);
  margin-right: 0.5rem;
}

.subscription-info {
  text-align: center;
}

.no-subscription,
.no-packages {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.package-item {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--bg-elevated);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.package-item:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.package-icon {
  font-size: 2rem;
}

.package-content {
  flex: 1;
}

.package-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.package-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* Admin Panel */
.admin-container {
  padding: 2rem 0;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.admin-tab-btn {
  padding: 1rem 2rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}

.admin-tab-btn:hover {
  color: var(--text-color);
}

.admin-tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-color);
}

.admin-tab-content {
  display: none;
}

.admin-tab-content.active {
  display: block;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.admin-item:hover {
  border-color: var(--border-light);
  background-color: var(--bg-elevated);
}

.admin-item-content {
  flex: 1;
}

.admin-item-content h4 {
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.admin-item-actions {
  display: flex;
  gap: 0.5rem;
}

/* Auth */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-color);
  padding: 2rem;
  position: relative;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(168, 85, 247, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.auth-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 450px;
  position: relative;
}

.auth-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text-color);
}

.tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary-color);
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: var(--transition);
  font-family: inherit;
  background-color: var(--bg-elevated);
  color: var(--text-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
}

.form-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

.benefits-input-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.benefit-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.benefit-input-row input {
  flex: 1;
}

.benefit-input-row .btn-sm {
  flex-shrink: 0;
}

.add-benefit-btn {
  align-self: flex-start;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.auth-footer {
  margin-top: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.auth-link {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: var(--transition);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-close:hover {
  color: var(--text-color);
  background-color: var(--bg-hover);
}

.modal-content h3 {
  margin-bottom: 1.5rem;
  font-size: 1.4rem;
  color: var(--text-color);
  letter-spacing: -0.01em;
}

/* Tier Subscription Modal */
.tier-modal-image-container {
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.tier-modal-image {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.tier-modal-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.tier-modal-actions {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.tier-modal-actions .btn {
  margin-bottom: 0;
}

/* Notifications */
.notification {
  position: fixed;
  top: 1rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  background-color: var(--bg-card);
  color: var(--text-color);
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  z-index: 2000;
  transform: translateX(400px);
  opacity: 0;
  transition: var(--transition);
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-success {
  border-left: 3px solid var(--success-color);
}

.notification-error {
  border-left: 3px solid var(--error-color);
}

.notification-info {
  border-left: 3px solid var(--primary-color);
}

/* Loading Skeletons */
.skeleton {
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-elevated) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

/* Quill Editor Dark Theme */
.ql-toolbar {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  padding: 0.75rem !important;
}

.ql-toolbar .ql-stroke {
  stroke: var(--text-muted) !important;
}

.ql-toolbar .ql-fill {
  fill: var(--text-muted) !important;
}

.ql-toolbar .ql-picker {
  color: var(--text-muted) !important;
}

.ql-toolbar .ql-picker-label {
  color: var(--text-muted) !important;
}

.ql-toolbar .ql-picker-label:hover {
  color: var(--text-color) !important;
}

.ql-toolbar .ql-picker-options {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
}

.ql-toolbar .ql-picker-options .ql-picker-item {
  color: var(--text-color) !important;
}

.ql-toolbar .ql-picker-options .ql-picker-item:hover {
  background-color: var(--bg-hover) !important;
  color: var(--primary-light) !important;
}

.ql-toolbar .ql-picker-options .ql-selected {
  background-color: var(--primary-color) !important;
  color: white !important;
}

.ql-toolbar button:hover {
  background-color: var(--bg-hover) !important;
}

.ql-toolbar button.ql-active {
  background-color: var(--primary-color) !important;
}

.ql-toolbar button.ql-active .ql-stroke {
  stroke: white !important;
}

.ql-toolbar button.ql-active .ql-fill {
  fill: white !important;
}

.ql-container {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  border-radius: 0 0 var(--radius) var(--radius) !important;
  color: var(--text-color) !important;
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: 1.6 !important;
}

.ql-editor {
  background-color: var(--bg-card) !important;
  color: var(--text-color) !important;
  min-height: 200px !important;
  padding: 1rem !important;
}

.ql-editor.ql-blank::before {
  color: var(--text-light) !important;
  font-style: normal !important;
}

.ql-editor p {
  margin-bottom: 1rem !important;
}

.ql-editor h1 {
  font-size: 2rem !important;
  font-weight: 700 !important;
  margin-bottom: 1rem !important;
  color: var(--text-color) !important;
}

.ql-editor h2 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.75rem !important;
  color: var(--text-color) !important;
}

.ql-editor h3 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  margin-bottom: 0.5rem !important;
  color: var(--text-color) !important;
}

.ql-editor blockquote {
  border-left: 4px solid var(--primary-color) !important;
  margin: 1rem 0 !important;
  padding-left: 1rem !important;
  color: var(--text-muted) !important;
  font-style: italic !important;
}

.ql-editor pre {
  background-color: var(--bg-hover) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius) !important;
  padding: 1rem !important;
  margin: 1rem 0 !important;
  font-family: 'Courier New', monospace !important;
  color: var(--text-color) !important;
}

.ql-editor code {
  background-color: var(--bg-hover) !important;
  padding: 0.25rem 0.5rem !important;
  border-radius: 0.25rem !important;
  font-family: 'Courier New', monospace !important;
  color: var(--primary-light) !important;
}

.ql-editor a {
  color: var(--primary-light) !important;
  text-decoration: none !important;
}

.ql-editor a:hover {
  color: var(--primary-color) !important;
  text-decoration: underline !important;
}

.ql-editor ul,
.ql-editor ol {
  margin-bottom: 1rem !important;
  padding-left: 2rem !important;
}

.ql-editor li {
  margin-bottom: 0.5rem !important;
}

/* Post Content Styling for Quill HTML */
.post-full-body h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  line-height: 1.2;
}

.post-full-body h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
  line-height: 1.3;
}

.post-full-body h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-color);
  line-height: 1.4;
}

.post-full-body p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: var(--text-color);
}

.post-full-body blockquote {
  border-left: 4px solid var(--primary-color);
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background-color: var(--bg-elevated);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-style: italic;
}

.post-full-body pre {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  font-family: 'Courier New', monospace;
  color: var(--text-color);
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.post-full-body code {
  background-color: var(--bg-hover);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  color: var(--primary-light);
  font-size: 0.9rem;
}

.post-full-body pre code {
  background-color: transparent;
  padding: 0;
  color: var(--text-color);
}

.post-full-body ul,
.post-full-body ol {
  margin-bottom: 1.25rem;
  padding-left: 2rem;
}

.post-full-body li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  color: var(--text-color);
}

.post-full-body a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
}

.post-full-body a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.post-full-body strong {
  color: var(--text-color);
  font-weight: 600;
}

.post-full-body em {
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive adjustments for post content */
@media (max-width: 768px) {
  .post-full-body h1 {
    font-size: 2rem;
  }
  
  .post-full-body h2 {
    font-size: 1.5rem;
  }
  
  .post-full-body h3 {
    font-size: 1.25rem;
  }
  
  .post-full-body pre {
    padding: 1rem;
    font-size: 0.9rem;
  }
}

/* Quill tooltip styling */
.ql-tooltip {
  background-color: var(--bg-elevated) !important;
  border-color: var(--border-color) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  color: var(--text-color) !important;
}

.ql-tooltip input {
  background-color: var(--bg-card) !important;
  border-color: var(--border-color) !important;
  color: var(--text-color) !important;
  border-radius: var(--radius) !important;
  padding: 0.5rem !important;
}

.ql-tooltip input:focus {
  border-color: var(--primary-color) !important;
  outline: none !important;
}

.ql-tooltip .ql-action {
  background-color: var(--primary-color) !important;
  color: white !important;
  border-radius: var(--radius) !important;
}

.ql-tooltip .ql-action:hover {
  background-color: var(--primary-dark) !important;
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  min-height: 450px;
  display: flex;
  flex-direction: column;
}

.skeleton-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1;
}

.skeleton-line {
  height: 1rem;
  border-radius: 0.25rem;
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line.short {
  width: 60%;
}

.skeleton-line.medium {
  width: 80%;
}

.skeleton-line.long {
  width: 100%;
}

.skeleton-title {
  height: 1.5rem;
  width: 70%;
  margin-bottom: 0.5rem;
}

.skeleton-text {
  height: 0.875rem;
}

/* Post Page Skeleton */
.skeleton-post-page {
  max-width: 900px;
  margin: 0 auto;
}

.skeleton-banner {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg-hover) 50%, var(--bg-elevated) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  margin-bottom: 2rem;
}

.skeleton-post-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

/* Utility Classes */
.loading {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  position: relative;
}

.no-content {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

.error {
  color: var(--error-color);
  text-align: center;
  padding: 2rem;
}

.text-muted {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Post Page */
.post-page {
  padding: 2rem 0;
  min-height: 60vh;
}

.post-full {
  max-width: 900px;
  margin: 0 auto;
}

.post-banner {
  width: 100%;
  margin-bottom: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.post-banner-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}

.post-banner-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.post-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(0,0,0,0.2), rgba(0,0,0,0.6));
  z-index: 1;
}

.post-banner-type-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  color: var(--primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  z-index: 2;
}

.post-full-content {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border-color);
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.post-type {
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.post-tier-section {
  margin-bottom: 2rem;
}

.post-full-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 1rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.post-full-body {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 1.05rem;
}

.post-full-body p {
  margin-bottom: 1.5rem;
}

.post-full-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  letter-spacing: -0.01em;
}

.post-full-body h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-color);
}

.post-full-body ul,
.post-full-body ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.post-full-body li {
  margin-bottom: 0.5rem;
}

.post-full-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1.5rem 0;
}

.post-full-body a {
  color: var(--primary-light);
  text-decoration: none;
}

.post-full-body a:hover {
  text-decoration: underline;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.latest-posts-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.latest-posts-section .section-title {
  margin-bottom: 2rem;
}

.latest-posts-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.post-locked-page {
  max-width: 600px;
  margin: 4rem auto;
  text-align: center;
  padding: 3rem;
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.post-locked-page .lock-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.post-locked-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  letter-spacing: -0.02em;
}

.post-locked-page p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.post-locked-page .btn {
  margin: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 2rem 0;
  text-align: center;
  margin-top: 4rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero {
    padding: 4rem 0;
  }
  
  .hero-title {
    font-size: 2.25rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .hero-actions .btn {
    min-width: 140px;
    width: 100%;
    max-width: 300px;
  }
  
  .posts-grid,
  .tiers-grid,
  .latest-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .post-full-content {
    padding: 2rem;
  }
  
  .post-full-title {
    font-size: 1.75rem;
  }
  
  .post-banner-image,
  .post-banner-container {
    height: 250px;
  }
  
  .skeleton-banner {
    height: 250px;
  }
  
  .navbar .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .admin-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .admin-item-actions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .auth-card {
    padding: 2rem;
  }
  
  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 3rem 0;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .hero-description {
    font-size: 0.95rem;
  }
  
  .posts-section,
  .tiers-section {
    padding: 3rem 0;
  }
  
  .dashboard-card {
    padding: 1.5rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-card);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-light);
}

/* Selection */
::selection {
  background-color: rgba(168, 85, 247, 0.3);
  color: var(--text-color);
}
