/**
 * DREAM Exchange - Mobile Menu Styles
 * ハンバーガーメニュー（スマホ用）
 */

/* ==================== ハンバーガーボタン ==================== */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  cursor: pointer;
  z-index: 1060;
  transition: all 0.3s ease;
}

.mobile-menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #FFFFFF;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn span:nth-child(1) {
  margin-bottom: 5px;
}

.mobile-menu-btn span:nth-child(3) {
  margin-top: 5px;
}

/* ハンバーガーボタン アクティブ状態（X印） */
.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==================== オーバーレイ ==================== */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
}

/* ==================== サイドメニュー ==================== */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: linear-gradient(180deg, #0A0E27 0%, #0F1433 100%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1050;
  overflow-y: auto;
  transition: right 0.3s ease;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
  right: 0;
}

/* ==================== メニューヘッダー ==================== */
.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #DAA520 0%, #FFD700 50%, #FFED4E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mobile-menu-close {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-close:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.4);
  color: #FF6B6B;
}

/* ==================== ユーザー情報 ==================== */
.mobile-menu-user {
  padding: 20px;
  background: rgba(0, 229, 204, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-user-email {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  word-break: break-all;
}

.mobile-menu-user-balance {
  margin-top: 8px;
  font-size: 18px;
  font-weight: 700;
  color: #00E5CC;
}

/* ==================== メニューリスト ==================== */
.mobile-menu-list {
  list-style: none;
  padding: 16px 0;
  margin: 0;
}

.mobile-menu-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.mobile-menu-link:hover,
.mobile-menu-link.active {
  background: rgba(0, 229, 204, 0.1);
  color: #00E5CC;
}

.mobile-menu-link.active {
  border-left: 3px solid #00E5CC;
  padding-left: 17px;
}

.mobile-menu-icon {
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
}

/* ==================== ログアウトボタン ==================== */
.mobile-menu-logout {
  margin: 16px 20px;
  padding: 14px 20px;
  background: rgba(255, 107, 53, 0.15);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 10px;
  color: #FF6B35;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-menu-logout:hover {
  background: rgba(255, 107, 53, 0.25);
}

/* ==================== フッター ==================== */
.mobile-menu-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.mobile-menu-footer-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
}

/* ==================== レスポンシブ ==================== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
  }

  /* PC用のユーザーメニューを非表示 */
  .header .user-menu .user-email,
  .header .user-menu .btn-logout {
    display: none;
  }
}

@media (min-width: 769px) {
  .mobile-menu,
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* ==================== アニメーション ==================== */
@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* body固定（メニュー開いている時） */
body.mobile-menu-open {
  overflow: hidden;
}
