:root {
  --gdg-blue: #4285F4;
  --gdg-blue-dark: #086aa4;
  --gdg-red: #ea4335;
  --gdg-green: #34a853;
  --gdg-yellow: #fbbc04;
  --bg-soft: #f3f8fc;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border-soft: #dce7f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
  color: var(--text-main);
  background: #f6fbff url("../Images/backgroundCHARAC.png") center / cover no-repeat fixed;
  display: flex;
  flex-direction: column;
}

.top-nav {
  background: #ffffff;
  border-bottom: 1px solid #edf2f7;
}

.nav-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo {
  height: 42px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: #4b5563;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--gdg-blue);
}

.auth-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 42px 16px;
}

.auth-shell {
  width: min(900px, 100%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(220, 231, 242, 0.95);
  border-radius: 28px;
  backdrop-filter: blur(4px);
  box-shadow: 0 14px 45px rgba(0, 52, 91, 0.12);
  padding: 28px;
  animation: rise 0.45s ease;
}

@keyframes rise {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 18px;
}

.auth-header h1 {
  margin: 0;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
}

.auth-header p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-weight: 600;
}

.auth-toggle {
  width: min(390px, 100%);
  margin: 20px auto 16px;
  padding: 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tab-btn {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #4b5563;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  padding: 11px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: linear-gradient(95deg, var(--gdg-blue), var(--gdg-blue-dark));
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 120, 191, 0.25);
}

.auth-panel {
  width: min(480px, 100%);
  margin: 0 auto;
}

.secondary-auth-panel h2 {
  margin: 0 0 6px;
  text-align: center;
  font-size: 1.35rem;
}

.helper-text {
  margin: 0 0 12px;
  color: var(--text-muted);
  text-align: center;
  font-weight: 700;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

/* ============ MEDIA QUERIES ============ */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
  .auth-shell {
    padding: 24px;
    margin: 20px;
  }

  .auth-header h1 {
    font-size: 1.8rem;
  }

  .auth-toggle {
    width: min(360px, 100%);
  }

  .tab-btn {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
}

/* Mobile - 768px and below */
@media (max-width: 768px) {
  .top-nav {
    border-bottom: 1px solid #e5e7eb;
  }

  .nav-inner {
    width: 95%;
    min-height: 60px;
    gap: 10px;
  }

  .logo {
    height: 36px;
  }

  .nav-links {
    gap: 14px;
    font-size: 0.9rem;
  }

  .auth-page {
    padding: 28px 12px;
  }

  .auth-shell {
    padding: 20px;
    border-radius: 20px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .auth-header p {
    font-size: 0.9rem;
  }

  .auth-toggle {
    width: 100%;
    margin: 16px auto 12px;
  }

  .tab-btn {
    font-size: 0.85rem;
    padding: 9px 10px;
  }

  .auth-form {
    font-size: 0.9rem;
  }
}

/* Small Mobile - 480px and below */
@media (max-width: 480px) {
  .nav-inner {
    width: 90%;
    flex-direction: column;
    min-height: auto;
    gap: 8px;
  }

  .logo {
    height: 32px;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-links a {
    font-size: 0.85rem;
  }

  .auth-page {
    padding: 16px 8px;
  }

  .auth-shell {
    padding: 16px;
    border-radius: 16px;
  }

  .auth-header h1 {
    font-size: 1.2rem;
  }

  .auth-header p {
    font-size: 0.8rem;
  }

  .auth-toggle {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
  }

  .tab-btn {
    font-size: 0.75rem;
    padding: 8px 8px;
  }

  .auth-form {
    width: min(320px, 100%);
  }
}
  /* display: flex;
  flex-direction: column;
  gap: 9px;
} */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 26px;
  height: 3px;
  background: #333;
  border-radius: 10px;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-inner {
    position: relative;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: white;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 20px 0;
    display: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-radius: 0 0 18px 18px;
    z-index: 999;
  }

  .nav-links.active {
    display: flex;
  }
}
.auth-form label {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 8px;
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  padding: 12px 14px;
  text-align: right;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form input:focus {
  border-color: var(--gdg-blue);
  box-shadow: 0 0 0 3px rgba(0, 120, 191, 0.15);
}

.password-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
}

.password-row input {
  flex: 1;
}

.toggle-visibility {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid var(--border-soft);
  background: #fff;
  color: #64748b;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-visibility:hover {
  border-color: #b6cbde;
}

.inline-row {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
  font-size: 0.92rem;
  color: #4b5563;
}

.check-wrap input {
  width: 16px;
  height: 16px;
}

.muted-link {
  color: var(--gdg-blue);
  font-weight: 700;
  text-decoration: none;
}

.muted-link:hover {
  text-decoration: underline;
}

.submit-btn {
  width: min(320px, 100%);
  align-self: center;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--gdg-blue) 0%, var(--gdg-green) 100%);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 120, 191, 0.26);
}

.auth-divider {
  margin: 6px 0 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.google-signin-btn {
  width: min(360px, 100%);
  align-self: center;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  color: #1f2937;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  padding: 11px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.google-signin-btn i {
  color: #db4437;
  font-size: 1rem;
}

.google-signin-btn:hover {
  border-color: #b6cbde;
  box-shadow: 0 8px 18px rgba(0, 52, 91, 0.12);
  transform: translateY(-1px);
}

.auth-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-btn {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-family: inherit;
  font-weight: 800;
  padding: 10px 14px;
  cursor: pointer;
}

.secondary-btn:hover {
  border-color: var(--gdg-blue);
  color: var(--gdg-blue);
}

.code-input {
  text-align: center !important;
  letter-spacing: 8px;
  font-size: 1.15rem !important;
  font-weight: 800;
  direction: ltr;
}

.form-message {
  min-height: 20px;
  margin: 6px 0 10px;
  font-size: 0.93rem;
  font-weight: 700;
}

.form-message.error {
  color: var(--gdg-red);
}

.form-message.success {
  color: var(--gdg-green);
}

.page-footer {
  background: #403f41;
  color: #e5e7eb;
  padding: 16px 0;
}

.footer-inner {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.footer-logo {
  width: 120px;
  height: auto;
}

@media (max-width: 720px) {
  .nav-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
    gap: 16px;
    font-size: 0.92rem;
  }

  .auth-shell {
    padding: 20px 14px;
    border-radius: 20px;
  }

  .inline-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }
}
