/* 認証関連のスタイル */

.auth-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(245, 245, 247, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow-y: auto;
  padding: 20px 0;
}

.auth-box {
  background-color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xl);
  max-width: 800px;
  width: 90%;
  text-align: center;
  animation: authFadeIn 0.5s ease forwards;
  border: 1px solid var(--color-border);
  margin: 20px auto;
  overflow-y: auto;
  max-height: 90vh;
}

.auth-box img.logo {
  width: 120px;
  height: auto;
  margin-bottom: var(--space-lg);
}

.auth-box h2 {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

.auth-box p {
  margin-bottom: var(--space-lg);
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-domain {
  font-weight: bold;
  color: var(--color-primary);
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.google-login-button {
  background-color: white;
  color: #444;
  border: 1px solid #ddd;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.google-login-button:hover {
  background-color: #f8f8f8;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.google-login-button img {
  width: 20px;
  height: 20px;
  margin-right: 12px;
}

.auth-status {
  margin-top: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
  background-color: rgba(255, 59, 48, 0.1);
  color: var(--color-danger);
  display: none;
}

.auth-status.show {
  display: block;
  animation: statusFadeIn 0.3s ease forwards;
}

.user-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: rgba(0, 113, 227, 0.05);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-name {
  font-weight: 500;
  color: var(--color-text);
  flex: 1;
  text-align: left;
}

.user-email {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  display: block;
}

.logout-button {
  background-color: transparent;
  color: var(--color-danger);
  border: 1px solid var(--color-danger);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.logout-button:hover {
  background-color: rgba(255, 59, 48, 0.05);
}

.auth-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 113, 227, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-primary);
  animation: spin 1s linear infinite;
  margin-right: 10px;
}

/* 利用可能なデータ年度の注釈 */
.data-years-note {
  font-size: 11px;
  color: #999;
  margin-top: 8px;
  font-style: italic;
  text-align: center;
  opacity: 0.8;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes statusFadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .auth-box {
    padding: var(--space-lg);
    width: 95%;
    max-width: 95%;
  }
  
  .google-login-button {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

/* 使い方セクション */
.auth-usage {
  background-color: rgba(0, 113, 227, 0.08);
  border-radius: 8px;
  padding: 15px;
  margin: 15px 0;
  text-align: left;
}

.auth-usage h3 {
  margin-top: 0;
  color: var(--color-primary);
  font-size: 16px;
  margin-bottom: 8px;
}

.auth-usage ul {
  margin: 0;
  padding-left: 20px;
}

.auth-usage li {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.4;
}

/* スクリーンショットエリア */
.auth-screenshots {
  margin: 25px 0;
}

.screenshot-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.screenshot {
  width: 80%;
  max-width: 450px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.screenshot:hover {
  transform: scale(1.02);
}

.screenshot img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #ddd;
}

.screenshot p {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

/* モーダル画像表示 */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.image-modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
}

.modal-caption {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 10px;
  font-size: 16px;
}

/* モバイル対応 */
@media (max-width: 768px) {
  .screenshot-container {
    flex-direction: column;
    align-items: center;
  }
  
  .screenshot {
    width: 90%;
    max-width: 320px;
    margin-bottom: 5px;
  }
}

/* Google のログインボタン（Sign in with Google が中身を描く） */
.google-login-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
