.competition-portal {
  background: #f8fafc;
  min-height: 100vh;
}

.portal-container {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
  align-items: start;
}

/* Registration Panel */
.registration-panel {
  background: white;
  padding: 4rem;
  border-radius: 20px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.03);
  border: 1px solid #f1f5f9;
}

.panel-header {
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.1);
  color: #d4af37;
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.serif-title {
  font-family: "Playfair Display", serif;
  font-size: 2.8rem;
  color: #0f172a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.serif-title span {
  color: #d4af37;
  font-style: italic;
}

/* Modal Styling */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
}

.majestic-modal {
  max-width: 800px;
  margin: 2rem auto;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: white;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  overflow: hidden;
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0f172a;
  color: white;
}

.modal-header .serif-title {
  color: white;
  font-size: 2rem;
  margin-bottom: 0;
}

.close-modal {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  font-size: 1.75rem;
  cursor: pointer;
  color: white;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.close-modal:hover {
  background: #d4af37;
  color: #0f172a;
  transform: rotate(90deg);
}

.modal-tabs {
  display: flex;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 2rem;
  flex-shrink: 0;
}

.rule-tab {
  padding: 1.25rem 2rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rule-tab.active {
  color: #0f172a;
  border-bottom-color: #d4af37;
  background: white;
}

.modal-body {
  padding: 2.5rem;
  overflow-y: auto;
  flex-grow: 1;
  background: #ffffff;
}

/* Scrollbar Styling for Majestic Modal */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.rule-section {
  display: none;
}

.rule-section.active {
  display: block;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.rules-list li {
  display: flex;
  gap: 1.25rem;
  line-height: 1.7;
  color: #334155;
  font-size: 1rem;
}

.rules-list li span {
  color: #d4af37;
  font-weight: 800;
  min-width: 1.5rem;
  font-size: 1.1rem;
}

#rule-hi .rules-list li {
  font-size: 1.05rem;
  line-height: 1.8;
  font-weight: 500;
}

.special-note {
  margin-top: 2.5rem;
  padding: 2rem;
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: 12px;
  color: #92400e;
  font-size: 0.95rem;
  line-height: 1.7;
  box-shadow: inset 0 2px 4px rgba(251, 191, 36, 0.1);
}

.special-note strong {
  color: #b45309;
  display: block;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

#rule-hi .special-note {
  line-height: 1.8;
}

/* Majestic Form */
.majestic-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.readonly-input {
  background: #f1f5f9 !important;
  font-weight: 600;
  color: #1e293b;
}

.form-footer {
  margin-top: 1rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fee-info {
  display: flex;
  flex-direction: column;
}

.fee-info span {
  font-size: 0.875rem;
  color: #64748b;
}

.fee-info strong {
  font-size: 1.5rem;
  color: #0f172a;
}

.btn-majestic {
  background: #0f172a;
  color: white;
  padding: 1.1rem 3rem;
  border-radius: 10px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  letter-spacing: 0.02em;
}

.btn-majestic:hover {
  background: #1e293b;
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -5px rgba(15, 23, 42, 0.2);
}

/* Login Panel */
.panel-inner {
  background: #0f172a;
  color: white;
  padding: 2rem;
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.panel-inner h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.panel-inner p {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.minimal-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.minimal-form label {
  color: #cbd5e1;
}

.minimal-form input,
.minimal-form select {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
}

.btn-outline-gold {
  background: none;
  border: 2px solid #d4af37;
  color: #d4af37;
  padding: 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
}

.btn-outline-gold:hover {
  background: #d4af37;
  color: #0f172a;
}

.announcement-card {
  background: #fefce8;
  border: 1px solid #fef08a;
  padding: 1.25rem;
  border-radius: 12px;
  display: flex;
  gap: 1rem;
  color: #854d0e;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.announcement-card:hover {
  background: #fef9c3;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
  .portal-grid {
    grid-template-columns: 1fr;
  }

  .registration-panel {
    order: 1;
  }

  .login-panel {
    order: 2;
  }
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .registration-panel {
    padding: 2rem 1.5rem;
  }

  .serif-title {
    font-size: 2rem;
  }
}

/* Majestic Toast System */
.toast-container {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 300px;
  max-width: 450px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  animation: toastSlideIn 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  transition: all 0.3s;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.success {
  border-left: 4px solid #10b981;
}

.toast i {
  font-size: 1.25rem;
}

.toast.error i {
  color: #ef4444;
}
.toast.success i {
  color: #10b981;
}

.toast-content {
  flex: 1;
}

.toast-content .toast-title {
  font-weight: 700;
  font-size: 0.875rem;
  display: block;
  margin-bottom: 0.125rem;
}

.toast-content .toast-message {
  font-size: 0.8125rem;
  color: #94a3b8;
}

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

.toast.fade-out {
  transform: translateX(120%);
  opacity: 0;
}

@media (max-width: 640px) {
  .toast-container {
    top: auto;
    bottom: 2rem;
    right: 1.5rem;
    left: 1.5rem;
  }
  .toast {
    min-width: auto;
    width: 100%;
  }
}
