/* Root variables for easy theming */
:root {
  --bg: #dbeafe;           /* light blue page background */
  --card: #ffffff;         /* white card background */
  --text: #0f172a;         /* dark slate text */
  --muted: #64748b;        /* muted slate text */
  --brand: #33231d;        /* primary brand colour */
  --brand-hover: #775151;  /* darker brand colour for hover */
  --ring: #c7d2fe;         /* input focus ring */
  --radius: 24px;          /* default card radius */
  --shadow: 0 20px 40px rgba(2, 6, 23, 0.08); /* default shadow */
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

/* Navigation bar */
.topbar {
  max-width: 1200px;
  margin: 24px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  position: relative;
  z-index: 1000;
}

/* Left navigation in white area */
.left-nav {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* Hamburger menu button */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  gap: 4px;
}

.hamburger-line {
  width: 24px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.hamburger.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop navigation */
.nav.desktop-nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

/* Auth buttons in topbar */
.auth-buttons {
  display: flex;
  gap: 0;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.7);
  border-radius: 12px;
  padding: 4px;
  backdrop-filter: blur(10px);
}

.auth-btn {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.auth-btn.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
}

.auth-btn:hover:not(.active) {
  color: var(--text);
}

/* Mobile navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  z-index: 999;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav.active {
  transform: translateY(0);
}

.mobile-nav-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.mobile-nav-link {
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(30px);
}

.mobile-nav.active .mobile-nav-link {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-nav.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-nav.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

.mobile-nav-link:hover {
  color: var(--brand);
  transform: scale(1.05);
}

/* Modal styles - Bottom Sheet Design */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 24px 24px 0 0;
  max-height: 90vh;
  min-height: 60vh;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.25);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  padding: 24px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
}

/* Drag handle */
.modal-header::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.modal-close {
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--text);
}

.modal-content {
  padding: 0 24px 24px;
  color: var(--text);
  line-height: 1.6;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.modal-content h3:first-child {
  margin-top: 16px;
}

.modal-content p {
  margin-bottom: 16px;
  color: var(--muted);
}

.modal-content ul, .modal-content ol {
  margin: 16px 0;
  padding-left: 20px;
}

.modal-content li {
  margin-bottom: 8px;
  color: var(--muted);
}

.modal-content strong {
  color: var(--text);
}

.modal-content a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}

.modal-content a:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Main container and card */
.shell {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px;
}

.card {
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  min-height: 850px;
}

/* Animated background circles */
.bg-circles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(59, 130, 246, 1) 0%, rgba(59, 130, 246, 0.7) 30%, rgba(59, 130, 246, 0.1) 60%, rgba(59, 130, 246, 0) 100%);
  top: -100px;
  left: -100px;
  animation: float 8s ease-in-out infinite;
}

.circle-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(146, 64, 14, 1) 0%, rgba(146, 64, 14, 0.7) 30%, rgba(146, 64, 14, 0.1) 60%, rgba(146, 64, 14, 0) 100%);
  bottom: -50px;
  right: -50px;
  animation: float 12s ease-in-out infinite reverse;
}

@keyframes float {
  0% {
    transform: translateY(0) translateX(0) scale(1) rotate(0deg);
  }
  20% {
    transform: translateY(-40px) translateX(50px) scale(0.9) rotate(72deg);
  }
  40% {
    transform: translateY(35px) translateX(-60px) scale(1.1) rotate(144deg);
  }
  60% {
    transform: translateY(-25px) translateX(70px) scale(0.95) rotate(216deg);
  }
  80% {
    transform: translateY(55px) translateX(-40px) scale(1.05) rotate(288deg);
  }
  100% {
    transform: translateY(0) translateX(0) scale(1) rotate(360deg);
  }
}

/* Background mascot */
.mascot-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 400px;
  height: 600px;
}

.mascot {
  width: 400px;
  height: 600px;
  object-fit: contain;
  object-position: center;
}

/* Content overlay */
.content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  padding: 48px;
  min-height: 850px;
}

/* Left side */
.left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 3;
}

.left h1 {
  font-size: 40px;
  line-height: 1.1;
  margin: 0 0 16px;
  font-weight: 600;
  color: var(--text);
  min-width: 235px;
  max-width: 400px;
}

.left p {
  color: var(--muted);
  margin: 0 0 24px;
  font-size: 16px;
}

.left a {
  color: var(--brand);
  text-decoration: none;
}

.left a:hover {
  color: var(--brand-hover);
}


/* Right side (form) */
.right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 3;
}

.logo {
  height: 50px;
  margin-bottom: 32px;
}

#logoAnimation {
  width: 250px;
  height: 62px;
  margin-bottom: 32px;
}

/* Form container */
.form {
  width: 100%;
  max-width: 380px;
  display: none;
  animation: fadeIn 0.3s ease;
  min-height: 420px; /* Sabit yükseklik */
}

.form.active {
  display: block;
}

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

/* Form headers */
.form-header {
  text-align: center;
  margin-bottom: 24px;
}

.form-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 8px;
}

.form-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* Form rows for side-by-side fields */
.form-row {
  display: flex;
  gap: 12px;

}

.field.half {
  flex: 1;
}

.field {
  display: block;
  height: 5em;  
}

.label {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  font-weight: 500;
  opacity: 0;
}

input, select, textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 16px;
  outline: none;
  background: #ffffff82;
  transition: all 0.2s ease;
  font-family: inherit;
}

textarea {
  height: auto;
  padding: 14px;
  resize: vertical;
  min-height: 100px;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 40px;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Checkbox styling */
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}

.checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #e2e8f0;
  border-radius: 4px;
  position: relative;
  flex-shrink: 0;
  margin-top: 1px;
  transition: all 0.2s ease;
}

.checkbox input[type="checkbox"]:checked + .checkmark {
  background: var(--brand);
  border-color: var(--brand);
}

.checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Link buttons */
.link-btn {
  background: none;
  border: none;
  color: var(--brand);
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  padding: 0;
  font-family: inherit;
}

.link-btn:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

/* Form footer */
.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
}

/* Forgot password */
.forgot-password {
  text-align: right;
  margin-bottom: 16px;
}

.password {
  position: relative;
}

.eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  width: 32px;
  padding: 6px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.eye:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
}

.eye svg {
  width: 20px;
  height: 20px;
  fill: var(--muted);
  transition: fill 0.2s ease;
}

.eye:hover svg {
  fill: var(--text);
}

.error {
  display: block;
  color: #dc2626;
  margin-top: 6px;
  min-height: 18px;
  font-size: 13px;
}

.row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.between {
  justify-content: space-between;
}

.muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.muted:hover {
  color: var(--text);
}

.btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 24px;
  transition: all 0.2s ease;
}

.primary {
  background: var(--brand);
  color: #fff;
}

.primary:hover {
  background: var(--brand-hover);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--muted);
  font-size: 14px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* SSO buttons */
.sso {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.sso-btn {
  flex: 1;
  min-width: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s ease;
}

.sso-btn:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hide text on smaller buttons */
.sso-btn span {
  display: none;
}

/* Desktop modal adjustments */
@media (min-width: 768px) {
  .modal {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translateX(-50%) translateY(50%) translateY(100px);
    max-width: 800px;
    width: 90%;
    border-radius: 24px;
    min-height: auto;
    max-height: 80vh;
  }
  
  .modal-overlay.active .modal {
    transform: translateX(-50%) translateY(50%);
  }
  
  .modal-header::before {
    display: none;
  }
}

/* Smooth scrolling */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}

.modal-content::-webkit-scrollbar {
  width: 6px;
}

.modal-content::-webkit-scrollbar-track {
  background: #f8fafc;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive behavior */
@media (max-width: 640px) {
  /* Remove card styling and make full screen */
  body {
    margin: 0;
    padding: 0;
    background: var(--bg);
  }
  
  .shell {
    margin: 0;
    padding: 0;
    height: 100vh;
  }
  
  .card {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    height: 100vh;
    min-height: 100vh;
  }
  
  /* Hide background circles only */
  .bg-circles {
    display: none;
  }
  
  /* Adjust topbar for mobile */
  .topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    margin: 0;
    padding: 16px 24px;
    justify-content: space-between;
    background: transparent;
  }
  
  .content {
    grid-template-columns: 1fr;
    padding: 80px 24px 24px;
    gap: 24px;
    height: 100vh;
    display: flex;
    flex-direction: column;
  }
  
  .left {
    order: 2;
    align-items: flex-start;
    text-align: left;
    margin-bottom: auto;
  }
  
  .left h1 {
    font-size: 28px;
    margin-bottom: 16px;
  }
  
  .right {
    order: 1;
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 32px;
    margin: 0;
    margin-top: auto;
    max-width: 100%;
  }
  
  /* Show hamburger menu */
  .hamburger {
    display: flex;
  }
  
  .left-nav {
    display: none;
  }
  
  /* Modal adjustments for mobile */
  .modal {
    width: 95%;
    max-height: 90vh;
  }
}

/* Loading spinner animation */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

