:root {
  --bg: #0b0e1a;
  --bg-gradient: linear-gradient(180deg, #0a0c14 0%, #05070f 100%);
  --card: #151a2d;
  --card-hover: #1c2238;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --accent: #6366f1;
  --accent-purple: #8b5cf6;
  --border: rgba(255, 255, 255, 0.08);
  --pill-bg: rgba(255, 255, 255, 0.06);
  --dropdown-bg: rgba(11, 14, 26, 0.95);
  --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

.phone-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 12px;
  background: var(--bg-gradient);
}

.phone {
  width: 100%;
  max-width: 390px;
  min-height: 844px;
  background: var(--bg);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px var(--border),
    0 25px 50px -12px rgba(0, 0, 0, 0.7),
    0 0 80px -20px rgba(99, 102, 241, 0.15);
  display: flex;
  flex-direction: column;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: relative;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.3px;
}

.logo-icon {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: white;
  box-shadow: 0 3px 8px rgba(99, 102, 241, 0.4);
}

.header-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.icon-btn:hover {
  background: var(--border);
  color: var(--text);
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.header-dropdown {
  position: absolute;
  top: 50px;
  right: 16px;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 101;
}

.header-dropdown.active {
  display: flex;
}

.header-dropdown a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-dropdown a:hover {
  background: var(--pill-bg);
  color: var(--accent-purple);
}

.header-dropdown a svg {
  width: 14px;
  height: 14px;
}

.hero {
  padding: 16px 16px 16px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -50px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-decorations {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-star {
  position: absolute;
  transform-origin: center;
}

.star-1 { width: 14px; height: 14px; top: 12px; right: 80px; fill: #a78bfa; animation: twinkle 3s ease-in-out infinite alternate; }
.star-2 { width: 8px; height: 8px; top: 30px; right: 25px; fill: #c4b5fd; animation: twinkle 4s ease-in-out infinite alternate 1.2s; }
.star-3 { width: 12px; height: 12px; top: 75px; right: 40px; fill: #8b5cf6; animation: twinkle 2.5s ease-in-out infinite alternate 0.5s; }
.star-4 { width: 6px; height: 6px; top: 16px; left: 120px; fill: #c4b5fd; animation: twinkle 3.5s ease-in-out infinite alternate 2s; }
.star-5 { width: 9px; height: 9px; top: 85px; right: 100px; fill: #a78bfa; animation: twinkle 4.5s ease-in-out infinite alternate 0.8s; }

@keyframes twinkle {
  0% { transform: scale(0.6) rotate(0deg); opacity: 0.15; }
  100% { transform: scale(1.2) rotate(15deg); opacity: 1; }
}

.greeting {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
  z-index: 2;
}

.title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.4px;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  max-width: 290px;
}

.title .highlight {
  color: var(--accent-purple);
}

.subtitle {
  font-size: 10px;
  font-weight: 500;
  color: var(--accent-purple);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
  position: relative;
  z-index: 2;
  letter-spacing: 0.1px;
}

.search-wrap {
  padding: 0 16px 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--pill-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  transition: border-color 0.2s, background 0.2s;
}

.search:focus-within {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.05);
}

.search svg {
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
}

.search input::placeholder {
  color: var(--text-muted);
}

.categories-wrapper {
  position: relative;
  padding: 0 16px 16px;
}

.categories {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.categories::-webkit-scrollbar {
  display: none;
}

.cat {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  background: var(--pill-bg);
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cat svg {
  width: 12px;
  height: 12px;
  margin-top: -1px;
}

.cat.active, .cat:hover {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35);
}

.cat-wrapper {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}

.cat-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--dropdown-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: none;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 50;
}

.cat-dropdown.active {
  display: flex;
}

.cat-dropdown button {
  background: transparent;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, color 0.2s;
}

.cat-dropdown button:hover, .cat-dropdown button.active {
  background: var(--pill-bg);
  color: var(--accent-purple);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 10px;
}

.section-title {
  font-size: 14px;
  font-weight: 600;
}

.see-all {
  font-size: 11px;
  color: var(--accent-purple);
  text-decoration: none;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 2px;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 24px;
  align-content: start;
}

.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  position: relative;
}

.tool-card:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tool-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-icon svg {
  width: 18px;
  height: 18px;
  color: white;
}

.tool-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.tool-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.4;
  flex: 1;
}

.tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.tool-tag {
  font-size: 9px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--text-muted);
  border: 1px solid transparent;
}

.tool-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--pill-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}

.tool-arrow svg {
  width: 12px;
  height: 12px;
}

.tool-card:hover .tool-arrow {
  background: var(--accent);
  color: white;
}

.icon-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.icon-green  { background: linear-gradient(135deg, #059669, #34d399); }
.icon-pink   { background: linear-gradient(135deg, #db2777, #f472b6); }
.icon-orange { background: linear-gradient(135deg, #d97706, #fbbf24); }
.icon-blue   { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.icon-teal   { background: linear-gradient(135deg, #0d9488, #2dd4bf); }

@media (max-width: 430px) {
  .phone-wrapper {
    padding: 0;
    background: var(--bg);
  }
  .phone {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}
