.page {
  --gray-rgb: 0, 0, 0;
  --gray-alpha-200: rgba(var(--gray-rgb), 0.08);
  --gray-alpha-100: rgba(var(--gray-rgb), 0.05);

  --button-primary-hover: #383838;
  --button-secondary-hover: #f2f2f2;

  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  min-height: 100svh;
  padding: 40px;
  gap: 40px;
  font-synthesis: none;
  font-family: var(--font-geist-sans);
}

@media (prefers-color-scheme: dark) {
  .page {
    --gray-rgb: 255, 255, 255;
    --gray-alpha-200: rgba(var(--gray-rgb), 0.145);
    --gray-alpha-100: rgba(var(--gray-rgb), 0.06);

    --button-primary-hover: #ccc;
    --button-secondary-hover: #1a1a1a;
  }
}

/* Header Styles */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 40px;
}

.title {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(to right, #000, #555);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

@media (prefers-color-scheme: dark) {
  .title {
    background: linear-gradient(to right, #fff, #aaa);
    -webkit-background-clip: text;
    background-clip: text;
  }
}

.subtitle {
  font-size: 18px;
  color: var(--foreground);
  opacity: 0.8;
  max-width: 600px;
  margin: 0;
}

/* Main Content Styles */
.main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--gray-alpha-200);
  margin-bottom: 24px;
}

.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: transparent;
  border: none;
  font-family: var(--font-geist-sans);
  font-size: 16px;
  font-weight: 500;
  color: var(--foreground);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab:hover {
  opacity: 0.9;
}

.activeTab {
  border-bottom: 2px solid white;
  opacity: 1;
}

/* Tab Content */
.tabContent {
  width: 100%;
}

/* Demo Tab */
.demoContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.demoWrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.swipeDemo {
  width: 100%;
  max-width: 400px;
  padding: 24px;
  border-radius: 16px;
  background-color: var(--gray-alpha-100);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
}

.swipeButton {
  max-width: 100%;
}

.successMessage {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: rgba(0, 200, 83, 0.1);
  color: #00c853;
  font-size: 14px;
  font-weight: 500;
}

.errorMessage {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  background-color: rgba(255, 59, 48, 0.1);
  color: #ff3b30;
  font-size: 14px;
  font-weight: 500;
}

.resetButton {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 0;
  right: 0;
  background: transparent;
  border-radius: 100%;
  width: 30px;
  height: 30px;
  transition: all .2s ease;
}

.resetButton:hover {
  transform: scale(1.1);
  cursor: pointer;
}

.demoDescription {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.demoDescription h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
}

.demoDescription p {
  font-size: 16px;
  line-height: 1.6;
  opacity: 0.8;
  margin: 0;
}

.featureList {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 8px 0 0 0;
}

.featureList li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.featureList li svg {
  color: #00c853;
}

/* Customize Tab */
.customizeContainer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.customizeOptions {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.customizeOptions h2 {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 8px 0;
}

.optionGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.optionGroup label {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
}

.themeSelector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.themeButton {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--gray-alpha-200);
  background: transparent;
  font-family: var(--font-geist-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activeTheme {
  background-color: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

.toggleGroup {
  display: flex;
  gap: 8px;
}

.toggleButton {
  flex: 1;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--gray-alpha-200);
  background: transparent;
  font-family: var(--font-geist-sans);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activeToggle {
  background-color: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

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

/* Code Tab */
.codeContainer {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.codeContainer h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.codeBlock {
  position: relative;
  background-color: var(--gray-alpha-100);
  border-radius: 8px;
  padding: 16px;
  overflow: auto;
  font-family: var(--font-geist-mono);
  font-size: 14px;
}

.codeBlock pre {
  margin: 0;
  white-space: pre-wrap;
}

.copyButton {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--gray-alpha-200);
  border: none;
  font-family: var(--font-geist-sans);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copyButton:hover {
  background-color: var(--gray-alpha-100);
}

.propsTable {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.propRow {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 16px;
  padding: 12px;
  border-radius: 8px;
  background-color: var(--gray-alpha-100);
}

.propName {
  font-family: var(--font-geist-mono);
  font-weight: 600;
  font-size: 14px;
}

.propType {
  font-family: var(--font-geist-mono);
  font-size: 14px;
  opacity: 0.7;
}

.propDesc {
  font-size: 14px;
}

/* Footer */
.footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 24px 0;
  border-top: 1px solid var(--gray-alpha-200);
  margin-top: 40px;
}

.footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Theme Variants */
.default .swipeButton {
  --sw-height: 56px;
  --sw-slider-width: 56px;
}

.default :global(.swipe-button__root) {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.1);
  color: #000000;
}

.default :global(.swipe-button__overlay) {
  background-color: #000000;
  color: white;
}

.default :global(.swipe-button__slider) {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  .default :global(.swipe-button__root) {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .default :global(.swipe-button__overlay) {
    background-color: #ffffff;
    color: #000000;
  }

  .default :global(.swipe-button__slider) {
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
}

.blue .swipeButton {
  --sw-height: 56px;
  --sw-slider-width: 56px;
}

.blue :global(.swipe-button__root) {
  background-color: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.3);
  color: #007aff;
}

.blue :global(.swipe-button__overlay) {
  background-color: #007aff;
  color: white;
}

.blue :global(.swipe-button__slider) {
  background-color: #007aff;
  color: white;
}

.green .swipeButton {
  --sw-height: 56px;
  --sw-slider-width: 56px;
}

.green :global(.swipe-button__root) {
  background-color: rgba(52, 199, 89, 0.1);
  border-color: rgba(52, 199, 89, 0.3);
  color: #34c759;
}

.green :global(.swipe-button__overlay) {
  background-color: #34c759;
  color: white;
}

.green :global(.swipe-button__slider) {
  background-color: #34c759;
  color: white;
}

.purple .swipeButton {
  --sw-height: 56px;
  --sw-slider-width: 56px;
}

.purple :global(.swipe-button__root) {
  background-color: rgba(175, 82, 222, 0.1);
  border-color: rgba(175, 82, 222, 0.3);
  color: #af52de;
}

.purple :global(.swipe-button__overlay) {
  background-color: #af52de;
  color: white;
}

.purple :global(.swipe-button__slider) {
  background-color: #af52de;
  color: white;
}

.reverseIcon {
  transform: rotate(180deg);
}

/* Responsive Styles */
@media (max-width: 900px) {
  .demoContainer,
  .customizeContainer {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .customizePreview {
    order: -1;
  }
}

@media (max-width: 600px) {
  .page {
    padding: 24px;
    gap: 32px;
  }

  .header {
    padding-top: 20px;
  }

  .title {
    font-size: 32px;
  }

  .subtitle {
    font-size: 16px;
  }

  .ctas {
    flex-direction: column;
    width: 100%;
  }

  .featureList {
    grid-template-columns: 1fr;
  }

  .propRow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
}
