/* Tbody {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #5a86d9, #81a9e0);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px;
  color: #2e3a59;
  overflow-x: hidden;
}e stil */
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #5a86d9, #81a9e0);
  min-height: 110vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  color: #2e3a59;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: moveStars 20s linear infinite;
  z-index: -1;
}
@keyframes moveStars {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 1000px 1000px;
  }
}
a {
  color: #274690;
  text-decoration: none;
  font-weight: 600;
}
a:hover,
a:focus {
  color: #0c1e53;
  text-decoration: underline;
  outline: none;
}

.main-container {
  background: #f0f5ff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(39, 70, 144, 0.3);
  width: 380px;
  max-width: 100%;
  max-height: 98vh;
  overflow-y: auto;
  overflow-x: hidden;
  animation: shake 5s ease-in-out infinite;
  margin: auto;
}
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(2px);
  }
  75% {
    transform: translateX(-1px);
  }
}
.container {
  display: flex;
  background: #d9e6ff;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  box-shadow: inset 0 -2px 0 #274690;
}
.btn {
  flex: 1;
  border: none;
  padding: 14px 0;
  background: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  color: #274690;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transform: skewX(-45deg);
  transition: left 0.3s ease;
}
.btn:hover::after {
  left: 100%;
}
.btn:hover:not(.btn-colored),
.btn:focus-visible:not(.btn-colored) {
  background: #a8c1ff;
  outline: none;
  color: #0c1e53;
}
.btn-colored {
  background: #4e7efc;
  color: white;
  box-shadow: 0 4px 8px rgba(27, 67, 186, 0.4);
}

.form-page {
  position: relative;
  padding: 20px 25px 25px;
  max-height: calc(98vh - 60px);
  overflow-y: auto;
}
h3 {
  text-align: center;
  margin: 0 0 20px 0;
  font-weight: 700;
  color: #274690;
  letter-spacing: 1.3px;
}
form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
input[type="text"],
input[type="email"],
input[type="password"] {
  padding: 12px 40px 12px 18px;
  font-size: 1rem;
  border-radius: 8px;
  border: 1.8px solid #a8c1ff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  color: #2e3a59;
  position: relative;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: #4e7efc;
  box-shadow: 0 0 10px rgba(78, 126, 252, 0.5);
  outline: none;
  background: white;
}
input::placeholder {
  color: #8c9fcb;
}
.form-group {
  position: relative;
  padding-right: 30px; /* İkonlar için boşluk bırak */
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #8c9fcb;
  transition: color 0.3s ease, transform 0.3s ease;
}
.password-toggle:hover {
  color: #4e7efc;
  transform: translateY(-50%) scale(1.1);
}
.validation-icon {
  position: absolute;
  top: 50%;
  right: 35px; /* Daha uygun bir konum */
  transform: translateY(-50%);
  font-size: 1.4rem;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease, color 0.3s ease;
}
.validation-icon.valid {
  color: #28a745; /* Modern yeşil */
  transform: translateY(-50%) scale(1.2);
  opacity: 1;
}
.validation-icon.invalid {
  color: #ff4d4f; /* Modern kırmızı */
  transform: translateY(-50%) scale(1.2);
  opacity: 1;
}
.validation-icon.hidden {
  opacity: 0;
  transform: translateY(-50%) scale(0.8);
}
@media (max-width: 480px) {
  .validation-icon {
    top: 50%; /* Mobilde de ortalanmış konum */
    right: 8px; /* Mobil için daha uygun bir konum */
    transform: translateY(-50%);
  }
}
.field-error {
  color: #d9534f;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 4px;
  margin-left: 4px;
  animation: fadeIn 0.3s ease-in-out;
  min-height: 18px;
}
.btn-login,
.btn-register {
  margin-top: 6px;
  background: #4e7efc;
  color: white;
  border: none;
  font-weight: 700;
  border-radius: 8px;
  padding: 14px 0;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(78, 126, 252, 0.5);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
.btn-login:hover,
.btn-register:hover,
.btn-login:focus,
.btn-register:focus {
  background: #3469e3;
  outline: none;
  box-shadow: 0 10px 20px rgba(52, 105, 227, 0.7);
}
.login-form,
.register-form {
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.login-form.active,
.register-form.active {
  display: block;
  opacity: 1;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: #274690;
  user-select: none;
  margin-top: 2px;
}
input.checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4e7efc;
  border-radius: 4px;
  border: 1.5px solid #a8c1ff;
  transition: border-color 0.2s ease;
}
input.checkbox:focus {
  outline: none;
  border-color: #3469e3;
  box-shadow: 0 0 5px #3469e3;
}
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* Flash mesajları için stil */
.flash-messages {
  list-style-type: none;
  margin-top: 1rem;
  padding: 0;
  text-align: center;
}

.flash-messages li {
  background-color: #90c8ac;
  color: white;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: bold;
  animation: fadeIn 0.3s ease-in-out;
}

.flash-messages li.error {
  background-color: #c84361;
}

/* Cloudflare Turnstile Widget Stilleri */
.cf-turnstile {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 6px auto !important;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(78, 126, 252, 0.2);
  transition: box-shadow 0.3s ease;
}

.cf-turnstile:hover {
  box-shadow: 0 4px 12px rgba(78, 126, 252, 0.3);
}

/* Turnstile için responsive tasarım */
@media (max-width: 480px) {
  .cf-turnstile {
    margin: 4px auto !important;
    transform: scale(0.75);
  }
}

/* Genel responsive tasarım iyileştirmeleri */
@media (max-height: 750px) {
  .main-container {
    max-height: 99vh;
    margin: 2px auto;
  }
  
  .form-page {
    padding: 15px 20px 20px;
    max-height: calc(99vh - 55px);
  }
  
  h3 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
  }
  
  form {
    gap: 6px;
  }
  
  .btn-login,
  .btn-register {
    padding: 12px 0;
    font-size: 1rem;
  }
}

@media (max-height: 650px) {
  body {
    padding: 2px;
    align-items: flex-start;
    padding-top: 5px;
  }
  
  .main-container {
    max-height: 98vh;
    margin: 0 auto;
  }
  
  .form-page {
    padding: 10px 15px 15px;
    max-height: calc(98vh - 50px);
  }
  
  h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
  }
  
  form {
    gap: 4px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    padding: 10px 35px 10px 15px;
    font-size: 0.9rem;
  }
  
  .btn-login,
  .btn-register {
    padding: 10px 0;
    font-size: 0.95rem;
    margin-top: 4px;
  }
  
  .field-error {
    font-size: 0.8rem;
    min-height: 15px;
  }
}

@media (max-width: 400px) {
  .main-container {
    width: 98%;
    margin: 2px auto;
  }
  
  .form-page {
    padding: 12px 15px 15px;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="password"] {
    padding: 10px 35px 10px 12px;
  }
}