/* ==========================================
   Auth Section
   ========================================== */

.auth-section {
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  margin-bottom: 20px;
}

.auth-section h3 {
  font-size: 20px;
  margin-bottom: 15px;
  color: #333;
}

.auth-section p {
  font-size: 15px;
  color: #666;
  margin-bottom: 25px;
}

.google-signin-container {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

.auth-status {
  background: #e8f5e9;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.auth-status p {
  margin: 0;
  font-size: 14px;
}

.btn-logout {
  background: #f44336;
  color: white;
  padding: 8px 16px;
  font-size: 12px;
}

.btn-logout:hover {
  background: #d32f2f;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

/* Access Denied Box */
.error-box {
  background: #ffebee;
  border: 2px solid #f44336;
  border-radius: 12px;
  padding: 40px 30px;
  text-align: center;
}

.error-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.error-box h3 {
  color: #d32f2f;
  font-size: 22px;
  margin-bottom: 10px;
}

.error-box p {
  color: #c62828;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 25px;
}

/* ==========================================
   Base
   ========================================== */

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

html {
  min-width: 320px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 24px;
  color: #333;
}

.container {
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   Header
   ========================================== */

.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
  position: relative;
}

.back-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  text-decoration: none;
  font-size: 16px;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background-color 0.3s;
}

.back-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.header h1 {
  font-size: 32px;
  margin-bottom: 8px;
  font-weight: 700;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

/* ==========================================
   Form Selector
   ========================================== */

.form-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 40px 20px;
}

@media (max-width: 600px) {
  .form-selector {
    grid-template-columns: 1fr;
  }
}

.form-card {
  background: white;
  border: 2px solid #f0f0f0;
  border-radius: 12px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-card:hover {
  border-color: #667eea;
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
  transform: translateY(-4px);
}

.form-icon {
  font-size: 48px;
  margin-bottom: 15px;
}

.form-card h2 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #333;
}

.form-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* ==========================================
   Form Container
   ========================================== */

.form-container {
  padding: 32px;
}

/* ==========================================
   Form Groups
   ========================================== */

form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 20px;
}

.form-group {
  min-width: 0;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-group input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 2px solid #f0f0f0;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  background-color: #f9f9ff;
}

.form-group small {
  display: block;
  margin-top: 6px;
  color: #999;
  font-size: 12px;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  text-align: center;
}

.btn-large {
  width: 100%;
  padding: 14px 24px;
  font-size: 18px;
}

form .auth-status,
form .btn-large,
form .message,
form input[type="hidden"] {
  grid-column: 1 / -1;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 87, 108, 0.4);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================
   Messages
   ========================================== */

.message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  font-size: 14px;
  animation: slideIn 0.3s ease-out;
  line-height: 1.5;
}

.message strong,
.message span {
  display: block;
}

.message strong {
  font-size: 15px;
  margin-bottom: 4px;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.loading {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #b8daff;
}

.result-card {
  max-width: 560px;
  margin: 8px auto 0;
  padding: 40px 28px;
  border-radius: 14px;
  text-align: center;
  border: 1px solid #e8e8ef;
  background: #fff;
  box-shadow: 0 14px 38px rgba(36, 39, 56, 0.12);
  animation: slideIn 0.35s ease-out;
}

.result-icon {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 38px;
  font-weight: 800;
}

.result-card.success .result-icon {
  background: linear-gradient(135deg, #2ecc71 0%, #22a65a 100%);
}

.result-card.error .result-icon {
  background: linear-gradient(135deg, #ff6b6b 0%, #d63031 100%);
}

.result-card h2 {
  font-size: 26px;
  color: #242738;
  margin-bottom: 12px;
}

.result-card p {
  font-size: 16px;
  color: #5f6472;
  line-height: 1.7;
  margin: 0 auto 24px;
  max-width: 430px;
}

.result-card .btn {
  min-width: 180px;
}

/* ==========================================
   Info Box
   ========================================== */

.info-box {
  background: #f9f9f9;
  border-left: 4px solid #667eea;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.info-box h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: #333;
}

.info-box ul {
  list-style: none;
}

.info-box li {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
  padding-right: 20px;
}

.info-box li:last-child {
  margin-bottom: 0;
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 600px) {
  body {
    padding: 0;
    background: white;
  }

  .container {
    min-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .header h1 {
    font-size: 24px;
  }

  .header {
    padding: 52px 18px 28px;
  }

  .back-btn {
    top: 10px;
    right: 10px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .form-container {
    padding: 20px 16px 28px;
  }

  .auth-section {
    padding: 24px 18px;
  }

  form {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .auth-status {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .auth-status .btn {
    width: 100%;
  }

  .btn-large {
    font-size: 16px;
  }

  .info-box {
    margin-top: 22px;
    padding: 16px;
  }

  .result-card {
    padding: 32px 20px;
  }

  .result-card h2 {
    font-size: 22px;
  }

  .result-card p {
    font-size: 15px;
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  body {
    padding: 18px;
  }

  .container {
    max-width: 760px;
  }

  .form-container {
    padding: 28px;
  }
}

@media (min-width: 1200px) {
  body {
    padding: 36px;
  }

  .container {
    max-width: 980px;
  }
}
