/* Open Chat Website Styles */

:root {
  /* Light theme (matching Open Chat app) */
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(224, 71.4%, 4.1%);
  --primary: hsl(169, 100%, 37%); /* #00BF9C - Open Chat brand color */
  --primary-foreground: hsl(210, 20%, 98%);
  --secondary: hsl(220, 14.3%, 95.9%);
  --secondary-foreground: hsl(220.9, 39.3%, 11%);
  --muted: hsl(220, 14.3%, 95.9%);
  --muted-foreground: hsl(220, 8.9%, 46.1%);
  --accent: hsl(169, 100%, 37%);
  --border: hsl(220, 13%, 91%);
  --card: hsl(0, 0%, 100%);
  --gradient-start: hsl(169, 100%, 37%);
  --gradient-end: hsl(259, 100%, 65%);
  --glass: hsla(0, 0%, 100%, 0.8);
  --shadow: hsla(220, 43%, 11%, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Dark theme (matching Open Chat app) */
    --background: hsl(222, 84%, 4.9%);
    --foreground: hsl(210, 20%, 98%);
    --primary: hsl(169, 100%, 37%);
    --primary-foreground: hsl(220.9, 39.3%, 11%);
    --secondary: hsl(220, 43%, 7%);
    --secondary-foreground: hsl(210, 20%, 98%);
    --muted: hsl(220, 43%, 7%);
    --muted-foreground: hsl(215, 20.2%, 65.1%);
    --accent: hsl(169, 100%, 37%);
    --border: hsl(217.2, 32.6%, 17.5%);
    --card: hsl(220, 13%, 8%);
    --glass: hsla(220, 13%, 8%, 0.8);
    --shadow: hsla(222, 84%, 4.9%, 0.3);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Roboto', sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* Hero Section */
.hero {
  position: relative;
  text-align: center;
  padding: 6rem 0 4rem;
  flex: 0 0 auto;
  overflow: hidden;
  width: 100%;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, hsla(169, 100%, 37%, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 80%, hsla(259, 100%, 65%, 0.1) 0%, transparent 50%),
              linear-gradient(to bottom, transparent 0%, transparent 70%, var(--background) 100%);
  z-index: -1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent 0%, var(--background) 100%);
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

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

.logo-container {
  position: relative;
  margin-bottom: 2rem;
  animation: logoFloat 6s ease-in-out infinite;
}

.logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, hsla(169, 100%, 37%, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
  z-index: -1;
}

.logo {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  box-shadow: 
    0 10px 30px var(--shadow),
    0 0 60px hsla(169, 100%, 37%, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover {
  transform: scale(1.05);
  box-shadow: 
    0 20px 40px var(--shadow),
    0 0 80px hsla(169, 100%, 37%, 0.3);
}

.title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 3s ease-in-out infinite;
}

.subtitle {
  font-size: 1.5rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.description {
  font-size: 1.1rem;
  color: var(--foreground);
  max-width: 600px;
  margin: 0 auto 2rem;
  opacity: 0.9;
  line-height: 1.7;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--foreground);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--shadow);
  border-color: var(--primary);
}

.badge-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-icon svg {
  width: 20px;
  height: 20px;
  color: var(--primary);
  transition: color 0.3s ease;
}

/* Downloads Section */
.downloads {
  padding: 4rem 0;
  flex: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.downloads-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.downloads-subtitle {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

@media (max-width: 900px) {
  .download-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .download-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
}

.download-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--shadow);
  border-color: var(--primary);
}

.download-card:hover::before {
  opacity: 1;
}

.platform-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  filter: grayscale(0.3);
  transition: filter 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 40px;
}

.platform-icon svg {
  width: 32px;
  height: 32px;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.download-card:hover .platform-icon {
  filter: none;
}

.download-card:hover .platform-icon svg {
  color: var(--primary);
}

.download-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--foreground);
}

.download-card p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.download-btn {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-shadow: 0 2px 8px hsla(169, 100%, 37%, 0.2);
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsla(169, 100%, 37%, 0.3);
}

.download-btn:active {
  transform: scale(0.98);
}

.download-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.download-btn.coming-soon {
  background: linear-gradient(135deg, #6b7280, #9ca3af);
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

.download-btn.coming-soon:hover {
  transform: none;
  box-shadow: none;
}

.coming-soon-card {
  opacity: 0.7;
}

.coming-soon-card .platform-icon svg {
  color: var(--muted-foreground);
}

.coming-soon-card:hover .platform-icon svg {
  color: var(--muted-foreground);
}

.coming-soon-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--shadow);
  border-color: var(--border);
}

.btn-loader {
  display: none;
}

.download-btn.loading .btn-text {
  display: none;
}

.download-btn.loading .btn-loader {
  display: inline;
}

.download-info {
  margin-top: 0.75rem;
}

.download-info small {
  color: var(--muted-foreground);
  font-size: 0.8rem;
}

.release-info {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
}

.release-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  max-width: 400px;
  width: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.release-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px var(--shadow);
  border-color: var(--primary);
}

.release-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.badge-label {
  font-size: 0.9rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.badge-version {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 8px hsla(169, 100%, 37%, 0.3);
}

.release-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.release-date {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-weight: 500;
}

.view-changelog {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.view-changelog:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px hsla(169, 100%, 37%, 0.3);
}

.view-changelog svg {
  transition: transform 0.2s ease;
}

.view-changelog:hover svg {
  transform: translateX(2px);
}

/* Features Section */
.features {
  padding: 4rem 0;
  background: var(--muted);
  border-radius: 32px;
  margin: 2rem 0;
  position: relative;
}

.features h2 {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--foreground);
}

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

.feature {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  filter: grayscale(0.2);
}

.feature h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.feature p {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Footer */
.site-footer {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 4rem 0 2rem;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
  max-width: 1200px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

.footer-section h3.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-section h4.footer-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.footer-description {
  color: var(--muted-foreground);
  line-height: 1.6;
  margin-bottom: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted-foreground);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  width: fit-content;
}

.footer-link:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-link svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.footer-link:hover svg {
  opacity: 1;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
}

.copyright {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  margin: 0;
}

/* Animations */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

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

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 4rem 0 2rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .title {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.25rem;
  }
  
  .hero-features {
    gap: 0.75rem;
  }
  
  .feature-badge {
    font-size: 0.85rem;
    padding: 0.6rem 0.8rem;
  }
  
  .downloads-title,
  .features h2 {
    font-size: 2rem;
  }
  
  .downloads-subtitle {
    font-size: 1rem;
  }
  
  .download-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .release-card {
    padding: 1.5rem;
  }
  
  .release-meta {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
    padding: 0 1rem;
  }
  
  .footer-bottom {
    padding: 2rem 1rem 0;
  }
  
  .footer-links {
    align-items: center;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .features {
    margin: 1rem -1rem;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .logo {
    width: 100px;
    height: 100px;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .download-card {
    padding: 1.25rem 1rem;
  }
  
  .platform-icon {
    font-size: 1.75rem;
  }
}

/* Loading animations */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

/* Privacy Policy Styles */
.privacy-content {
  padding: 4rem 0;
  flex: 1;
}

.content-card {
  background: var(--glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 3rem;
  max-width: 800px;
  margin: 0 auto;
  box-shadow: 0 8px 32px var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px var(--shadow);
  border-color: var(--primary);
}

.content-card h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--foreground);
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--foreground);
  line-height: 1.7;
  margin-bottom: 2rem;
  font-weight: 500;
  background: var(--muted);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.content-card p {
  color: var(--foreground);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.policy-section {
  margin-bottom: 2.5rem;
}

.policy-section h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
  position: relative;
  padding-bottom: 0.5rem;
}

.policy-section h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 2px;
}

.policy-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
}

.policy-link:hover {
  border-bottom-color: var(--primary);
  transform: translateY(-1px);
}

.policy-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.last-updated {
  color: var(--muted-foreground);
  font-size: 0.9rem;
  font-style: italic;
  margin: 0;
}

@media (max-width: 768px) {
  .content-card {
    padding: 2rem 1.5rem;
    margin: 0 1rem;
  }
  
  .content-card h2 {
    font-size: 1.75rem;
  }
  
  .policy-section h3 {
    font-size: 1.25rem;
  }
  
  .intro-text {
    font-size: 1rem;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .privacy-content {
    padding: 2rem 0;
  }
  
  .content-card {
    padding: 1.5rem 1rem;
    margin: 0 0.5rem;
  }
  
  .content-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .intro-text {
    padding: 1rem;
  }
  
  .policy-section {
    margin-bottom: 2rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline-offset: 4px;
}