/* CSS Reset & Variables */
:root {
  --primary: #3498db;
  --secondary: #5dade2;
  --accent: #2c3e50;
  --success: #27ae60;
  --danger: #e74c3c;
  --light: #f8f9fa;
  --dark: #2c3e50;
  --gray: #6c757d;
  --border-radius: 16px;
  --box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
  --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Main Container */
.container {
  width: 100%;
  max-width: 400px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  animation: containerEntrance 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes containerEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  padding: 30px 20px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.logo i {
  font-size: 32px;
  margin-right: 10px;
  transition: var(--transition);
}

.logo:hover i {
  transform: rotate(-10deg) scale(1.1);
}

.logo h1 {
  font-size: 28px;
  font-weight: 600;
}

.header p {
  font-size: 14px;
  opacity: 0.9;
}

/* Form Container */
.form-container {
  padding: 25px;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 25px;
  background: #f1f3f4;
  border-radius: 50px;
  padding: 4px;
  position: relative;
}

.tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 50px;
  transition: var(--transition);
  z-index: 1;
}

.tab.active {
  color: white;
}

.tab-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50px;
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.tab-slider.register {
  transform: translateX(100%);
}

/* Forms */
.form {
  display: none;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.form.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray);
  transition: var(--transition);
}

.input-group input {
  width: 100%;
  padding: 15px 45px;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  font-size: 16px;
  background: #f9fbfd;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--primary);
  outline: none;
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.input-group input:focus + i {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
}

.password-toggle:hover {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

.remember-forgot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 5px;
}

.remember input {
  width: 16px;
  height: 16px;
  transition: var(--transition);
}

.remember input:checked {
  transform: scale(1.1);
}

.forgot {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

.forgot:hover {
  color: var(--accent);
  transform: translateX(2px);
}

.btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: 0.6s;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn:hover::before {
  left: 100%;
}

.divider {
  text-align: center;
  margin: 20px 0;
  color: var(--gray);
  font-size: 14px;
  position: relative;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 45%;
  height: 1px;
  background: #e9ecef;
  transition: var(--transition);
}

.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 45%;
  height: 1px;
  background: #e9ecef;
  transition: var(--transition);
}

/* Google Button */
.google-btn-container {
  margin: 20px 0;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.google-btn:hover {
  border-color: #dd4b39;
  background: #f8f9fa;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

.google-btn i {
  color: #dd4b39;
  font-size: 18px;
  transition: var(--transition);
}

.google-btn:hover i {
  transform: scale(1.1);
}

/* Alerts */
.alert {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: var(--border-radius);
  color: white;
  z-index: 1000;
  max-width: 300px;
  box-shadow: var(--box-shadow);
  animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background: var(--danger);
}

.alert-success {
  background: var(--success);
}

@keyframes slideIn {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

@keyframes slideOut {
  from { 
    transform: translateX(0); 
    opacity: 1; 
  }
  to { 
    transform: translateX(100%); 
    opacity: 0; 
  }
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 15px;
  }
  
  .container {
    max-width: 100%;
  }
  
  .header {
    padding: 25px 15px;
  }
  
  .form-container {
    padding: 20px;
  }
  
  .logo h1 {
    font-size: 24px;
  }
}