/* Base styles */
:root {
  --primary-color: #00d1ff;
  --secondary-color: #8d00ff;
  --dark-bg: #0a0e17;
  --card-bg: #131a29;
  --card-hover: #1c2438;
  --text-light: #ffffff;
  --text-dim: #a3b1cc;
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--dark-bg);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Space Background */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.stars, .twinkling, .clouds {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stars {
  background: #000 url('../assets/stars.png') repeat top center;
  z-index: -3;
}

.twinkling {
  background: transparent url('../assets/twinkling.png') repeat top center;
  z-index: -2;
  animation: move-twink-back 200s linear infinite;
}

.clouds {
  background: transparent url('../assets/clouds.png') repeat top center;
  z-index: -1;
  opacity: 0.2;
  animation: move-clouds-back 200s linear infinite;
}

@keyframes move-twink-back {
  from {background-position: 0 0;}
  to {background-position: -10000px 5000px;}
}

@keyframes move-clouds-back {
  from {background-position: 0 0;}
  to {background-position: 10000px 0;}
}

/* Main container */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
  z-index: 1;
}

/* Header styles */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;
  margin-bottom: 40px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo img {
  height: 60px;
  filter: drop-shadow(0 0 10px rgba(0, 209, 255, 0.5));
}

.logo-text {
  font-size: 1.8rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(0, 209, 255, 0.2);
}

/* Section styles */
section {
  transition: all 0.5s ease-in-out;
  opacity: 1;
  transform: translateY(0);
}

section.hidden {
  display: none;
  opacity: 0;
  transform: translateY(20px);
}

section.active {
  display: block;
}

/* Main title */
.main-title {
  text-align: center;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 0 15px rgba(0, 209, 255, 0.3);
}

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

.subtitle {
  text-align: center;
  color: var(--text-dim);
  font-size: 1.2rem;
  margin-bottom: 50px;
}

/* Services grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
  margin: 0 auto;
  max-width: 1000px;
}

/* Service card styles */
.service-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 3px;
  background: var(--gradient-primary);
  transition: all 0.4s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  background-color: var(--card-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.service-card:hover::before {
  left: 0;
}

.service-icon {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  box-shadow: 0 0 15px rgba(0, 209, 255, 0.2);
  overflow: hidden;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.service-select-btn {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.2), rgba(141, 0, 255, 0.2));
  border-radius: 20px;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.service-card:hover .service-select-btn {
  background: var(--gradient-primary);
  color: #fff;
}

/* Coming Soon Badge */
.service-coming-soon {
  position: relative;
  overflow: visible;
}

.coming-soon-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: var(--gradient-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 12px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  z-index: 2;
  transform: rotate(5deg);
  text-transform: uppercase;
}

/* Apps section styles */
.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
}

.back-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-light);
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  margin-right: 20px;
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

#service-title {
  font-size: 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Apps container */
.apps-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

/* App card styles */
.app-card {
  background-color: var(--card-bg);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.app-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 209, 255, 0.05), rgba(141, 0, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 0;
}

.app-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.app-card:hover::after {
  opacity: 1;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.app-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--primary-color);
  position: relative;
  z-index: 1;
}

.app-description {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 15px;
  position: relative;
  z-index: 1;
}

.download-count {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
}

.download-count i {
  color: var(--primary-color);
}

.release-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.85rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-style: italic;
  border-top: 1px solid rgba(141, 0, 255, 0.1);
  border-bottom: 1px solid rgba(141, 0, 255, 0.1);
  padding: 8px 0;
  width: 100%;
}

.download-btn {
  display: inline-block;
  padding: 10px 25px;
  background: var(--gradient-primary);
  border-radius: 25px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.download-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  transition: all 0.4s ease;
  z-index: -1;
}

.download-btn:hover::before {
  left: 0;
}

.coming-soon {
  opacity: 0.7;
  pointer-events: none;
}

.coming-soon .app-title::after {
  content: "COMING SOON";
  position: absolute;
  top: -15px;
  right: -15px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--primary-color);
  font-size: 0.6rem;
  padding: 3px 8px;
  border-radius: 10px;
  transform: rotate(25deg);
}

/* Footer */
footer {
  margin-top: 80px;
  text-align: center;
  padding: 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Animation for new elements */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

/* Responsive design */
@media (max-width: 768px) {
  .main-title {
    font-size: 2.5rem;
  }
  
  .services-grid,
  .apps-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }
  
  .service-card,
  .app-card {
    padding: 20px 15px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  #service-title {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .main-title {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .logo img {
    height: 40px;
  }
  
  .logo-text {
    font-size: 1.4rem;
  }
  
  .service-icon,
  .app-icon {
    width: 60px;
    height: 60px;
  }
  
  .service-card h3,
  .app-title {
    font-size: 1.2rem;
  }
  
  .services-grid,
  .apps-container {
    grid-template-columns: 1fr;
  }
}
