/* === Reset === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  background-color: #0d0d0d;
  backface-visibility: hidden
}

input {
  font-family: inherit;
  outline: none;
}

a {
  color: inherit;
}

/* === App Shell === */
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* === Nav === */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: #fff;
}

.logo-icon {
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .nav-inner {
    justify-content: flex-start;
  }
}

/* === Container === */
.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 680px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}

/* === Main Content === */
.main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 32px;
}

@media (min-width: 768px) {
  .main {
    padding-top: 80px;
    padding-bottom: 48px;
  }
}

/* === Hero === */
.hero {
  text-align: center;
  margin-bottom: 36px;
}

.hero .title {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .hero .title {
    font-size: 36px;
  }
}

.hero .subtitle {
  font-size: 15px;
  color: #777;
  line-height: 1.6;
}

/* === Search Box === */
.search-box {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  flex-shrink: 0;
  min-height: 0;
  height: auto;
}

@media (min-width: 768px) {
  .search-box {
    flex-direction: row;
    gap: 0;
  }
}

.search-box .input {
  height: 60px;
  padding: 0 18px;
  font-size: 16px;
  color: #fff;
  background: #1a1a1a;
  border: 1.5px solid #2a2a2a;
  border-radius: 10px;
  transition: border-color 0.2s, background 0.2s;
}

@media (min-width: 768px) {
  .search-box .input {
    flex: 1;
    border-radius: 10px 0 0 10px;
  }
}

.search-box .input::placeholder {
  color: #555;
}

.search-box .input:focus {
  border-color: #fe2c55;
  background: #1e1e1e;
}

.search-box .btn {
  height: 60px;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #fe2c55;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

@media (min-width: 768px) {
  .search-box .btn {
    border-radius: 0 10px 10px 0;
  }
}

.search-box .btn:hover {
  background: #e02a4a;
}

.search-box .btn:active {
  transform: scale(0.97);
}

/* === Hint === */
.hint {
  font-size: 13px;
  color: #555;
  text-align: center;
  margin-bottom: 32px;
}

/* === Result Card === */
.result {
  width: 100%;
  background: #151515;
  border: 1px solid #222;
  border-radius: 12px;
  overflow: hidden;
  animation: slideUp 0.25s ease;
}

.result-header {
  padding: 14px 20px;
  font-size: 14px;
  color: #4caf84;
  background: rgba(76, 175, 132, 0.06);
  border-bottom: 1px solid rgba(76, 175, 132, 0.1);
}

.result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item .label {
  font-size: 15px;
  color: #999;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 16px;
}

.result-item .actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #fe2c55;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.download-btn:hover {
  background: #e02a4a;
}

.download-btn.secondary {
  background: transparent;
  border: 1px solid #333;
  color: #999;
}

.download-btn.secondary:hover {
  border-color: #666;
  color: #ccc;
}

/* === Image Grid === */
.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 20px;
  justify-content: center;
}

.image-grid img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 768px) {
  .image-grid img {
    width: 90px;
    height: 90px;
  }
}

/* === Footer === */
.footer {
  width: 100%;
  text-align: center;
  padding: 28px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
  margin-top: auto;
}

.copyright {
  font-size: 12px;
  color: #444;
}

/* === Animations === */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
