@import url('https://fonts.googleapis.com/css2?family=Helvetica+Neue:wght@300;400;500&display=swap');

:root {
  --bg-color: #F7F4F0;
  --text-main: #6B6560;
  --text-sub: #A8A29E;
  --card-bg: #FFFFFF;
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --card-hover-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

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

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-color);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1rem;
}

.bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #fff 0%, var(--bg-color) 100%);
  z-index: -1;
}

.gallery-container {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  animation: fade-in 0.4s ease forwards;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.gallery-header {
  text-align: center;
  position: relative;
}

.back-link {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-sub);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text-main);
}

.gallery-title {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.gallery-subtitle {
  font-size: 0.9rem;
  color: var(--text-sub);
  letter-spacing: 0.05em;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.theme-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.theme-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

.theme-preview {
  height: 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-color); /* デフォルトの背景 */
  position: relative;
  overflow: hidden;
}

/* サムネイル: Simple / Relax */
.preview-default {
  background: #F7F4F0;
}
.preview-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(#E8E4DF 30%, #B0CDD8 30% 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* サムネイル: Cigarette */
.preview-cigarette {
  background: #1a1a1a; /* タバコテーマの暗い背景イメージ */
}
.preview-cig {
  width: 140px;
  height: 12px;
  display: flex;
  align-items: center;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.cig-filter {
  width: 30px;
  height: 100%;
  background: #d4a373;
  border-radius: 2px 0 0 2px;
}
.cig-body {
  flex-grow: 1;
  height: 100%;
  background: #fefee2;
}
.cig-fire {
  width: 6px;
  height: 100%;
  background: #e63946;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px #e63946;
}

/* サムネイル: Juice */
.preview-juice {
  background: #E8F0F2;
}
.preview-glass {
  width: 50px;
  height: 80px;
  border: 3px solid rgba(255,255,255,0.9);
  border-top: none;
  border-radius: 0 0 10px 10px;
  position: relative;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  box-shadow: inset 0 -5px 10px rgba(0,0,0,0.05);
}
.preview-liquid {
  width: 100%;
  height: 60%;
  background: #FFB347; /* オレンジジュース色 */
  border-radius: 0 0 7px 7px;
}
.preview-straw {
  position: absolute;
  width: 4px;
  height: 100px;
  background: #FF6B6B;
  border-radius: 2px;
  top: -10px;
  left: 15px;
  transform: rotate(15deg);
  z-index: 2;
}

/* サムネイル: Keyboard */
.preview-keyboard {
  background: #2D2D2D;
}
.preview-keycap {
  width: 60px;
  height: 60px;
  background: #3b3b3b;
  border-radius: 8px;
  box-shadow: 
    0 5px 0 #1a1a1a,
    0 10px 10px rgba(0,0,0,0.5),
    inset 0 1px 1px rgba(255,255,255,0.1);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
.preview-keycap::after {
  content: '';
  width: 40px;
  height: 40px;
  background: #4a4a4a;
  border-radius: 5px;
  box-shadow: 
    inset 0 2px 4px rgba(255,255,255,0.05), 
    inset 0 -2px 4px rgba(0,0,0,0.3);
}

.theme-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.theme-name {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.theme-desc {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .theme-grid {
    grid-template-columns: 1fr;
  }
  .gallery-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  .back-link {
    position: relative;
    top: auto;
    transform: none;
  }
}

/* 言語切り替えトグル */
.lang-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.03);
  color: var(--text-sub);
  border: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  appearance: none;
}

.lang-toggle:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-main);
  transform: translateY(-2px);
}
