* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;
  background: #2d2d2d;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px 24px;
  max-width: 1000px;
  width: 100%;
  text-align: center;
}
h1 {
  color: #333;
  font-size: 2.5em;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #009a45 0%, #00c853 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.security-notice {
  color: #006b3c;
  font-size: 0.95em;
  margin-bottom: 20px;
  padding: 12px 18px;
  background: #e8f5e9;
  border-left: 4px solid #009a45;
  border-radius: 8px;
  text-align: left;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(0, 154, 69, 0.1);
}
p {
  color: #666;
  font-size: 1.2em;
  line-height: 1.6;
  margin-bottom: 30px;
}
.status {
  display: inline-block;
  background: #009a45;
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-weight: bold;
  margin-top: 20px;
}
form {
  margin-top: 40px;
  text-align: left;
}
textarea {
  width: 100%;
  min-height: 200px;
  padding: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1em;
  resize: vertical;
  transition: border-color 0.3s;
}
textarea:focus {
  outline: none;
  border-color: #009a45;
}
.submit-button {
  margin-top: 20px;
  text-align: center;
}
button[type='submit'] {
  background: linear-gradient(135deg, #009a45 0%, #00c853 100%);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 25px;
  font-size: 1.1em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
button[type='submit']:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 154, 69, 0.3);
}
button[type='submit']:active {
  transform: translateY(0);
}
button[type='submit']:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.submitted-content {
  margin-top: 40px;
  padding: 20px;
  background: #f3f4f6;
  border-radius: 10px;
  text-align: left;
  border-left: 4px solid #009a45;
}
.submitted-content h2 {
  color: #333;
  font-size: 1.2em;
  margin-bottom: 10px;
}
.submitted-content .content-text {
  color: #555;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}
.translated-content {
  margin-top: 20px;
  padding: 20px;
  background: #e8f5e9;
  border-radius: 10px;
  text-align: left;
  border-left: 4px solid #009a45;
}
.translated-content h2 {
  color: #333;
  font-size: 1.2em;
  margin-bottom: 10px;
}
.translated-content .content-text {
  color: #555;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}
.translations-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  .container {
    padding: 20px 10px;
  }
  .translations-container {
    grid-template-columns: 1fr;
  }
  .video-page-container {
    padding: 20px 10px;
  }
}
.translation-box {
  padding: 20px;
  background: #e8f5e9;
  border-radius: 10px;
  text-align: left;
  border-left: 4px solid #009a45;
}
.translation-box.vietnamese {
  background: #f1f8f4;
  border-left-color: #00c853;
}
.translation-box h2 {
  color: #333;
  font-size: 1.2em;
  margin-bottom: 10px;
}
.translation-box .content-text {
  color: #555;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.6;
}
ruby {
  ruby-align: center;
}
rt {
  font-size: 0.7em;
  color: #888;
}
#results-container {
  margin-top: 40px;
  width: 100%;
}
#results-container:empty {
  display: none;
}
.loading-message {
  margin-top: 40px;
  padding: 20px;
  background: #f3f4f6;
  border-radius: 10px;
  text-align: center;
  border-left: 4px solid #009a45;
}
.loading-message .loading-spinner {
  margin-right: 10px;
}
.processing-time {
  margin-top: 10px;
  padding: 8px 12px;
  background: #e5e7eb;
  border-radius: 5px;
  font-size: 0.9em;
  color: #666;
  text-align: center;
}
.processing-time strong {
  color: #333;
}
nav {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
nav a {
  color: #009a45;
  text-decoration: none;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.95em;
  transition: background-color 0.3s;
}
nav a:hover {
  background-color: #f1f8f4;
}
nav a.active {
  background-color: #009a45;
  color: white;
}
nav a.developing {
  opacity: 0.7;
  position: relative;
  cursor: not-allowed;
  pointer-events: none;
}
nav a.developing::after {
  content: '（開発中）';
  font-size: 0.75em;
  color: #f59e0b;
  margin-left: 4px;
  font-weight: normal;
}
footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid #e5e7eb;
  text-align: center;
}
footer .status {
  background: #e5e7eb;
  color: #666;
  padding: 5px 12px;
  border-radius: 12px;
  font-weight: normal;
  font-size: 0.85em;
  margin-top: 0;
}

/* ユーティリティクラス */
.hidden {
  display: none;
}
.text-center {
  text-align: center;
}
.text-muted {
  color: #666;
}
.text-small {
  font-size: 0.9em;
}
.mt-15 {
  margin-top: 15px;
}
.logout-link {
  color: #dc2626;
  text-decoration: none;
  font-size: 0.9em;
}

/* 動画ページ用クラス */
.video-page-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}
.video-section-title {
  color: #333;
  margin-bottom: 10px;
  text-align: center;
  font-size: 1.5em;
}
.video-info-box {
  background: #e8f5e9;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 15px;
  border-left: 4px solid #009a45;
}
.video-info-box p {
  color: #555;
  margin: 0;
  font-size: 0.9em;
  line-height: 1.4;
}
.video-upload-section {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 12px 15px;
  margin-bottom: 15px;
  text-align: center;
}
.video-button-primary {
  background: linear-gradient(135deg, #009a45 0%, #00c853 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.video-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 154, 69, 0.3);
}
.video-button-primary:active {
  transform: translateY(0);
}
.video-button-secondary {
  background: #6b7280;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  margin-left: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.video-button-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(107, 114, 128, 0.3);
}
.video-button-secondary:active {
  transform: translateY(0);
}
.video-button-small {
  background: linear-gradient(135deg, #009a45 0%, #00c853 100%);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9em;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 15px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.video-button-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 154, 69, 0.3);
}
.video-button-small:active {
  transform: translateY(0);
}
.video-uploaded-file-name {
  color: #666;
  margin-top: 10px;
  font-size: 0.9em;
}
.video-two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 15px;
}
.video-column {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.video-column-left {
  align-items: center;
}
.video-column-right {
  align-items: stretch;
}
.video-player-wrapper {
  width: 100%;
  max-width: 640px;
  max-height: 400px;
  border-radius: 8px;
  background: #000;
  margin-bottom: 15px;
}
.video-player {
  width: 100%;
  border-radius: 8px;
  background: #000;
}
.video-button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.video-transcription-section {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 15px;
  display: flex;
  flex-direction: column;
}
.video-transcription-title {
  color: #333;
  margin-bottom: 10px;
  font-size: 1em;
  text-align: center;
}
.video-transcription-list {
  max-height: 500px;
  overflow-y: auto;
  background: white;
  border-radius: 8px;
  padding: 10px;
  flex: 1;
}
.video-transcription-result {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.video-loading {
  display: none;
  text-align: center;
  padding: 20px;
}
.video-loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 154, 69, 0.3);
  border-radius: 50%;
  border-top-color: #009a45;
  animation: spin 1s linear infinite;
}
.video-loading-text {
  color: #555;
  margin-top: 10px;
}
.video-segment {
  padding: 10px;
  margin-bottom: 8px;
  border-left: 3px solid #009a45;
  background: #f9f9f9;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}
.video-segment:hover {
  background-color: #f0f0f0;
}
.video-segment-time {
  color: #009a45;
  font-weight: bold;
  margin-right: 10px;
  text-decoration: underline;
}
.video-segment-text {
  color: #333;
}
.video-empty-message {
  color: #666;
  text-align: center;
  padding: 20px;
}
.video-error-message {
  background: #fee;
  color: #c33;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  border-left: 4px solid #c33;
}
.video-success-message {
  background: #e8f5e9;
  color: #009a45;
  padding: 10px;
  border-radius: 8px;
  margin-top: 10px;
  border-left: 4px solid #009a45;
  text-align: center;
}
.video-screenshot {
  max-width: 100%;
  border-radius: 4px;
  margin-top: 8px;
  display: block;
}
.video-info-section {
  display: none;
  background: #e8f5e9;
  border-radius: 10px;
  padding: 12px;
  border-left: 4px solid #009a45;
  margin-bottom: 15px;
}
.video-info-section h3 {
  color: #333;
  margin-bottom: 8px;
  font-size: 1em;
}
.video-info-section p {
  color: #555;
  margin: 0;
  font-size: 0.9em;
}

/* フォーム関連クラス */
.form-container {
  max-width: 400px;
  margin: 0 auto;
}
.form-title {
  text-align: center;
  margin-bottom: 30px;
}
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  margin-bottom: 10px;
  font-weight: bold;
  color: #333;
}
.form-label-small {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}
.form-input {
  width: 100%;
  padding: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1em;
}
.form-input-file {
  width: 100%;
  padding: 10px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1em;
}
.form-help-text {
  margin-top: 8px;
  color: #666;
  font-size: 0.9em;
}
.form-help-text-right {
  margin-top: 8px;
  text-align: right;
  color: #666;
  font-size: 0.9em;
}
.form-section {
  margin-top: 20px;
  text-align: left;
}
.radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}
.radio-label input[type="radio"],
.radio-label input[type="checkbox"] {
  margin-right: 8px;
}
.radio-label:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}
.error-message {
  margin-bottom: 20px;
  padding: 12px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  color: #dc2626;
}
.image-responsive {
  max-width: 80%;
}
.info-box {
  margin-top: 20px;
  text-align: left;
  padding: 15px;
  background: #f3f4f6;
  border-radius: 8px;
}
.mt-20 {
  margin-top: 20px;
}

/* レスポンシブ対応: 小さい画面では1カラムに */
@media (max-width: 1024px) {
  .video-two-column {
    grid-template-columns: 1fr;
  }
}

