/* Root variables for consistent theming */
:root {
  --primary-color: #003366;
  --secondary-color: #004080;
  --accent-color: #005599;
  --light-color: #ffffff;
  --dark-color: #001f3f;
  --success-color: #00664d;
  --danger-color: #cc0000;
  --transition-speed: 0.3s;
}

/* Certificate Panel Styles */
body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--light-color) 0%, #f0f5ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 20px;
  color: #333;
}

.certificate-section {
  width: 100%;
  padding: 50px 0;
}

.certificate-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeInDown 0.8s forwards;
}

.certificate-title::after {
  content: '';
  position: absolute;
  width: 60%;
  height: 3px;
  background-color: var(--primary-color);
  bottom: 0;
  left: 20%;
  transform: scaleX(0);
  animation: lineExpand 0.6s 0.8s forwards;
}

.certificate-subtitle {
  color: #555;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeIn 0.8s 0.4s forwards;
}

.verification-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
  opacity: 0;
  animation: fadeIn 0.8s 0.6s forwards;
  max-width: 450px;
  margin: 0 auto 20px;
}

.reg-input {
  padding: 12px 20px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  font-size: 16px;
  transition: all var(--transition-speed);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.reg-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.25);
  outline: none;
}

.verify-btn {
  padding: 12px 30px;
  font-weight: 600;
  border-radius: 8px;
  background-color: var(--primary-color);
  border: none;
  transition: all var(--transition-speed);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
  color: white;
}

.verify-btn:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.4);
}

.verify-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(0, 51, 102, 0.3);
}

.verify-btn::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 2s infinite;
}

.verification-result {
  margin-top: 25px;
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
  opacity: 0;
  transition: all var(--transition-speed);
  max-width: 450px;
  margin-left: auto;
  margin-right: auto;
}

.result-success {
  background-color: rgba(0, 102, 77, 0.1);
  color: var(--success-color);
  border-left: 4px solid var(--success-color);
  animation: pulseSuccess 2s infinite;
}

.result-error {
  background-color: rgba(204, 0, 0, 0.1);
  color: var(--danger-color);
  border-left: 4px solid var(--danger-color);
  animation: pulseError 2s infinite;
}

/* Card animation for valid certificate */
.certificate-card {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.1);
  margin-top: 30px;
  transform: translateY(20px);
  opacity: 0;
  animation: fadeInUp 0.6s forwards;
  position: relative;
  overflow: hidden;
}

.certificate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.certificate-card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

.certificate-detail {
  display: flex;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.detail-label {
  font-weight: 600;
  width: 40%;
  color: #555;
}

.detail-value {
  width: 60%;
  color: var(--primary-color);
}

.certificate-stamp {
  width: 80px;
  height: 80px;
  position: absolute;
  bottom: 20px;
  right: 20px;
  opacity: 0.8;
  transform: rotate(-15deg);
}

/* LOGIN PANEL */

/* General Styling */
:root {
  --primary-color: #003366;
  --secondary-color: #004080;
  --dark-color: #333;
  --light-color: #ffffff;
  --transition-speed: 0.3s;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--light-color) 0%, #f0f5ff 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  transition: background 0.5s ease;
}

/* Auth Section */
.auth-section {
  width: 100%;
  padding: 40px 0;
}

.auth-box {
  background-color: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: fadeIn 1s ease-in-out;
}

.auth-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Removed the ::before effect that was causing the blue background on hover */

/* Headings */
#auth-heading {
  color: var(--primary-color);
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

#auth-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: var(--primary-color);
  transition: width 0.5s ease;
}

.auth-box:hover #auth-heading::after {
  width: 100px;
}

/* Form Elements */
.form-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--dark-color);
  transition: color var(--transition-speed);
}

.form-control {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  background-color: rgba(0, 0, 0, 0.03);
  transition: all var(--transition-speed);
  border-left: 3px solid transparent;
}

.form-control:focus {
  box-shadow: none;
  background-color: rgba(0, 0, 0, 0.05);
  border-left: 3px solid var(--primary-color);
}

.btn {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-warning {
  background-color: var(--primary-color);
  border: none;
  color: var(--light-color);
}

.btn-warning::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: all 0.6s ease;
  z-index: -1;
}

.btn-warning:hover::before {
  left: 100%;
}

.btn-warning:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 51, 102, 0.4);
}

/* Animations */
@keyframes fadeIn {
  from {
      opacity: 0;
  }
  to {
      opacity: 1;
  }
}

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

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

@keyframes lineExpand {
  from {
      transform: scaleX(0);
  }
  to {
      transform: scaleX(1);
  }
}

@keyframes shine {
  0% {
      left: -100%;
  }
  20% {
      left: 100%;
  }
  100% {
      left: 100%;
  }
}

@keyframes pulseSuccess {
  0% {
      box-shadow: 0 0 0 0 rgba(0, 102, 77, 0.4);
  }
  70% {
      box-shadow: 0 0 0 10px rgba(0, 102, 77, 0);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(0, 102, 77, 0);
  }
}

@keyframes pulseError {
  0% {
      box-shadow: 0 0 0 0 rgba(204, 0, 0, 0.4);
  }
  70% {
      box-shadow: 0 0 0 10px rgba(204, 0, 0, 0);
  }
  100% {
      box-shadow: 0 0 0 0 rgba(204, 0, 0, 0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .certificate-title {
      font-size: 2rem;
  }
  
  .verification-form {
      padding: 0 15px;
  }
  
  .certificate-card {
      margin: 30px 15px 0;
  }
  
  .certificate-detail {
      flex-direction: column;
  }
  
  .detail-label, .detail-value {
      width: 100%;
  }
  
  .detail-label {
      margin-bottom: 5px;
  }

  .auth-box {
      padding: 20px;
      margin: 0 15px;
  }
  
  .form-control {
      padding: 10px 15px;
  }
  
  .btn {
      padding: 10px 20px;
  }
}

@media (max-width: 576px) {
  .certificate-title {
      font-size: 1.8rem;
  }
  
  body {
      padding: 10px;
  }
  
  .certificate-section {
      padding: 30px 0;
  }

  #auth-heading {
      font-size: 1.5rem;
  }
  
  .auth-box {
      padding: 15px;
  }
}

/* Dark Mode Styles (if needed later) */
.dark-mode {
  background: linear-gradient(135deg, #002347 0%, #001f3f 100%);
}

.dark-mode .auth-box {
  background-color: #001f3f;
}

.dark-mode #auth-heading,
.dark-mode .form-label {
  color: #f8f9fa;
}

.dark-mode .form-control {
  background-color: rgba(255, 255, 255, 0.05);
  color: white;
}

.dark-mode .form-control:focus {
  background-color: rgba(255, 255, 255, 0.1);
}