:root {
  --accent: #1767b3;
  --accent-dark: #0d4a8f;
  --success: #10b981;
  --error: #ef4444;
  --warning: #f59e0b;
  --light: #f9fafb;
  --border: #e5e7eb;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: white;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav .brand {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  font-size: 1.5rem;
  letter-spacing: -0.5px;
  transition: var(--transition);
}

.nav .brand:hover {
  color: var(--accent-dark);
  transform: translateY(-2px);
}

.nav nav {
  display: flex;
  gap: 8px;
}

.nav nav a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 6px;
  transition: var(--transition);
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.nav nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--accent);
  z-index: -1;
  transition: var(--transition);
}

.nav nav a:hover::before {
  left: 0;
}

.nav nav a:hover {
  color: white;
}

/* Center Section */
.center {
  padding: 80px 20px;
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.center h1 {
  font-size: 3rem;
  margin-bottom: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.center p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* Card */
.card {
  max-width: 480px;
  margin: 40px auto;
  padding: 32px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  animation: fadeIn 0.6s ease-out;
  backdrop-filter: blur(10px);
}

.card h2 {
  margin-bottom: 24px;
  color: var(--text-primary);
  font-size: 1.8rem;
  text-align: center;
}

/* Form Elements */
label {
  display: block;
  margin-top: 16px;
  margin-bottom: 6px;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  margin: 8px 0 16px 0;
  border-radius: 8px;
  border: 2px solid var(--border);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--light);
  color: var(--text-primary);
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(23, 103, 179, 0.1);
  transform: translateY(-2px);
}

input[type="email"]:hover,
input[type="password"]:hover,
input[type="text"]:hover,
input[type="tel"]:hover,
input[type="date"]:hover,
textarea:hover,
select:hover {
  border-color: var(--accent);
}

/* Button */
.btn {
  display: inline-block;
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  padding: 14px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(23, 103, 179, 0.3);
  margin-top: 8px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(23, 103, 179, 0.4);
}

.btn:active {
  transform: translateY(-1px);
}

/* Messages */
.msg {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  min-height: 20px;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.msg.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-left: 4px solid var(--error);
}

.msg.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

/* Footer */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

/* User Profile */
.user {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  border-radius: 8px;
  margin-bottom: 8px;
}

.user:hover {
  background: var(--light);
  transform: translateX(4px);
}

/* Result Card */
.result {
  background: white;
  padding: 16px;
  border-radius: 8px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-left: 4px solid var(--accent);
  animation: slideUp 0.3s ease-out;
}

.result:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .card {
    margin: 20px 16px;
    padding: 24px;
  }

  .center h1 {
    font-size: 2rem;
  }

  .nav {
    flex-direction: column;
    gap: 12px;
  }

  .nav nav {
    flex-direction: column;
    width: 100%;
  }

  .nav nav a {
    width: 100%;
    text-align: center;
  }

  .btn {
    padding: 12px 14px;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
