/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;700&display=swap');

:root {
  /* Premium Dark Theme Core */
  --bg-color: #0f172a;
  /* Slate 900 */
  --bg-gradient: radial-gradient(circle at top right, rgba(30, 41, 59, 0.7), rgba(15, 23, 42, 0.9));

  --surface-color: rgba(30, 41, 59, 0.6);
  /* Glassmorphism base */
  --surface-border: rgba(255, 255, 255, 0.1);
  --surface-highlight: rgba(255, 255, 255, 0.05);

  --primary-color: #6366f1;
  /* Indigo 500 */
  --primary-hover: #4f46e5;
  /* Indigo 600 */
  --secondary-color: #10b981;
  /* Emerald 500 */

  --text-main: #f8fafc;
  /* Slate 50 */
  --text-muted: #94a3b8;
  /* Slate 400 */

  --border-color: #334155;
  /* Slate 700 */

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.3);

  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  --header-height: 70px;
}

/* Reset & Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background-color: var(--bg-color);
  background-image: var(--bg-gradient), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072&auto=format&fit=crop');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  margin-top: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Layout */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Header */
.site-header {
  height: var(--header-height);
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: 'Outfit', sans-serif;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.brand img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
}

.nav-links a:hover {
  color: var(--text-main);
  background: var(--surface-highlight);
  text-decoration: none;
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0;
}

/* Cards & Glassmorphism */
.card {
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
  text-decoration: none;
}

.btn-success {
  background: linear-gradient(135deg, var(--secondary-color), #059669);
  color: white;
}

.btn-success:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  transition: all 0.2s ease;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
  background: rgba(15, 23, 42, 0.8);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  min-width: 300px;
  padding: 1rem 1.25rem;
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(12px);
  border-left: 4px solid var(--primary-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.3s ease forwards;
}

.toast.success { border-left-color: var(--secondary-color); }
.toast.error { border-left-color: #ef4444; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { transform: translateX(20px); opacity: 0; }
}

/* Loading State */
.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

/* Auth Page specific */
.auth-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.auth-hero {
  padding-right: 2rem;
}

.auth-hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1.5rem;
}

.auth-hero p {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 45ch;
}

.auth-forms {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.nav-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.nav-tab {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0.75rem 0;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.nav-tab.active {
  color: var(--primary-color);
  font-weight: 600;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--primary-color);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-tag {
  background: rgba(16, 185, 129, 0.15);
  color: var(--secondary-color);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-right: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  background: rgba(15, 23, 42, 0.8);
}

/* Badges */
.badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
  .auth-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .auth-hero {
    text-align: center;
    padding-right: 0;
  }

  .auth-hero h1 {
    font-size: 2.5rem;
  }

  .auth-hero p {
    margin: 0 auto;
  }
}