:root {
  --primary-color: #2563eb;
  --secondary-color: #0d47a1;
  --accent-color: #10b981;
  --accent-secondary: #7c3aed;
  --text-color: #1e293b;
  --light-bg: #f8fafc;
  --dark-bg: #0f172a;
  --white: #ffffff;
  --gray: #e2e8f0;
  --gray-light: #f1f5f9;
  --border-color: #cbd5e1;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--light-bg);
  color: var(--text-color);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: var(--primary-color);
}

.app-container {
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* App Header */
.app-header {
  background-color: var(--white);
  padding: 15px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.app-logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
}

.app-logo span {
  color: var(--accent-color);
}

.app-logo-icon {
  margin-right: 8px;
  font-size: 24px;
}

.menu-button {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.menu-button:active {
  background-color: var(--gray-light);
}

/* App Content */
.app-content {
  flex: 1;
  padding-bottom: 60px; /* Space for bottom nav */
}

/* Hero Section */
.hero-banner {
  padding: 30px 20px;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--accent-secondary)
  );
  color: var(--white);
  text-align: center;
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 16px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--white);
  color: var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Services Slider */
.services-slider {
  padding: 30px 0 20px;
}

.section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding: 0 20px;
}

.slider-container {
  overflow-x: auto;
  padding: 0 20px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  display: flex;
  gap: 15px;
  scroll-snap-type: x mandatory;
}

.slider-container::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.service-card {
  min-width: 280px;
  background-color: var(--white);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  padding: 20px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  height: 420px; /* 固定の高さを設定 */
}

.service-logo {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
}

.service-logo.crypto {
  background-color: var(--primary-color);
}

.service-logo.payment {
  background-color: var(--accent-color);
}

.service-logo.nft {
  background-color: var(--accent-secondary);
}

.service-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-description {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 15px;
  min-height: 60px; /* 説明文の最小の高さを設定 */
}

.service-features {
  margin-bottom: 15px;
  flex-grow: 1; /* 残りのスペースを埋める */
}

.feature-item {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  font-size: 14px;
}

.feature-icon {
  margin-right: 10px;
  color: var(--success-color);
}

.button-wrapper {
  margin-top: auto; /* 下部に配置 */
  padding-top: 15px;
}

.service-button {
  display: block;
  width: 100%;
  padding: 12px;
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  font-size: 16px;
}

.service-card:nth-child(1) .service-button {
  background-color: var(--primary-color);
}

.service-card:nth-child(2) .service-button {
  background-color: var(--accent-color);
}

.service-card:nth-child(3) .service-button {
  background-color: var(--accent-secondary);
}

/* Featured Section */
.featured-section {
  padding: 30px 20px;
  background-color: var(--gray-light);
}

.featured-tabs {
  display: flex;
  margin-bottom: 20px;
  background-color: var(--white);
  border-radius: 8px;
  padding: 5px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-button {
  flex: 1;
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.tab-button.active {
  background-color: var(--primary-color);
  color: var(--white);
}

.featured-content {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 20px;
}

.chart-container {
  width: 100%;
  height: 200px;
  margin-bottom: 20px;
  background-color: var(--gray-light);
  border-radius: 8px;
  position: relative;
}

.chart-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #64748b;
  font-size: 14px;
}

.price-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.price-amount {
  font-size: 24px;
  font-weight: 700;
}

.price-change {
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

.price-change.up {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.price-change.down {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.action-button {
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  font-size: 16px;
}

.action-button.buy {
  background-color: var(--success-color);
  color: var(--white);
}

.action-button.sell {
  background-color: var(--danger-color);
  color: var(--white);
}

/* Market News Feed */
.news-section {
  padding: 30px 20px;
}

.news-list {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.news-item {
  padding: 15px;
  border-bottom: 1px solid var(--gray);
  position: relative;
}

.news-item:last-child {
  border-bottom: none;
}

.news-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.news-tag.hot {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.news-tag.update {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.news-tag.alert {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.news-title {
  font-weight: 600;
  margin-bottom: 5px;
  line-height: 1.3;
}

.news-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
}

.news-source {
  display: flex;
  align-items: center;
}

.news-source-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 5px;
  background-color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}

.news-time {
  white-space: nowrap;
}

.news-impact {
  position: absolute;
  top: 15px;
  right: 15px;
  font-weight: 600;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 4px;
}

.news-impact.up {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.news-impact.down {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.news-impact.neutral {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
}

/* Column Section */
.column-section {
  padding: 30px 20px;
  background-color: var(--white);
}

.column-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.column-card {
  background-color: var(--white);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.column-card:active {
  transform: translateY(-2px);
}

.column-image {
  width: 100%;
  height: 120px;
  background-color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.column-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* 画像をコンテナに合わせてトリミングし、アスペクト比を維持 */
}

.column-meta {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px 0;
  font-size: 12px;
  color: #64748b;
}

.column-content {
  flex: 1;
  padding: 10px 15px 15px;
}

.column-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.column-excerpt {
  font-size: 14px;
  color: #64748b;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.column-date {
  color: #94a3b8;
}

.column-category {
  background-color: var(--gray-light);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.view-all-link {
  display: block;
  text-align: center;
  margin-top: 15px;
  color: var(--primary-color);
  font-weight: 600;
}

/* Bottom Navigation */
.bottom-nav {
  background-color: var(--white);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  color: #64748b;
}

.nav-item.active {
  color: var(--primary-color);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
}

.nav-label {
  font-size: 12px;
  font-weight: 500;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: var(--white);
  width: 80%;
  max-width: 300px;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.open {
  transform: translateX(0);
}

.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 199;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.menu-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--gray);
}

.menu-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-color);
  cursor: pointer;
}

.menu-user {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--gray);
}

.user-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--gray);
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--white);
  background-color: var(--primary-color);
}

.user-name {
  font-weight: 600;
  margin-bottom: 5px;
}

.user-email {
  font-size: 14px;
  color: #64748b;
}

.menu-items {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: var(--text-color);
}

.menu-item:active {
  background-color: var(--gray-light);
}

.menu-item-icon {
  margin-right: 15px;
  font-size: 20px;
  width: 24px;
  text-align: center;
}

.menu-footer {
  padding: 20px;
  border-top: 1px solid var(--gray);
}

.logout-button {
  display: flex;
  align-items: center;
  color: var(--danger-color);
  font-weight: 600;
}

.logout-icon {
  margin-right: 10px;
}

/* Desktop styles for column list */
@media (min-width: 768px) {
  /* 768px以上の画面幅で適用 */
  .column-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3つのカラムを均等幅で作成 */
    gap: 20px; /* カラム間のギャップを調整 */
  }

  /* 必要に応じて、カード内の要素のスタイルも調整する場合があります */
  /* 例: .column-card の高さや、テキストの表示行数など */
  .column-card {
    /* デスクトップ表示で高さを自動調整したい場合や、特定の高さを設定したい場合など */
    /* height: auto; や height: 350px; など */
  }
}
