:root {
  --bg-dark: #050507;
  --bg-card: rgba(30, 30, 36, 0.6);
  --ink-main: #f5f5f5;
  --ink-muted: #a7a7b6;
  --accent: #d34a3b;
  --glow: rgba(211, 74, 59, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: radial-gradient(circle at top, #2c2f3b 0%, #050507 60%);
  color: var(--ink-main);
  font-family: 'Noto Sans JP', sans-serif;
  overflow-x: hidden;
}

.bg-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 10;
}

.wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  position: relative;
  z-index: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 1s ease-out;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(24px, 5vw, 42px);
  letter-spacing: .15em;
  text-transform: uppercase;
  margin-bottom: 8px;
  background: linear-gradient(to bottom, #fff, #a7a7b6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-muted);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-img {
  height: 220px;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 14px;
  background: linear-gradient(to bottom, #30333f, #040406 70%);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .8);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-img:hover {
  transform: scale(1.02);
}

.hero-img:after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.2), transparent 70%);
}

/* Search Container */
.search-container {
  max-width: 500px;
  margin: 0 auto 40px;
  position: relative;
}

#search-input {
  width: 100%;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

#search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--glow);
  background: rgba(255, 255, 255, 0.08);
}

/* App Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin: 35px 0;
  min-height: 200px;
}

.card {
  background: linear-gradient(145deg, var(--bg-card), rgba(0, 0, 0, 0.9));
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.9);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.6s ease-out both;
}

.card:hover {
  transform: translateY(-8px);
  border-color: rgba(211, 74, 59, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 1);
}

.thumb {
  width: 100%;
  aspect-ratio: 16/10;
  border-radius: 12px;
  margin-bottom: 16px;
  background: radial-gradient(circle at 30% 0%, #3a3d4a, #1a1c24, #050507);
  overflow: hidden;
  position: relative;
}

.thumb:after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.card:hover .thumb:after {
  transform: translateX(100%);
}

.card h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  margin-bottom: 6px;
  color: #fff;
}

.card small {
  color: var(--accent);
  letter-spacing: .15em;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.card p {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 20px;
  line-height: 1.7;
  flex-grow: 1;
}

.btn {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: all 0.3s ease;
  align-self: flex-start;
}

.btn:hover {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 4px 15px var(--glow);
}

/* Tags in cards */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag {
  font-size: 9px;
  color: var(--ink-muted);
  background: rgba(255,255,255,0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

/* Footer Section */
.section {
  margin-top: 60px;
  padding: 40px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.9));
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.section-title {
  text-align: center;
  font-size: 12px;
  letter-spacing: .18em;
  color: var(--ink-muted);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.scene {
  height: 150px;
  border-radius: 12px;
  background: linear-gradient(to bottom, #2b2e38, #040406 70%);
  margin-bottom: 30px;
  position: relative;
  overflow: hidden;
}

.scene:after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  font-size: 14px;
  color: var(--ink-muted);
}

.about h3 {
  color: #e6e6f0;
  font-size: 15px;
  margin-bottom: 12px;
  font-family: 'Playfair Display', serif;
}

.contact {
  margin-top: 30px;
  text-align: right;
}

.contact a {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  text-decoration: none;
  color: #fff;
  letter-spacing: .16em;
  font-size: 12px;
  transition: all 0.3s ease;
}

.contact a span {
  color: var(--accent);
  margin-left: 8px;
}

.contact a:hover {
  border-color: var(--accent);
  background: rgba(211, 74, 59, 0.05);
  transform: translateX(5px);
}

/* Loading State */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--ink-muted);
  font-style: italic;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .about {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .wrapper {
    padding: 20px 15px 40px;
  }
}
