/* Login page specific styles */

/* アラートメッセージのスタイル */
.alert {
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 14px;
}

.alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
}

.alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
}

/* ページ全体のレイアウト修正 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ヘッダーのレイアウト修正 */
header {
  width: 100%;
  flex-shrink: 0;
}

/* メインコンテンツの中央配置 */
main.container-centered {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

/* カードコンテナの幅調整 */
.container-centered .card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* 幅100%のユーティリティクラス */
.w-100 {
  width: 100% !important;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  main.container-centered {
    padding: 1rem 0.5rem;
  }

  .container-centered .card {
    max-width: 100%;
  }

  /* モバイルでのSNSボタン調整 */
  .sns-btn {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }

  /* タブレット以下のサイズでも横並びを維持 */
  .sns-login-section .row {
    display: flex;
    flex-wrap: wrap;
  }

  .sns-login-section .col-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 0.125rem;
  }
}

/* 非常に小さい画面でのみ縦並び */
@media (max-width: 480px) {
  .sns-login-section .row {
    flex-direction: column;
  }

  .sns-login-section .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 0.5rem;
    padding: 0 0.25rem;
  }
}

/* SNSボタンの基本スタイル */
.sns-btn {
  transition: all 0.3s ease;
  border: none;
  color: white;
  font-weight: 500;
  text-decoration: none;
  display: block;
  text-align: center;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
}

/* SNSログインセクション全体のスタイル */
.sns-login-section {
  margin-top: 1rem;
}

.sns-login-section .row {
  margin-bottom: 0.5rem;
  display: flex;
  flex-wrap: wrap;
}

.sns-login-section .row:last-child {
  margin-bottom: 0;
}

/* カラムクラスの確実な設定 */
.sns-login-section .col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
  padding: 0 0.25rem;
  box-sizing: border-box;
}

/* 各SNSのカラー設定 */
.discord-btn {
  background-color: #5865f2;
}

.facebook-btn {
  background-color: #1877f2;
}

.instagram-btn {
  background: linear-gradient(
    45deg,
    #f09433,
    #e6683c,
    #dc2743,
    #cc2366,
    #bc1888
  );
}

.x-btn {
  background-color: #000000;
}

.github-btn {
  background-color: #24292f;
}

.line-btn {
  background-color: #00c300;
}

/* Googleボタンのスタイル */
.google-btn {
  border: 1px solid #dadce0;
  background-color: #fff;
  color: #3c4043;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.google-btn:hover {
  background-color: #f8f9fa;
  border-color: #dadce0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  color: #3c4043;
  text-decoration: none;
}

.google-icon {
  margin-right: 8px;
  flex-shrink: 0;
}

/* SNS Login Button Hover Effects */
.sns-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  color: white;
}

.discord-btn:hover {
  background: #4752c4 !important;
}

.facebook-btn:hover {
  background: #166fe5 !important;
}

.instagram-btn:hover {
  background: linear-gradient(45deg, #e1306c, #c13584) !important;
}

.x-btn:hover {
  background: #333 !important;
}

.github-btn:hover {
  background: #1a1e22 !important;
}

.line-btn:hover {
  background: #00a300 !important;
}

/* 追加: SNSセクションの確実な横並び設定 */
.card-body .sns-login-section .row {
  display: flex !important;
  flex-wrap: wrap !important;
  margin-left: -0.25rem !important;
  margin-right: -0.25rem !important;
}

.card-body .sns-login-section .col-4 {
  flex: 0 0 33.333333% !important;
  max-width: 33.333333% !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.card-body .sns-login-section .sns-btn {
  display: block !important;
  width: 100% !important;
  margin-bottom: 0.5rem !important;
}
