:root {
  --primary-bg: #f2f2f2;
  --secondary-bg: #ffffff;
  --accent: #003F7C;
  --text-color: #333333;
}

html, body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--primary-bg);
  font-family: Arial, sans-serif;
  overflow-x: hidden;
  max-width: 100%;
}

/* Waves */
.ocean {
  height: 120px;
  width: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  overflow: hidden;
  z-index: 0;
  left: 50%;
  transform: translateX(-50%);
  right: 0;
}

.wave {
  position: absolute;
  width: 200%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 800 88.7'%3E%3Cpath d='M800 56.9c-155.5 0-204.9-50-405.5-49.9-200 0-250 49.9-394.5 49.9v31.8h800v-.2-31.6z' fill='%23003F7C'/%3E%3C/svg%3E");
  animation: wave 15s linear infinite;
      min-width: 100vw;
}

.wave:nth-of-type(2) {
  animation-delay: -5s;
  opacity: 0.6;
}

.wave:nth-of-type(3) {
  animation-delay: -2s;
  opacity: 0.3;
}

@keyframes wave {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Auth Card */
.auth-container {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 20px;
  overflow: hidden;
}

.auth-card {
  background: var(--secondary-bg);
  border-radius: 15px;
  padding: 2rem;
  width: 100%;
  max-width: 450px;
  box-shadow: 0 4px 25px rgba(0,0,0,0.15);
  z-index: 1;
  position: relative;
  box-sizing: border-box;
}

.auth-title {
  color: var(--accent);
  font-size: 2rem;
  margin-bottom: 2rem;
  text-align: center;
}

.input-group {
  position: relative;
  margin: 1.5rem 0;
}

.input-group input {
  width: 100%;
  padding: 14px 0;
  font-size: 1rem;
  color: var(--text-color);
  border: 0;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  outline: none;
  transition: 0.3s;
}

.input-group label {
  position: absolute;
  top: 14px;
  left: 0;
  font-size: 1rem;
  color: #888;
  pointer-events: none;
  transition: 0.3s;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
  top: -10px;
  font-size: 0.8rem;
  color: var(--accent);
}

.auth-button {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s;
  margin-top: 2rem;
}

.auth-button:hover {
  transform: translateY(-2px);
}

.auth-footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.auth-footer a {
  color: #666;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.auth-footer a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
  .auth-card {
      padding: 1.5rem;
      max-width: 350px;
  }
  
  .auth-title {
      font-size: 1.5rem;
  }
  
  .input-group input {
      padding: 12px 0;
      font-size: 0.9rem;
  }
  
  .wave {
      height: 80px;
  }
}

@media (max-width: 480px) {
  .auth-container {
      padding: 1rem;
  }
  
  .auth-card {
      max-width: 100%;
      border-radius: 10px;
  }
  
  .auth-footer {
      flex-direction: column;
      align-items: center;
  }
}

.terms-link
{
  color: white;
}

/* Стили для ошибок */
.has-error input {
    border-color: #ff4444 !important;
}

.error-message {
    color: #ff4444;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Счетчик символов */
.char-counter {
    position: absolute;
    right: 10px;
    bottom: 5px;
    font-size: 11px;
    color: #888;
}

.counter-error {
    color: #ff4444;
}

.input-error {
    border-color: #ff4444 !important;
}

/* Глаз для пароля */
.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
}

.eye-icon {
    font-size: 16px;
}

/* Дополнительные стили для регистрации */
.password-hints {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
}

.password-hints span {
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #9639d5;
}

.password-hints .valid {
    color: #4CAF50;
    background-color: #e8f5e9;
}

.password-hints .invalid {
    color: #f44336;
    background-color: #ffebee;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 15px;
}

.checkbox-input {
    opacity: 0;
    position: absolute;
}

.checkbox-custom {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ccc;
    border-radius: 3px;
    margin-right: 10px;
    position: relative;
}

.checkbox-input:checked + .checkbox-custom {
    background-color: #2196F3;
    border-color: #2196F3;
}

.checkbox-input:checked + .checkbox-custom::after {
    content: "✓";
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

.terms-text {
    font-size: 14px;
}

.terms-link {
    color: #2196F3;
    text-decoration: none;
}

.terms-link:hover {
    text-decoration: underline;
}