/* VARIABLES */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #a5b4fc;
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --text: #1e293b;
  --text-light: #64748b;
  --bg: #f8fafc;
  --card-bg: rgba(255, 255, 255, 0.85);
  --border: rgba(255, 255, 255, 0.18);
  --shadow: 0 8px 32px rgba(31, 38, 135, 0.15);
}

[data-theme="dark"] {
  --primary: #818cf8;
  --primary-dark: #6366f1;
  --text: #f1f5f9;
  --text-light: #94a3b8;
  --bg: #0f172a;
  --card-bg: rgba(15, 23, 42, 0.85);
  --border: rgba(255, 255, 255, 0.1);
}

/* BASE STYLES */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.blur-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea80 0%, #764ba280 100%);
  backdrop-filter: blur(20px);
  z-index: -1;
}

.container {
  width: 100%;
  max-width: 1200px;
  padding: 0 1.5rem;
  margin: 0 auto;
}

/* HEADER STYLES */
.glass-header {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo i {
  font-size: 1.4rem;
}

.dark-mode-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.dark-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.dark-mode-toggle i {
  font-size: 1.1rem;
}

/* MAIN CONTENT */
.main-content {
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 70px);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 2.5rem;
  margin: 2rem auto;
  max-width: 500px;
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, rgba(255,255,255,0) 70%);
  z-index: -1;
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
}

.auth-header p {
  color: var(--text-light);
  font-size: 1rem;
}

/* FORM ELEMENTS */
.form-group {
  margin-bottom: 1.8rem;
}

.form-label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.glass-input {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text);
  transition: all 0.3s ease;
}

.glass-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  background: rgba(255, 255, 255, 0.15);
}

/* BUTTON */
.glass-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  backdrop-filter: blur(4px);
  position: relative;
  overflow: hidden;
}

.glass-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.glass-button:disabled {
  background: var(--primary-light);
  cursor: not-allowed;
  transform: none !important;
}

/* MESSAGE STYLES */
.error-message {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
  display: none;
  border-left: 4px solid var(--error);
}

.success-message {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  padding: 0.9rem 1.2rem;
  border-radius: 10px;
  margin-bottom: 1.8rem;
  font-size: 0.9rem;
  display: none;
  border-left: 4px solid var(--success);
}

/* REDIRECT LINK */
.redirect-link {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.redirect-link a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* ANIMATIONS */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .glass-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  
  .auth-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .glass-card {
    padding: 1.8rem 1.2rem;
    margin: 1.5rem auto;
    border-radius: 16px;
  }
  
  .glass-input, .glass-button {
    padding: 0.9rem;
  }
  
  .auth-header h2 {
    font-size: 1.4rem;
  }
  
  .header-container {
    padding: 0 1rem;
  }
}