@import url("../fonts/inter.css");

:root {
  --frame-bg: #000;
  --frame-ring: #1f2937;
  --screen-bg: #f5f0e8;
  --text-color: #2d2d2d;
  --brand: #f97316;
  --brand-deep: #ea580c;
  --font-family-base: "Inter", "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Roboto", "Poppins", "Helvetica Neue", Arial, sans-serif;
  --font-size-base: 14px;
  --control-height-base: 44px;

  --color-bg-page: #f5f0e8;
  --color-bg-glass: rgba(255, 255, 255, 0.55);
  --color-bg-glass-strong: rgba(255, 255, 255, 0.72);
  --color-text-primary: #2d2d2d;
  --color-text-secondary: #6b6b6b;
  --color-text-muted: #9a9a9a;
  --color-accent: #f97316;
  --color-accent-soft: rgba(249, 115, 22, 0.14);
  --color-border-glass: rgba(255, 255, 255, 0.65);
  --shadow-glass: 0 8px 32px rgba(45, 45, 45, 0.08);
  --shadow-soft: 0 4px 16px rgba(45, 45, 45, 0.06);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --blur-glass: 18px;

  --status-bar-image: url("../images/status-bar-black.svg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #ebe6de;
  font-family: var(--font-family-base);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
}

.ios-frame-wrapper {
  display: inline-block;
  padding: 12px;
  background: var(--frame-bg);
  border-radius: 60px;
  box-shadow: 0 0 0 2px var(--frame-ring), 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ios-screen {
  position: relative;
  width: 393px;
  height: 852px;
  border-radius: 48px;
  overflow: hidden;
  background: var(--screen-bg);
}

.status-bar {
  position: absolute;
  padding-top: 6px;
  left: 0;
  width: 100%;
  height: 54px;
  z-index: 20;
  pointer-events: none;
  background-image: var(--status-bar-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 36px;
  background: #000;
  border-radius: 999px;
  z-index: 30;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.screen-content {
  position: absolute;
  left: 0;
  right: 0;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screen-content::-webkit-scrollbar {
  display: none;
}

.top-header-shell {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  z-index: 18;
  height: auto;
}

.top-header-shell ~ .screen-content {
  top: 0;
  bottom: 0;
  padding-top: 54px;
  padding-bottom: 78px;
}

.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 82px;
  padding: 8px 6px 22px;
  background: var(--color-bg-glass-strong);
  border-top: 1px solid var(--color-border-glass);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  z-index: 16;
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
}

.tab-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-top: 2px;
  color: var(--color-text-muted);
  font-size: 10px;
  line-height: 1;
  font-weight: 500;
  cursor: pointer;
}

.tab-item.active {
  color: var(--color-accent);
}

.tab-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-icon i {
  font-size: 19px;
  line-height: 1;
}

.home-indicator {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 5px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  bottom: 8px;
  z-index: 17;
}

@media (max-width: 768px) {
  body {
    display: block;
    background: var(--screen-bg);
  }

  .ios-frame-wrapper {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
  }

  .ios-screen {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }

  .status-bar,
  .dynamic-island,
  .home-indicator {
    display: none;
  }

  .top-header-shell ~ .screen-content {
    padding-top: 0;
    padding-bottom: 64px;
  }

  .tab-bar {
    height: 64px;
    padding: 8px 4px 10px;
  }
}
