/* Base styles */
:root {
  --primary-color: #FF4500; /* Reddit Orange */
  --secondary-color: #ef4444; /* Red 500 */
  --accent-color: #f97316; /* Orange 500 */
  --text-color: #171717; /* Neutral 900 */
  --light-color: #FFFFFF;
  --dark-color: #171717; /* Neutral 900 */
  --gray-color: #f9fafb; /* Gray 50 */
  --medium-gray: #737373; /* Neutral 500 */
  --light-gray: #f3f4f6; /* Gray 100 */
  --border-color: #e5e7eb; /* Gray 200 */
  --light-bg: #f9fafb; /* Gray 50 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05); /* Shadow SM */
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); /* Shadow MD */
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); /* Shadow LG */
  --rounded-xl: 0.75rem; /* Rounded XL */
  --rounded-full: 9999px; /* Rounded Full */
  --transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --gradient: linear-gradient(to right, #f97316, #ef4444, #f97316);
}

*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--border-color);
}

html, body {
  height: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  tab-size: 4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
  margin: 0;
  line-height: inherit;
  color: var(--text-color);
  background-color: var(--light-bg);
}

a {
  color: inherit;
  text-decoration: inherit;
}

img, svg {
  display: block;
  max-width: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

/* Utility classes */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* Page Container */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Positioning */
.relative { position: relative; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-50 { z-index: 50; }

/* Display and Layout */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }

/* Spacing */
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.space-x-2 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0.5rem;
}
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

/* Sizing */
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-8 { height: 2rem; }
.h-14 { height: 3.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-8 { width: 2rem; }
.w-full { width: 100%; }
.max-w-2xl { max-width: 42rem; }
.min-h-screen { min-height: 100vh; }
.min-h-\[calc\(100vh-3\.5rem\)\] { min-height: calc(100vh - 3.5rem); }

/* Backgrounds */
.bg-white { background-color: rgb(255 255 255); }
.bg-gray-50 { background-color: rgb(249 250 251); }
.bg-gray-100 { background-color: rgb(243 244 246); }
.bg-neutral-900 { background-color: rgb(23 23 23); }

/* Typography */
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.leading-relaxed { line-height: 1.625; }
.tracking-tight { letter-spacing: -0.025em; }
.text-white { color: rgb(255, 255, 255); }
.text-neutral-500 { color: rgb(115, 115, 115); }
.text-neutral-600 { color: rgb(82, 82, 82); }
.text-neutral-900 { color: rgb(23, 23, 23); }
.text-\[\#FF4500\] { color: rgb(255, 69, 0); }

/* Effects */
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }

/* Navbar */
.navbar {
  background-color: var(--light-color);
  box-shadow: var(--shadow-sm);
}

.navbar a, .navbar button {
  border: none !important;
  outline: none !important;
}

.brand-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.brand-suffix {
  font-size: 1.25rem;
  color: var(--medium-gray);
}

.icon {
  vertical-align: middle;
}

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 0;
  background-color: var(--gray-color);
  flex: 1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.25rem;
  color: var(--medium-gray);
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 1.125rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.cta-button:hover {
  background-color: #E03D00;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.cta-button .icon {
  transition: transform 0.3s ease;
}

.cta-button:hover .icon {
  transform: translateX(4px);
}

/* Action Button */
.action-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--dark-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--rounded-full);
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
}

.action-button:hover {
  background-color: #262626; /* Neutral 800 */
}

/* Gradient Text Effect */
.gradient-text {
  background: var(--gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient 4s linear infinite;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Line clamp */
.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* Hover States */
.hover\:bg-neutral-800:hover {
  background-color: rgb(38 38 38);
}

.hover\:bg-gray-100:hover {
  background-color: rgb(243 244 246);
}

.nav-button.primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--rounded-full);
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  outline: none;
}

.nav-button.primary:hover {
  background-color: #FF5722;
}

/* Features Section */
.features-section {
  background-color: var(--light-color);
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--dark-color);
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 1rem auto 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: var(--border-radius);
  background-color: var(--off-white);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background-color: rgba(255, 69, 0, 0.1);
  border-radius: 50%;
  color: var(--primary-color);
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.feature h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

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

.post-card {
  background-color: var(--light-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.post-content {
  padding: 1.5rem;
}

.post-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.post-meta {
  font-size: 0.85rem;
  color: var(--medium-gray);
  display: flex;
  justify-content: space-between;
}

/* Loader */
.loader {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-message {
  text-align: center;
  margin-top: 1rem;
  color: var(--medium-gray);
}

/* Footer */
.site-footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding: 1.5rem 0;
  text-align: center;
  margin-top: auto;
}

/* Media queries */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section {
    padding: 4rem 0;
  }
  
  .features-section {
    padding: 3rem 0;
  }
}

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