:root {
  --primary: #3f51b5;
  --primary-dark: #303f9f;
  --primary-light: #c5cae9;
  --accent: #ff4081;
  --text-primary: #212121;
  --text-secondary: #757575;
  --light-bg: #f5f7fa;
  --card-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* GLOBAL RESET */
*{
  box-sizing: border-box;
}

body {
  background-color: var(--light-bg);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 20px;
  background-image: linear-gradient(135deg, var(--primary-light) 0%, var(--light-bg) 100%);
}

/* CONTAINER */
.registration-container {
  width: 100%;
  max-width: 500px;
  animation: fadeIn 0.5s ease-in-out;
}

/* CARD */
.registration-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 35px;
  transition: transform 0.3s ease;
  width: 100%;
}

.registration-card:hover {
  transform: translateY(-5px);
}

/* TITLE */
.registration-title {
  color: var(--primary);
  text-align: center;
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

.registration-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
}

/* FORM */
.form-group {
  margin-bottom: 24px;
  position: relative;
}

.usernameError{
  color:red;
  font-size:12px;
}

.form-group label {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group label i {
  font-size: 16px;
  color: var(--primary);
  width: 20px;
}

.form-control {
  height: 48px;
  border-radius: 8px;
  border: 1.5px solid #e1e5eb;
  padding: 10px 15px;
  font-size: 15px;
  width: 100%;
  transition: all 0.3s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
  outline: none;
}

/* BUTTON */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  width: 100%;
  border-radius: 8px;
  margin-top: 15px;
  color: white;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 10px rgba(63, 81, 181, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(63, 81, 181, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ALERTS */
.alert {
  margin-bottom: 24px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 14px;
  border: none;
  display: flex;
  align-items: center;
}

.alert-success {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.alert-danger {
  background-color: #ffebee;
  color: #c62828;
}

.alert i {
  margin-right: 10px;
  font-size: 18px;
}

/* PASSWORD ICON */
.password-toggle {
  position: absolute;
  right: 12px;
  top: 40px;
  cursor: pointer;
  color: var(--text-secondary);
}

.password-toggle:hover {
  color: var(--primary);
}

/* FOOTER */
.form-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #e1e5eb;
  text-align: center;
}

.form-footer a{
  color: var(--primary);
  text-decoration: none;
}

.form-footer a:hover{
  text-decoration: underline;
}

/* ANIMATION */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------ RESPONSIVE ------------------ */

/* Tablets */
@media (max-width: 992px) {

  .registration-container{
    max-width: 450px;
  }

  .registration-card{
    padding: 30px;
  }

}

/* Small tablets / large phones */
@media (max-width: 768px) {

  body{
    padding: 15px;
    align-items: flex-start;
  }

  .registration-container{
    max-width: 420px;
    margin-top: 40px;
  }

  .registration-title{
    font-size: 22px;
  }

}

/* Mobile */
@media (max-width: 576px) {

  .registration-container{
    max-width: 100%;
  }

  .registration-card{
    padding: 22px 18px;
    border-radius: 10px;
  }

  .registration-title{
    font-size: 20px;
    margin-bottom: 22px;
  }

  .form-control{
    height: 44px;
    font-size: 14px;
  }

  .btn-primary{
    font-size: 15px;
    padding: 12px;
  }

}

/* Very small devices */
@media (max-width: 360px){

  .registration-title{
    font-size: 18px;
  }

  .form-group label{
    font-size: 14px;
  }

}