* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --rakuten-red: #cc0000;
  --light-gray: #f5f5f5;
  --border-gray: #e0e0e0;
  --text-dark: #333;
  --text-light: #666;
  --success-green: #4caf50;
  --error-red: #f44336;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 450px;
}

.auth-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-header h1 {
  font-size: 24px;
  color: var(--rakuten-red);
  margin-bottom: 10px;
  font-weight: bold;
}

.auth-header p {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 600;
}

.auth-form {
  margin-bottom: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
  font-size: 14px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--border-gray);
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--rakuten-red);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

.form-group input:invalid:not(:placeholder-shown) {
  border-color: var(--error-red);
}

.error-message {
  display: block;
  color: var(--error-red);
  font-size: 12px;
  margin-top: 5px;
  min-height: 16px;
}

.success-message {
  display: block;
  color: var(--success-green);
  font-size: 12px;
  margin-top: 5px;
  min-height: 16px;
}

.password-requirements {
  background: var(--light-gray);
  border-left: 3px solid var(--rakuten-red);
  padding: 12px;
  margin-top: 10px;
  border-radius: 4px;
  font-size: 12px;
}

.password-requirements p {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.password-requirements ul {
  list-style: none;
}

.password-requirements li {
  padding: 4px 0;
  color: var(--text-light);
}

.password-requirements span {
  display: inline-block;
  width: 20px;
  text-align: center;
  margin-right: 8px;
  color: var(--error-red);
}

.btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--rakuten-red);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #b80000;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(204, 0, 0, 0.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-gray);
}

.auth-footer p {
  color: var(--text-light);
  font-size: 14px;
}

.auth-footer a {
  color: var(--rakuten-red);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.auth-footer a:hover {
  text-decoration: underline;
  color: #b80000;
}

.btn-secondary {
  background: #f5f5f5;
  color: var(--text-dark) !important;
  border: 1px solid var(--border-gray);
  text-decoration: none !important;
}

.btn-secondary:hover {
  background: #e8e8e8;
  border-color: var(--rakuten-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* レスポンシブ */
@media (max-width: 480px) {
  .auth-card {
    padding: 30px 20px;
  }

  .auth-header h1 {
    font-size: 20px;
  }

  .btn {
    padding: 14px;
    font-size: 16px;
  }
}
