/* Meishi Mekuri - 共通スタイル */

/* 基本スタイル */
body {
  font-family: "Hiragino Sans", sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}

/* ナビゲーションヘッダー */
.main-navigation {
  background: #fff;
  border-bottom: 2px solid #0087F7;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 15px 20px;
}

.nav-logo {
  font-size: 1.5em;
  font-weight: bold;
  color: #0087F7;
  margin-right: 30px;
}

.nav-links {
  display: flex;
  gap: 30px;
  flex: 1;
}

.nav-link {
  padding: 8px 16px;
  text-decoration: none;
  color: #666;
  border-radius: 6px;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
}

.nav-link:hover {
  background: #f0f8ff;
  color: #0087F7;
  text-decoration: none;
}

.nav-link.active {
  background: #0087F7;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(0, 135, 247, 0.3);
}

.nav-link.active:hover {
  background: #0066cc;
  color: #fff;
}

/* ハンバーガーメニューボタン */
.hamburger-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  z-index: 1001;
  position: relative;
  width: 44px;
  height: 44px;
}

.hamburger-menu i {
  font-size: 20px;
  color: #0087F7;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease;
}

/* デフォルト状態: ハンバーガーアイコンを表示 */
.hamburger-menu .hamburger-icon {
  opacity: 1;
}

.hamburger-menu .close-icon {
  opacity: 0;
}

/* アクティブ状態: クローズアイコンを表示 */
.hamburger-menu.active .hamburger-icon {
  opacity: 0;
}

.hamburger-menu.active .close-icon {
  opacity: 1;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .nav-container {
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
  }
  
  .nav-logo {
    margin-right: auto;
  }
  
  /* ハンバーガーボタンを表示 */
  .hamburger-menu {
    display: block;
  }
  
  /* モバイルメニューのスタイル */
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 0 20px 0;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    gap: 0;
  }
  
  /* メニューが開いた状態 */
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    padding: 20px 30px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    font-size: 1.1em;
    text-decoration: none;
    transition: all 0.3s ease;
  }
  
  .nav-link:hover {
    background: #f8f9fa;
    color: #0087F7;
    text-decoration: none;
  }
  
  .nav-link.active {
    background: #0087F7;
    color: #fff;
    font-weight: bold;
  }
  
  .nav-link.active:hover {
    background: #0066cc;
    color: #fff;
  }
  
  .nav-link i {
    margin-right: 10px;
    width: 20px;
  }
}

/* メニューが開いている時の背景オーバーレイ */
body.menu-open::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* メニューが開いている時はスクロールを無効にする */
body.menu-open {
  overflow: hidden;
}

@media (min-width: 769px) {
  /* デスクトップでは通常の表示 */
  .hamburger-menu {
    display: none;
  }
}

/* メインコンテンツエリア */
.main-content {
  padding: 0 20px;
}

/* 共通コンテナ */
.container {
  max-width: 800px;
  margin: 0 auto;
}

/* サービスタイトル */
.service-title {
  text-align: center;
  color: #333;
  font-size: 2.5em;
  margin-bottom: 0.5em;
}

/* サービス説明 */
.service-description {
  text-align: center;
  color: #666;
  margin-bottom: 2em;
  font-size: 1.1em;
  line-height: 1.6;
}

/* アップロードエリア共通スタイル */
.upload-container {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.upload-area {
  border: 2px dashed #0087F7;
  border-radius: 8px;
  background: #fff;
  min-height: 150px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  text-align: center;
}

.upload-area.dragover {
  background: #f8f9fa;
  border-color: #0066cc;
}

.upload-message {
  margin: 2em 0;
  font-size: 1.1em;
  color: #666;
}

.file-input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0; 
  left: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  pointer-events: auto;
}

/* ボタン共通スタイル */
.upload-button, .control-button {
  background-color: #0087F7;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: bold;
  padding: 15px 30px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.upload-button:hover, .control-button:hover {
  background-color: #0066cc;
}

/* エラー表示 */
.error {
  background-color: #fff3f3;
  border: 1px solid #ff9999;
  padding: 10px;
  border-radius: 4px;
  color: #e00;
  margin-top: 10px;
}

/* ローディングスピナー */
.loading-spinner {
  width: 30px;
  height: 30px;
  border: 4px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-left-color: #09f;
  animation: spin 1s linear infinite;
  margin: 10px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .service-title {
    font-size: 2em;
  }
  
  .service-description {
    font-size: 1em;
    padding: 0 15px;
  }
  
  .upload-container {
    padding: 20px;
  }
  
  .upload-button {
    width: 100%;
    padding: 12px;
  }
}