/* register_student.css - Ultra Sophisticated Design */
:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --primary-light: #4895ef;
  --secondary: #f72585;
  --accent: #4cc9f0;
  --dark: #1a1a2e;
  --darker: #16213e;
  --darkest: #0d0f1a;
  --light: #f8f9fa;
  --success: #4bb543;
  --error: #ff3333;
  --warning: #ffcc00;
  --glass: rgba(30, 30, 60, 0.8);
  --glass-border: rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
  --text-primary: rgba(255, 255, 255, 0.9);
  --text-secondary: rgba(255, 255, 255, 0.7);
  --form-section: rgba(40, 40, 80, 0.7);
  --form-section-hover: rgba(50, 50, 100, 0.8);
}

/* Base Styles with Fluid Typography */
body {
  background: linear-gradient(135deg, var(--dark), var(--darker));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-attachment: fixed;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Particle Background Effect */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(67, 97, 238, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 80% 70%, rgba(247, 37, 133, 0.1) 0%, transparent 20%),
    radial-gradient(circle at 40% 60%, rgba(76, 201, 240, 0.1) 0%, transparent 20%);
  z-index: -1;
  pointer-events: none;
}

/* Main Container */
.container {
  max-width: 1000px;
  padding: 2rem;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Typography with Fluid Scaling */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: white;
  position: relative;
  display: inline-block;
  margin-bottom: 2rem;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}

h3 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--accent);
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 2px;
}

/* Form Sections */
form {
  background: var(--form-section);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

form:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25);
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  font-weight: 500;
  margin-bottom: 0.75rem;
  display: block;
  color: var(--accent);
  font-size: 0.95rem;
}

.form-control {
  background: var(--darkest);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 0.75rem 1.25rem;
  color: white;
  transition: all 0.3s ease;
  box-shadow: none;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  width: 100%;
}

.form-control:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
  color: white;
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Select Dropdown Styling */
select.form-control {
  background: var(--darkest) url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e") no-repeat right 1rem center/1rem;
}

select.form-control option {
  background: var(--darker);
  color: white;
}

/* File Input Styling */
input[type="file"] {
  padding: 0.5rem;
}

input[type="file"]::file-selector-button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  margin-right: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

input[type="file"]::file-selector-button:hover {
  background: var(--primary-dark);
}

/* Buttons - Advanced Styling */
.btn {
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(67, 97, 238, 0.4);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.btn-primary:hover::after {
  left: 100%;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Alerts - Animated */
.alert {
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  border: none;
  animation: slideIn 0.5s ease-out;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: rgba(75, 181, 67, 0.15);
  color: white;
  border-left: 4px solid var(--success);
}

.alert-danger {
  background: rgba(255, 51, 51, 0.15);
  color: white;
  border-left: 4px solid var(--error);
}

.alert-warning {
  background: rgba(255, 204, 0, 0.15);
  color: white;
  border-left: 4px solid var(--warning);
}

.alert ul {
  margin-bottom: 0;
  padding-left: 1.5rem;
}

.alert li {
  margin-bottom: 0.5rem;
}

.alert li:last-child {
  margin-bottom: 0;
}

/* Form Text */
.form-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Link Styling */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 1.5rem;
  }
  
  form {
    padding: 1.5rem;
  }
  
  .btn {
    width: 100%;
    margin-right: 0;
    margin-bottom: 1rem;
  }
}

/* Animation for Form Submission */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.form-submitting {
  animation: pulse 1.5s infinite;
}

/* Status Indicators */
.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-active {
  background-color: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.status-pending {
  background-color: var(--warning);
  box-shadow: 0 0 10px var(--warning);
}

.status-expired {
  background-color: var(--error);
  box-shadow: 0 0 10px var(--error);
}

/* Floating Labels Alternative */
.form-floating {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-floating label {
  position: absolute;
  top: 0.75rem;
  left: 1.25rem;
  font-size: 0.8rem;
  opacity: 0.7;
  transform-origin: left center;
  transition: all 0.3s ease;
  pointer-events: none;
}

.form-floating .form-control:focus + label,
.form-floating .form-control:not(:placeholder-shown) + label {
  transform: translateY(-1.5rem) scale(0.85);
  opacity: 1;
  color: var(--accent);
}

/* Tooltips */
[data-bs-toggle="tooltip"] {
  position: relative;
  cursor: pointer;
}

[data-bs-toggle="tooltip"]::after {
  content: attr(data-bs-title);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--darker);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

[data-bs-toggle="tooltip"]:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: calc(100% + 5px);
}

/* Micro-interactions */
.btn, .nav-link, .dropdown-item {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Date Input Styling */
input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

/* Error State */
.is-invalid {
  border-color: var(--error) !important;
  background: rgba(255, 51, 51, 0.1) !important;
}

.invalid-feedback {
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Success State */
.is-valid {
  border-color: var(--success) !important;
  background: rgba(75, 181, 67, 0.1) !important;
}

.valid-feedback {
  color: var(--success);
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Section Divider */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--primary), transparent);
  margin: 3rem 0;
  border: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}