:root {
  --primary: #059669;
  --primary-hover: #047857;
  --primary-light: #d1fae5;
  --success: #10b981;
  --success-bg: #d1fae5;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-input: #f8fafc;
  --border-light: rgba(226, 232, 240, 0.8);
}

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

body {
  font-family: 'Outfit', sans-serif;
  min-height: 100vh;
  color: var(--text-main);
  overflow-x: hidden;
  background-color: #022c22;
}

/* Dynamic Animated Background */
.background-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(135deg, #022c22 0%, #064e3b 100%);
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: #10b981;
  animation-delay: 0s;
}

.blob-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: #34d399;
  animation-delay: -5s;
}

.blob-3 {
  top: 40%;
  left: 50%;
  width: 40vw;
  height: 40vw;
  background: #059669;
  transform: translateX(-50%);
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(5%, 5%) scale(1.1); }
  100% { transform: translate(-5%, -5%) scale(0.9); }
}

/* App Layout */
.app-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 
              0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  width: 100%;
  animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Login specific */
.login-card {
  max-width: 460px;
  padding: 3rem 2.5rem;
}

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

.logo-container {
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-container.small {
  width: 85px;
  height: 85px;
  margin: 0;
}

.logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

.login-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  font-weight: 400;
}

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

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  transition: all 0.3s ease;
}

.form-input::placeholder {
  color: #94a3b8;
}

.form-input:focus {
  outline: none;
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* Buttons */
.primary-btn {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

.primary-btn svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.3s ease;
}

.primary-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--primary);
}

.primary-btn:hover svg {
  transform: translateX(4px);
}

.secondary-btn {
  width: 100%;
  padding: 1rem;
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  margin-top: 2rem;
}

.secondary-btn svg {
  width: 1.1rem;
  height: 1.1rem;
  transition: transform 0.3s ease;
}

.secondary-btn:hover {
  background: #f8fafc;
  transform: translateY(-2px);
}

.secondary-btn:hover svg {
  transform: translateX(-4px);
}

/* Alerts */
.error-message {
  display: none;
  background-color: var(--danger-bg);
  color: var(--danger);
  padding: 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  align-items: center;
  gap: 0.75rem;
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}

.error-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* Footer Note */
.footer-note {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.footer-note p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Result Section */
.result-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

.result-card {
  max-width: 600px;
  padding: 2.5rem;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.school-info {
  flex: 1;
}

.school-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.school-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.student-profile {
  text-align: center;
  margin-bottom: 2rem;
}

.profile-avatar {
  width: 120px;
  height: 120px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
}

.profile-avatar svg {
  width: 32px;
  height: 32px;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.student-birth {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-box {
  background: white;
  padding: 1.25rem;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.3s ease;
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.stat-value.highlight {
  color: var(--primary);
  font-size: 1.75rem;
}

/* Status Section */
.status-section {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(16, 185, 129, 0.05) 100%);
  border-radius: 20px;
  border: 1px dashed rgba(16, 185, 129, 0.3);
}

.status-section.failed {
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(239, 68, 68, 0.05) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

.status-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: white;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.3);
  border: 4px solid var(--success);
  position: relative;
}

.status-section.failed .status-ring {
  box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.3);
  border-color: var(--danger);
}

.status-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.status-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.status-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--success);
  letter-spacing: 0.025em;
}

.status-section.failed .status-value {
  color: var(--danger);
}

.predicate-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--success);
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--success-bg);
  border-radius: 50px;
}

.status-section.failed .predicate-value {
  color: var(--danger);
  background: var(--danger-bg);
}

/* Disclaimer */
.disclaimer-alert {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--warning-bg);
  border-radius: 16px;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.disclaimer-icon {
  color: var(--warning);
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.disclaimer-text {
  font-size: 0.85rem;
  color: #92400e;
  line-height: 1.5;
}

.disclaimer-text strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #b45309;
}

/* Info Alert */
.info-alert {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: #eff6ff;
  border-radius: 16px;
  border: 1px solid rgba(59, 130, 246, 0.3);
  margin-top: 1rem;
}

.info-icon {
  color: #3b82f6;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
}

.info-text {
  font-size: 0.85rem;
  color: #1e3a8a;
  line-height: 1.5;
}

.info-text strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #1d4ed8;
}

.wa-btn, .portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  transition: all 0.3s;
}

.wa-btn {
  background: #25D366;
  color: white;
}

.wa-btn:hover {
  background: #128C7E;
  transform: translateY(-2px);
}

.portal-btn {
  background: #3b82f6;
  color: white;
}

.portal-btn:hover {
  background: #2563eb;
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  .login-card, .result-card {
    padding: 2rem 1.5rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .result-header {
    flex-direction: column;
    text-align: center;
  }
}
