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

/* Variables */
:root {
  --primary-color: #007AFF;
  --secondary-color: #5856D6;
  --success-color: #34C759;
  --error-color: #FF3B30;
  --text-primary: #000000;
  --text-secondary: #8E8E93;
  --background: #FFFFFF;
  --card-background: #F2F2F7;
  --border-radius: 16px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #FFFFFF;
    --text-secondary: #8E8E93;
    --background: #000000;
    --card-background: #1C1C1E;
  }
}

/* Base */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Container */
.container {
  max-width: 600px;
  width: 100%;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

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

/* Loading */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--card-background);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* App Icon */
.app-icon {
  margin-bottom: 30px;
}

.app-icon img {
  width: 100px;
  height: 100px;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

/* Thumbnail */
.thumbnail-container {
  margin-bottom: 30px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card-background);
}

.thumbnail {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  display: block;
}

/* Typography */
.title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.stat {
  background: var(--card-background);
  padding: 15px 25px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
}

.stat-icon {
  font-size: 1.5rem;
}

.stat-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  max-width: 400px;
}

.button:active {
  transform: scale(0.98);
}

.button.primary {
  background: var(--primary-color);
  color: white;
}

.button.primary:hover {
  background: #0051D5;
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3);
}

.button.secondary {
  background: var(--card-background);
  color: var(--text-primary);
}

.button.secondary:hover {
  background: var(--text-secondary);
  color: white;
}

.button-icon {
  font-size: 1.3rem;
}

/* CTA */
.cta {
  margin-bottom: 40px;
}

.cta-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Links */
.link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

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

/* Error */
.error .error-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.error h1 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--error-color);
}

.error p {
  margin-bottom: 30px;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  padding-top: 40px;
  border-top: 1px solid var(--card-background);
  margin-top: 40px;
}

.footer p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .title {
    font-size: 1.5rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .stats {
    flex-direction: column;
  }

  .stat {
    width: 100%;
  }

  .button {
    font-size: 0.95rem;
    padding: 14px 24px;
  }
}

/* Icons */
.icon {
  display: inline-block;
  font-size: 3rem;
  margin-bottom: 20px;
}
