* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Aptos', sans-serif;
  color: #5f6368;
  background-color: #f8f9fa;
  height: 100%;
}

body.home-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header Styles */
header {
  background: white;
  padding: 6px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 0 rgba(0,0,0,0.12);
}

header .left {
  flex: 1;
}

header .logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

header .header-logo {
  height: 40px;
  width: auto;
}

header .right {
  flex: 1;
  text-align: right;
}

.nav__items {
  list-style: none;
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav__items__item {
  display: inline-block;
}

.nav__items__item a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  line-height: 1;
}

.nav__items__item.button a {
  color: #1f73e6;
  border: 1px solid transparent;
  background-color: transparent;
}

.nav__items__item.button a:hover {
  background-color: #f1f3f4;
}

.nav__items__item.button.filled a {
  background-color: #1f73e6;
  color: white;
  border: 1px solid #1f73e6;
}

.nav__items__item.button.filled a:hover {
  background-color: #1c63d2;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Main Content */
main {
  flex: 1;
  padding: 30px 40px;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 40px;
}

.hero .hero-logo-img {
  width: 200px;
  height: auto;
  margin: 0 auto 20px;
  display: block;
}

.hero h1 {
  font-size: 32px;
  font-weight: 300;
  color: #202124;
  letter-spacing: -0.5px;
  margin: 0;
}

.hero .unsupported {
  display: none;
}

/* Downloads Section */
.downloads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto 40px;
}

.platform {
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
}

.platform h2 {
  font-size: 24px;
  font-weight: 400;
  color: #202124;
  margin-bottom: 20px;
}

.platform h3 {
  font-size: 18px;
  font-weight: 400;
  color: #202124;
  margin: 16px 0;
}

.variants {
  display: flex;
  flex-direction: column;
}

.variant_pwa {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.variant_pwa .platform-icon {
  margin-bottom: 16px;
}

.platform__mobile .variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.platform__mobile .variant {
  margin-bottom: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.variant div:last-child {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.platform-icon {
  margin-bottom: 12px;
}

.platform-icon svg {
  width: 68px;
  height: 68px;
  display: inline-block;
}

.platform-logo {
  width: 60px;
  height: 60px;
  display: inline-block;
  object-fit: contain;
}

.platform-logo__desktop {
  width: 100px;
  height: 100px;
  display: inline-block;
  object-fit: contain;
}

.android-icon,
.ios-icon {
  width: 48px;
  height: 48px;
}

/* Button Styles */
.button {
  display: inline-block;
  margin-bottom: 16px;
}

.button.filled {
  background-color: #1f73e6;
  border-radius: 4px;
}

.button.filled.in-content {
  display: block;
  text-align: center;
  margin-bottom: 24px;
}

.button.filled a {
  display: inline-block;
  color: white;
  text-decoration: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.button.filled a:hover {
  background-color: #1c63d2;
}

.button.in-content a {
  display: block;
  padding: 14px 24px;
  font-size: 14px;
}

.download-button {
  background-color: #1f73e6;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: block;
  width: 100%;
  text-align: center;
}

.download-button:hover {
  background-color: #1c63d2;
}

.download-button:active {
  transform: scale(0.98);
}

/* Variant Styles */
.variant p {
  font-size: 14px;
  color: #5f6368;
  line-height: 1.5;
  margin: 16px 0 0 0;
}

.variant a img {
  height: 40px;
  width: auto;
  display: inline-block;
  transition: transform 0.2s ease;
}

.variant a:hover img {
  transform: scale(1.05);
}

.store-badge {
  height: 56px !important;
  width: auto;
  display: inline-block;
  transition: transform 0.2s ease;
}

.store-badge:hover {
  transform: scale(1.05);
}

.variant_ios .store-badge {
  height: 40px !important;
}

/* Footer Section */
.footer {
  text-align: center;
  padding: 60px 40px;
  background: white;
  border-top: 1px solid #dadce0;
}

.footer h4 {
  font-size: 18px;
  font-weight: 400;
  color: #202124;
  margin-bottom: 24px;
}

.footer .button.filled a {
  padding: 14px 28px;
  font-size: 15px;
}

.grey-mask {
  display: none;
}

.unsupported_mobile {
  display: none;
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #d33b27;
}

/* Download Component Styles */
.download-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.version-info {
  font-size: 12px;
  color: #5f6368;
  margin-top: 8px;
}

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
}

.loading-spinner p {
  font-size: 14px;
  color: #5f6368;
  margin: 0;
}

.spinner {
  border: 3px solid #f0f0f0;
  border-top: 3px solid #1f73e6;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  padding: 12px 16px;
  background-color: #fce8e6;
  border: 1px solid #f1b3af;
  border-radius: 4px;
  color: #c5221f;
  font-size: 14px;
  text-align: center;
  margin-top: 8px;
}

.hidden {
  display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    padding: 12px 20px;
  }

  main {
    padding: 40px 20px;
  }

  .downloads {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .platform {
    padding: 24px;
  }

  .platform__mobile .variants {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 24px;
  }

  .nav__items {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
  }

  .nav__items__item a {
    padding: 10px 12px;
    font-size: 12px;
  }

  .unsupported_mobile {
    display: block;
  }

  .unsupported {
    display: none !important;
  }

  .supported {
    display: block;
  }
}

@media (max-width: 480px) {
  header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  header .right {
    width: 100%;
    text-align: right;
  }

  main {
    padding: 30px 16px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .platform {
    padding: 20px;
  }

  .platform h2 {
    font-size: 20px;
    margin-bottom: 20px;
  }

  .downloads {
    gap: 16px;
  }

  .footer {
    padding: 40px 16px;
  }

  .footer h4 {
    font-size: 16px;
  }
}
