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

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    -apple-system, BlinkMacMacSystemFont, "Segoe UI", "Helvetica Neue",
    sans-serif;
  background: #faf8f3;
  color: #2d2d2d;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Updated color palette: cream/beige background with dark navy accents */

/* Updated keyframe animations for modal and card effects */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInScale {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scaleInBounce {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes buttonHover {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-4px);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    box-shadow: 0 0 8px rgba(26, 58, 82, 0.3);
  }

  50% {
    box-shadow: 0 0 16px rgba(26, 58, 82, 0.6);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes backdropFadeIn {
  from {
    backdrop-filter: blur(0px);
    background: rgba(0, 0, 0, 0);
  }

  to {
    backdrop-filter: blur(4px);
    background: rgba(0, 0, 0, 0.5);
  }
}

.main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  margin-top: 40px;
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
  color: #2d2d2d;
  animation: fadeInUp 0.8s ease-out;
}

.page-header h1 {
  font-size: 42px;
  margin-bottom: 8px;
  font-weight: 700;
  animation: fadeInUp 0.8s ease-out 0.1s both;
  letter-spacing: -0.5px;
  color: #1a3a52;
}

.subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 16px;
  color: #666;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
}

.filters-section {
  animation: slideInUp 0.7s ease-out 0.1s both;
  margin-bottom: 24px;
}

.btn-add-competition {
  animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 14px 32px;
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.3);
  margin-bottom: 16px;
  display: inline-block;
}

.btn-add-competition:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(26, 58, 82, 0.5);
  background: linear-gradient(135deg, #0f2839 0%, #1a3a52 100%);
  animation: glowPulse 1.5s ease-in-out;
}

.btn-add-competition:active {
  transform: translateY(-2px);
}

.filters-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.filter-input,
.filter-select {
  animation: slideInUp 0.5s ease-out both;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 12px 16px;
  border: 2px solid #d4cfc4;
  border-radius: 8px;
  font-size: 14px;
  color: #2d2d2d;
  background: #fff;
  font-family: inherit;
  cursor: pointer;
}

.filter-input::placeholder {
  color: #999;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #1a3a52;
  box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.15);
  transform: scale(1.01);
  background: #fefdfb;
  animation: glowPulse 1s ease-in-out;
}

.filter-input:hover,
.filter-select:hover {
  border-color: #0f2839;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.2);
}

.card {
  background: white;
  border-radius: 12px;
  padding: 40px;
  margin-bottom: 24px;
  border: 2px solid #e8e3da;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.08);
  animation: slideInUp 0.8s ease-out 0.2s both;
}

.card h2 {
  font-size: 28px;
  margin-bottom: 32px;
  color: #1a3a52;
  font-weight: 700;
  animation: slideInLeft 0.6s ease-out 0.3s both;
  letter-spacing: -0.5px;
}

.competitions-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
  animation: fadeIn 0.6s ease-out 0.3s both;
}

.competition-item {
  border: 2px solid #e8e3da;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.08);
  animation: slideInUp 0.6s ease-out both;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: visible;
}

.competition-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a3a52, #0f2839);
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: slideInRight 0.6s ease-out 0.2s backwards;
}

.competition-item:hover::before {
  opacity: 1;
  animation: glowPulse 1.5s ease-in-out;
}

.competition-item:hover {
  border-color: #1a3a52;
  box-shadow: 0 12px 24px rgba(26, 58, 82, 0.2);
  transform: translateY(-4px);
}

.competition-item:nth-child(1) {
  animation-delay: 0.1s;
}

.competition-item:nth-child(2) {
  animation-delay: 0.15s;
}

.competition-item:nth-child(3) {
  animation-delay: 0.2s;
}

.competition-item:nth-child(4) {
  animation-delay: 0.25s;
}

.competition-item:nth-child(5) {
  animation-delay: 0.3s;
}

.competition-item:nth-child(6) {
  animation-delay: 0.35s;
}

.competition-item:nth-child(7) {
  animation-delay: 0.4s;
}

.competition-item:nth-child(8) {
  animation-delay: 0.45s;
}

.competition-item:nth-child(9) {
  animation-delay: 0.5s;
}

.competition-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: slideInLeft 0.5s ease-out both;
}

.competition-title {
  font-size: 20px;
  font-weight: 700;
  color: #1a3a52;
  transition: color 0.3s ease;
  line-height: 1.4;
  flex: 1;
}

.competition-item:hover .competition-title {
  color: #1a3a52;
  animation: glowPulse 1s ease-in-out;
}

.competition-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  animation: slideInRight 0.5s ease-out 0.2s both;
}

.status-badge,
.level-badge,
.subject-badge,
.online-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  /* Animation removed for static display */
}

.status-active {
  background: #e8f0f6;
  color: #1a3a52;
  border-left: 3px solid #1a3a52;
}

.status-upcoming {
  background: #f0e8f6;
  color: #3f2654;
  border-left: 3px solid #3f2654;
}

.status-inactive {
  background: #f0f0f0;
  color: #666;
  border-left: 3px solid #999;
}

.level-badge {
  background: #e8f0f6;
  color: #1a3a52;
  border-left: 3px solid #1a3a52;
}

.subject-badge {
  background: #fef5e6;
  color: #6b4423;
  border-left: 3px solid #d4a574;
}

.online-badge {
  background: #e8f5f1;
  color: #1a4d3e;
  border-left: 3px solid #3a8b73;
}

.competition-details-quick {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  background: #faf8f3;
  border-radius: 10px;
  margin: 12px 0;
  border-left: 4px solid #1a3a52;
  transition: all 0.3s ease;
}

.competition-details-quick:hover {
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.2);
  /* Transform and animation removed - keeping box-shadow only */
}

/* Add responsive design for competition details */
@media (max-width: 768px) {
  .competition-details-quick {
    grid-template-columns: 1fr;
  }
}

.detail-item {
  font-size: 13px;
  color: #2d2d2d;
  margin-bottom: 8px;
  padding: 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  /* Animation removed */
}

.detail-item:nth-child(1) {
  /* Animation delay removed */
}

.detail-item:nth-child(2) {
  /* Animation delay removed */
}

.detail-item:nth-child(3) {
  /* Animation delay removed */
}

.detail-item:nth-child(4) {
  /* Animation delay removed */
}

.detail-label {
  color: #888;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.detail-item strong {
  color: #1a3a52;
  font-size: 15px;
  font-weight: 700;
}

.competition-description {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  animation: fadeIn 0.6s ease-out 0.3s both;
  transition: color 0.3s ease;
}

.competition-item:hover .competition-description {
  color: #1a3a52;
}

.competition-organizer {
  animation: fadeInUp 0.5s ease-out 0.5s both;
  color: #1a3a52;
  margin-top: 12px;
  padding: 8px 16px;
  transition: all 0.3s ease;
  background: #f5f2ed;
  border-radius: 6px;
  border-left: 2px solid #1a3a52;
  font-size: 13px;
}

.competition-item:hover .competition-organizer {
  color: #0f2839;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.15);
}

.competition-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.competition-actions .btn {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-size: 12px;
  padding: 10px 14px;
  white-space: nowrap;
  min-width: 0;
  width: 100%;
}

.competition-actions .btn:nth-child(1) {
  grid-column: 1;
}

.competition-actions .btn:nth-child(2) {
  grid-column: 2;
}

.competition-actions .btn:nth-child(3) {
  grid-column: 1;
}

.competition-actions .btn:nth-child(4) {
  grid-column: 2;
}

.competition-actions .btn:nth-child(5) {
  grid-column: 1;
}

.competition-actions .btn:nth-child(6) {
  grid-column: 2;
}

.competition-actions .btn:nth-child(7) {
  grid-column: 1 / -1;
}

.competition-actions .btn:hover {
  transform: translateY(-3px) scale(1.05);
}

/* Add mobile responsive for competition actions */
@media (max-width: 480px) {
  .competition-actions {
    grid-template-columns: 1fr;
  }

  .competition-actions .btn:nth-child(1) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(2) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(3) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(4) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(5) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(6) {
    grid-column: 1;
  }

  .competition-actions .btn:nth-child(7) {
    grid-column: 1;
  }
}

.btn-view-docs {
  background: #2d5f3f;
  color: white;
  box-shadow: 0 2px 8px rgba(45, 95, 63, 0.15);
}

.btn-view-docs:hover {
  background: #1f4329;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(45, 95, 63, 0.25);
}

.btn-view-participants {
  background: #4a6fa5;
  color: white;
  box-shadow: 0 2px 8px rgba(74, 111, 165, 0.15);
}

.btn-view-participants:hover {
  background: #3a5a8a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(74, 111, 165, 0.25);
}

/* Already added student styles in add students modal */
.student-already-added {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
  border-color: #c8d6c0;
  background: #f5f7f4;
}

.student-already-added:hover {
  transform: none;
  box-shadow: none;
}

.student-avatar-added {
  background: linear-gradient(135deg, #8a9e8a 0%, #6b836b 100%) !important;
  box-shadow: 0 2px 6px rgba(107, 131, 107, 0.3) !important;
}

.student-name-added {
  text-decoration: line-through;
  color: #7a8a7a !important;
}

.student-added-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #4a6a4a;
  background: #dce8dc;
  border-radius: 20px;
  letter-spacing: 0.3px;
}

/* Participants count */
.participants-count {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  padding: 8px 16px;
  background: #f0f4f8;
  border-radius: 8px;
  font-weight: 500;
}

/* Participant view item (no checkbox, no click) */
.participant-view-item {
  cursor: default;
}

.participant-view-item:hover {
  transform: none;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.1);
}

.btn-edit {
  background: #1a3a52;
  color: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.2);
}

.btn-edit:hover {
  background: #0f2839;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 16px rgba(26, 58, 82, 0.4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  animation: buttonHover 0.3s ease-out forwards;
}

.btn:active {
  animation: buttonActive 0.2s ease-out forwards;
}

.btn-primary {
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0f2839 0%, #1a3a52 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(26, 58, 82, 0.4);
}

.btn-secondary {
  background: white;
  color: #1a3a52;
  border: 2px solid #d4cfc4;
  box-shadow: 0 2px 4px rgba(26, 58, 82, 0.06);
}

.btn-secondary:hover {
  border-color: #1a3a52;
  background: #faf8f3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.15);
}

.btn-danger {
  background: #c41e3a;
  color: white;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.15);
}

.btn-danger:hover {
  background: #8b1528;
  transform: translateY(-2px);
  box-shadow: 0 4m 12px rgba(196, 30, 58, 0.25);
}

.btn-info {
  background: #1a3a52;
  color: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.2);
}

.btn-info:hover {
  background: #0f2839;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.4);
}

.btn-success {
  background: #2d5f3f;
  color: white;
  box-shadow: 0 2px 8px rgba(45, 95, 63, 0.15);
}

.btn-success:hover {
  background: #1f4329;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(45, 95, 63, 0.25);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  animation: scaleIn 0.4s ease-out;
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  animation: pulse 2s ease-in-out infinite;
}

.loading::after {
  content: "";
  display: inline-block;
  width: 40px;
  height: 40px;
  margin-left: 12px;
  border: 4px solid #d4cfc4;
  border-top-color: #1a3a52;
  border-radius: 50%;
  animation: rotate 1s linear infinite;
  vertical-align: middle;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  animation: fadeIn 6s ease-out;
}

.empty-state h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: #1a3a52;
  font-weight: 600;
  animation: slideInDown 0.5s ease-out;
}

.empty-state p {
  animation: slideInUp 0.5s ease-out 0.1s both;
  line-height: 1.6;
  color: #666;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: backdropFadeIn 0.4s ease-out forwards;
  transition: background-color 0.3s ease;
}

.modal.active {
  display: flex;
  animation: backdropFadeIn 0.4s ease-out forwards;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(26, 58, 82, 0.3);
  animation: slideInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  transform-origin: center;
}

.modal-large {
  max-width: 1100px;
}

.modal-extra-large {
  max-width: 1200px;
  max-height: 90vh;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 2px solid #e8e3da;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideInDown 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header h2 {
  font-size: 24px;
  color: #1a3a52;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #666;
  transition: all 0.3s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: #1a3a52;
  transform: rotate(90deg) scale(1.2);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  animation: fadeIn 0.5s ease-out 0.15s both;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 2px solid #e8e3da;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  animation: slideInUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.modal-tabs {
  display: flex;
  gap: 8px;
  padding: 0 24px 16px;
  border-bottom: 1px solid #e8e3da;
  animation: slideInDown 0.5s ease-out 0.2s both;
}

.tab-button {
  padding: 12px 20px;
  background: none;
  border: none;
  cursor: pointer;
  color: #666;
  font-weight: 600;
  font-size: 14px;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease-out both;
}

.tab-button:nth-child(1) {
  animation-delay: 0.1s;
}

.tab-button:nth-child(2) {
  animation-delay: 0.15s;
}

.tab-button:nth-child(3) {
  animation-delay: 0.2s;
}

.tab-button:hover {
  color: #1a3a52;
  transform: translateY(-2px);
}

.tab-button.active {
  color: #1a3a52;
  border-bottom-color: #1a3a52;
  animation: glowPulse 0.6s ease-in-out;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease-out 0.2s both;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: slideInUp 0.5s ease-out both;
  transition: all 0.3s ease;
}

.form-group label {
  font-weight: 600;
  color: #1a3a52;
  font-size: 14px;
  animation: fadeIn 0.5s ease-out both;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 2px solid #d4cfc4;
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  background: white;
  animation: slideInUp 0.4s ease-out both;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #1a3a52;
  box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.15);
  background: #faf8f3;
  transform: translateY(-2px);
  animation: glowPulse 0.8s ease-out;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  animation: slideInUp 0.5s ease-out both;
  transition: all 0.3s ease;
}

.form-row .form-group:nth-child(1) {
  animation-delay: 0.05s;
}

.form-row .form-group:nth-child(2) {
  animation-delay: 0.1s;
}

.form-row .form-group:nth-child(3) {
  animation-delay: 0.15s;
}

/* Додано стилі для student-item, student-avatar та student-info у модальному вікні */
.student-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 2px solid #e8e3da;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 12px;
}

.student-item:hover {
  border-color: #1a3a52;
  background: #faf8f3;
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(26, 58, 82, 0.15);
}

.student-item.selected {
  border-color: #1a3a52;
  background: #f0f4f8;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.2);
}

.student-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #1a3a52;
}

.student-avatar {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.3);
  transition: all 0.3s ease;
  overflow: hidden;
}

.student-item:hover .student-avatar {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(26, 58, 82, 0.4);
}

.student-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.student-info {
  flex: 1;
  min-width: 0;
}

.student-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 4px;
  transition: all 0.3s ease;
  word-wrap: break-word;
}

.student-item:hover .student-name {
  color: #0f2839;
}

.student-grade {
  font-size: 13px;
  color: #666;
}

.grade-group {
  margin-bottom: 24px;
}

.grade-group h4 {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a52;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8e3da;
}

/* Added animations for response items and their sub-elements */
.response-item {
  border: 2px solid #e8e3da;
  border-radius: 12px;
  padding: 24px;
  background: white;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 20px;
  animation: slideInUp 0.6s ease-out both;
  opacity: 0;
}

.response-item:nth-child(1) {
  animation-delay: 0.1s;
}

.response-item:nth-child(2) {
  animation-delay: 0.15s;
}

.response-item:nth-child(3) {
  animation-delay: 0.2s;
}

.response-item:nth-child(4) {
  animation-delay: 0.25s;
}

.response-item:nth-child(5) {
  animation-delay: 0.3s;
}

.response-item:nth-child(6) {
  animation-delay: 0.35s;
}

.response-item:nth-child(7) {
  animation-delay: 0.4s;
}

.response-item:nth-child(8) {
  animation-delay: 0.45s;
}

.response-item:nth-child(9) {
  animation-delay: 0.5s;
}

.response-item:nth-child(10) {
  animation-delay: 0.55s;
}

.response-item:hover {
  border-color: #1a3a52;
  box-shadow: 0 8px 20px rgba(26, 58, 82, 0.15);
  transform: translateY(-4px);
}

.response-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f0f0f0;
  animation: slideInLeft 0.5s ease-out 0.2s both;
}

.response-student-info {
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeInUp 0.5s ease-out 0.3s both;
}

.response-avatar,
.response-avatar-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.3);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: scaleInBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.response-avatar-img {
  object-fit: cover;
}

.response-item:hover .response-avatar,
.response-item:hover .response-avatar-img {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 8px 20px rgba(26, 58, 82, 0.5);
}

.response-student-details h4 {
  margin: 0;
  color: #1a3a52;
  font-size: 18px;
  font-weight: 700;
  animation: slideInRight 0.5s ease-out 0.35s both;
}

.response-student-details p {
  margin: 4px 0 0;
  color: #666;
  font-size: 14px;
  animation: fadeIn 0.5s ease-out 0.4s both;
}

.response-date {
  color: #666;
  font-size: 14px;
  animation: slideInRight 0.5s ease-out 0.45s both;
  transition: all 0.3s ease;
}

.response-item:hover .response-date {
  color: #1a3a52;
  transform: translateX(-4px);
}

.response-body {
  animation: fadeInUp 0.6s ease-out 0.5s both;
}

.response-body h4 {
  margin-bottom: 16px;
  color: #1a3a52;
  font-size: 16px;
  font-weight: 700;
  animation: slideInLeft 0.5s ease-out 0.55s both;
}

.response-field {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #faf8f3;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 3px solid #1a3a52;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: slideInUp 0.4s ease-out both;
}

.response-field:nth-child(1) {
  animation-delay: 0.6s;
}

.response-field:nth-child(2) {
  animation-delay: 0.65s;
}

.response-field:nth-child(3) {
  animation-delay: 0.7s;
}

.response-field:nth-child(4) {
  animation-delay: 0.75s;
}

.response-field:nth-child(5) {
  animation-delay: 0.8s;
}

.response-field:nth-child(6) {
  animation-delay: 0.85s;
}

.response-field:nth-child(7) {
  animation-delay: 0.9s;
}

.response-field:nth-child(8) {
  animation-delay: 0.95s;
}

.response-field:hover {
  background: #f0f4f8;
  border-left-color: #0f2839;
  transform: translateX(6px);
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.12);
}

.response-field-label {
  font-weight: 700;
  color: #1a3a52;
  min-width: 150px;
  font-size: 14px;
}

.response-field-value {
  color: #2d2d2d;
  flex: 1;
  font-size: 14px;
  word-break: break-word;
}

.responses-container {
  animation: fadeIn 0.5s ease-out;
}

.responses-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  animation: slideInDown 0.5s ease-out 0.2s both;
}

.responses-filters .filter-input {
  flex: 1;
  animation: slideInLeft 0.5s ease-out 0.25s both;
}

.responses-filters .btn {
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

/* ==================== RESPONSIVE STYLES ==================== */

/* Tablet - 1024px and below */
@media (max-width: 1024px) {
  .main-container {
    padding: 40px 16px;
    margin-top: 30px;
  }

  .page-header h1 {
    font-size: 36px;
  }

  .subtitle {
    font-size: 16px;
  }

  .card {
    padding: 32px;
  }

  .card h2 {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .competitions-list {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
  }

  .btn-add-competition {
    padding: 12px 28px;
    font-size: 15px;
  }

  .modal-content {
    max-width: 90%;
  }

  .modal-large {
    max-width: 95%;
  }

  .modal-extra-large {
    max-width: 98%;
  }
}

/* Tablet Portrait - 768px and below */
@media (max-width: 768px) {
  .main-container {
    padding: 30px 16px;
    margin-top: 20px;
  }

  .page-header {
    margin-bottom: 30px;
  }

  .page-header h1 {
    font-size: 30px;
  }

  .subtitle {
    font-size: 15px;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0 8px;
    line-height: 1.5;
  }

  .filters-section {
    margin-bottom: 20px;
  }

  .btn-add-competition {
    padding: 12px 24px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 12px;
  }

  .filters-row {
    flex-direction: column;
    gap: 10px;
  }

  .filter-input,
  .filter-select {
    width: 100%;
    padding: 10px 14px;
  }

  .card {
    padding: 24px;
    border-radius: 10px;
  }

  .card h2 {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .competitions-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .competition-item {
    padding: 20px;
  }

  .competition-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .competition-title {
    font-size: 18px;
  }

  .competition-badges {
    flex-wrap: wrap;
  }

  .status-badge,
  .level-badge,
  .subject-badge,
  .online-badge {
    font-size: 11px;
    padding: 5px 10px;
  }

  .competition-details-quick {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 10px;
  }

  .detail-item {
    font-size: 12px;
    padding: 6px 0;
  }

  .detail-item strong {
    font-size: 14px;
  }

  .competition-description {
    font-size: 13px;
  }

  .competition-organizer {
    font-size: 12px;
    padding: 6px 12px;
  }

  .competition-actions {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .competition-actions .btn {
    grid-column: 1 !important;
    font-size: 12px;
    padding: 10px 12px;
  }

  /* Modal styles for tablet */
  .modal-content {
    width: 95%;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
  }

  .modal-large,
  .modal-extra-large {
    max-width: 100%;
    max-height: 95vh;
  }

  .modal-header {
    padding: 16px 20px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-footer {
    padding: 16px 20px;
    flex-wrap: wrap;
  }

  .modal-tabs {
    padding: 0 16px 12px;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  /* Form styles for tablet */
  .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px 14px;
    font-size: 14px;
  }

  /* Student items in modal */
  .student-item {
    padding: 14px;
    gap: 12px;
  }

  .student-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    font-size: 16px;
  }

  .student-name {
    font-size: 15px;
  }

  .student-grade {
    font-size: 12px;
  }

  /* Response items */
  .response-item {
    padding: 20px;
  }

  .response-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .response-avatar,
  .response-avatar-img {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }

  .response-student-details h4 {
    font-size: 16px;
  }

  .response-field {
    flex-direction: column;
    gap: 6px;
    padding: 10px;
  }

  .response-field-label {
    min-width: auto;
    font-size: 13px;
  }

  .response-field-value {
    font-size: 13px;
  }

  .responses-filters {
    flex-direction: column;
    gap: 10px;
  }

  /* Button styles */
  .btn {
    padding: 10px 18px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Mobile - 480px and below */
@media (max-width: 480px) {
  .main-container {
    padding: 20px 12px;
    margin-top: 15px;
  }

  .page-header {
    margin-bottom: 24px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .subtitle {
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    padding: 0 4px;
    line-height: 1.4;
  }

  .btn-add-competition {
    padding: 10px 20px;
    font-size: 13px;
  }

  .filter-input,
  .filter-select {
    padding: 10px 12px;
    font-size: 13px;
  }

  .card {
    padding: 16px;
    border-radius: 8px;
  }

  .card h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .competition-item {
    padding: 16px;
    gap: 12px;
    border-radius: 10px;
  }

  .competition-item::before {
    height: 3px;
  }

  .competition-title {
    font-size: 16px;
  }

  .competition-badges {
    gap: 6px;
  }

  .status-badge,
  .level-badge,
  .subject-badge,
  .online-badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
  }

  .competition-details-quick {
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
  }

  .detail-item {
    font-size: 11px;
    gap: 6px;
  }

  .detail-label {
    font-size: 10px;
  }

  .detail-item strong {
    font-size: 13px;
  }

  .competition-description {
    font-size: 12px;
    line-height: 1.5;
  }

  .competition-organizer {
    font-size: 11px;
    padding: 6px 10px;
    margin-top: 10px;
  }

  .competition-actions .btn {
    font-size: 11px;
    padding: 8px 10px;
  }

  /* Modal styles for mobile */
  .modal-content {
    width: 100%;
    border-radius: 10px;
    margin: 8px;
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .modal-close {
    font-size: 24px;
    width: 28px;
    height: 28px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    gap: 8px;
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .modal-tabs {
    padding: 0 12px 10px;
    gap: 2px;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Form styles for mobile */
  .form-group {
    gap: 6px;
  }

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select {
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 8px;
  }

  /* Student items */
  .student-item {
    padding: 12px;
    gap: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
  }

  .student-checkbox {
    width: 18px;
    height: 18px;
  }

  .student-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    font-size: 14px;
  }

  .student-name {
    font-size: 14px;
  }

  .student-grade {
    font-size: 11px;
  }

  .grade-group h4 {
    font-size: 13px;
  }

  /* Response items for mobile */
  .response-item {
    padding: 16px;
    border-radius: 10px;
  }

  .response-student-info {
    gap: 12px;
  }

  .response-avatar,
  .response-avatar-img {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }

  .response-student-details h4 {
    font-size: 15px;
  }

  .response-student-details p {
    font-size: 12px;
  }

  .response-date {
    font-size: 12px;
  }

  .response-body h4 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .response-field {
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 6px;
  }

  .response-field-label {
    font-size: 12px;
  }

  .response-field-value {
    font-size: 12px;
  }

  /* Button styles */
  .btn {
    padding: 10px 16px;
    font-size: 12px;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 11px;
  }

  /* Loading and empty states */
  .loading {
    padding: 40px 16px;
    font-size: 14px;
  }

  .loading::after {
    width: 32px;
    height: 32px;
    border-width: 3px;
  }

  .empty-state {
    padding: 40px 16px;
  }

  .empty-state h3 {
    font-size: 18px;
  }

  .empty-state p {
    font-size: 13px;
  }
}

/* Small Mobile - 360px and below */
@media (max-width: 360px) {
  .main-container {
    padding: 16px 8px;
    margin-top: 10px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 13px;
  }

  .card {
    padding: 12px;
  }

  .card h2 {
    font-size: 16px;
  }

  .competition-item {
    padding: 12px;
  }

  .competition-title {
    font-size: 15px;
  }

  .competition-details-quick {
    padding: 10px;
  }

  .modal-header {
    padding: 12px;
  }

  .modal-header h2 {
    font-size: 16px;
  }

  .modal-body {
    padding: 12px;
  }

  .modal-footer {
    padding: 10px 12px;
  }

  .student-item {
    padding: 10px;
  }

  .student-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 12px;
  }

  .response-item {
    padding: 12px;
  }

  .response-avatar,
  .response-avatar-img {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

/* ==================== COMPETITIONS TABS ==================== */

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

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 0.6;
  }
  100% {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes subscribePulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes subscribeCheck {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.3) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes unsubscribeShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  40% {
    transform: translateX(3px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}

@keyframes badgeAppear {
  0% {
    opacity: 0;
    transform: translateX(20px) rotate(45deg) scale(0.5);
  }
  60% {
    transform: translateX(-2px) rotate(45deg) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateX(0) rotate(45deg) scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

.competitions-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: white;
  padding: 6px;
  border-radius: 12px;
  border: 2px solid #e8e3da;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.06);
  animation: tabSlideIn 0.5s ease-out 0.1s both;
}

.competitions-tab {
  flex: 1;
  padding: 14px 24px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.competitions-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  opacity: 0;
  background: radial-gradient(
    circle at var(--x, 50%) var(--y, 50%),
    rgba(26, 58, 82, 0.08) 0%,
    transparent 70%
  );
  transition: opacity 0.3s ease;
}

.competitions-tab:hover::after {
  opacity: 1;
}

.competitions-tab:hover {
  color: #1a3a52;
  background: #faf8f3;
  transform: translateY(-1px);
}

.competitions-tab.active {
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(26, 58, 82, 0.35);
  transform: translateY(-1px);
}

.competitions-tab.active:hover {
  box-shadow: 0 6px 20px rgba(26, 58, 82, 0.45);
  transform: translateY(-2px);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  transition: all 0.3s ease;
  animation: scaleInBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.competitions-tab:not(.active) .tab-count {
  background: #e8e3da;
  color: #1a3a52;
}

.card-subtitle {
  color: #888;
  font-size: 14px;
  margin-top: -20px;
  margin-bottom: 24px;
  animation: fadeIn 0.6s ease-out 0.4s both;
}

/* ==================== SUBSCRIBE / UNSUBSCRIBE BUTTONS ==================== */

.btn-subscribe {
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4d2e 100%);
  color: white;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(45, 95, 63, 0.35);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-subscribe::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition:
    width 0.5s ease,
    height 0.5s ease;
}

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

.btn-subscribe:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(45, 95, 63, 0.5);
  background: linear-gradient(135deg, #1a4d2e 0%, #2d5f3f 100%);
  animation: subscribePulse 0.6s ease-in-out;
}

.btn-subscribe:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(45, 95, 63, 0.3);
}

.btn-subscribe .btn-icon-animate {
  display: inline-block;
  transition: transform 0.3s ease;
  font-weight: 700;
}

.btn-subscribe:hover .btn-icon-animate {
  animation: subscribeCheck 0.5s ease-out;
}

.btn-unsubscribe {
  background: linear-gradient(135deg, #c41e3a 0%, #8b1528 100%);
  color: white;
  font-weight: 600;
  font-size: 12px;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(196, 30, 58, 0.25);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.btn-unsubscribe::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition:
    width 0.5s ease,
    height 0.5s ease;
}

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

.btn-unsubscribe:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(196, 30, 58, 0.4);
  background: linear-gradient(135deg, #8b1528 0%, #c41e3a 100%);
}

.btn-unsubscribe:hover .btn-icon-animate {
  animation: unsubscribeShake 0.4s ease-out;
}

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

.btn-icon-animate {
  display: inline-block;
  margin-right: 4px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

/* ==================== SUBSCRIBED ITEM STYLES ==================== */

.subscribed-item {
  border-color: #2d5f3f;
  background: linear-gradient(135deg, #f8fdf9 0%, #ffffff 100%);
  box-shadow: 0 4px 16px rgba(45, 95, 63, 0.12);
  position: relative;
  overflow: hidden;
}

.subscribed-item::before {
  background: linear-gradient(90deg, #2d5f3f, #1a4d2e) !important;
  opacity: 1 !important;
}

.subscribed-item:hover {
  border-color: #1a4d2e;
  box-shadow: 0 12px 28px rgba(45, 95, 63, 0.22);
}

.subscribed-badge-corner {
  position: absolute;
  top: -2px;
  right: -2px;
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4d2e 100%);
  color: white;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 6px 24px 6px 12px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 20% 100%);
  z-index: 2;
  animation: badgeAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  box-shadow: -2px 2px 6px rgba(45, 95, 63, 0.3);
}

/* ==================== RESPONSIVE FOR NEW STYLES ==================== */

@media (max-width: 768px) {
  .competitions-tabs {
    padding: 4px;
    gap: 2px;
  }

  .competitions-tab {
    padding: 12px 16px;
    font-size: 13px;
  }

  .tab-count {
    min-width: 20px;
    height: 20px;
    font-size: 11px;
    padding: 0 6px;
  }

  .btn-subscribe {
    padding: 10px 16px;
    font-size: 12px;
    letter-spacing: 0.5px;
  }

  .btn-unsubscribe {
    padding: 8px 14px;
    font-size: 11px;
  }

  .subscribed-badge-corner {
    font-size: 9px;
    padding: 5px 20px 5px 10px;
  }

  .card-subtitle {
    margin-top: -16px;
    margin-bottom: 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .competitions-tabs {
    flex-direction: row;
    padding: 3px;
  }

  .competitions-tab {
    padding: 10px 12px;
    font-size: 12px;
    gap: 6px;
  }

  .tab-count {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
    padding: 0 5px;
  }

  .btn-subscribe {
    padding: 10px 14px;
    font-size: 11px;
    letter-spacing: 0.3px;
  }

  .btn-unsubscribe {
    padding: 8px 12px;
    font-size: 10px;
  }

  .subscribed-badge-corner {
    font-size: 8px;
    padding: 4px 16px 4px 8px;
  }

  .card-subtitle {
    margin-top: -12px;
    margin-bottom: 16px;
    font-size: 12px;
  }
}

/* ==================== ANIMATED MODAL STYLES ==================== */

@keyframes modalSlideUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalBackdropIn {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background: rgba(10, 25, 40, 0.55);
    backdrop-filter: blur(6px);
  }
}

@keyframes fieldSlideIn {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.modal-animated {
  animation: modalSlideUp 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Override backdrop for new modals */
#studentFormViewModal.active,
#competitionResultsModal.active,
#competitionDetailsModal.active {
  animation: modalBackdropIn 0.35s ease-out forwards !important;
}

/* ==================== DETAILS BUTTON ==================== */

.btn-details {
  background: linear-gradient(135deg, #1a3a52 0%, #2d5f8a 100%);
  color: white;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(26, 58, 82, 0.3);
  position: relative;
  overflow: hidden;
  border: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-details::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: left 0.6s ease;
}

.btn-details:hover::after {
  left: 100%;
}

.btn-details:hover {
  background: linear-gradient(135deg, #0f2839 0%, #1a4570 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(26, 58, 82, 0.45);
}

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

/* ==================== DETAILS MODAL CONTENT ==================== */

.details-modal-header {
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  color: white;
  padding: 24px 28px;
  border-radius: 16px 16px 0 0;
}

.details-modal-header h2 {
  color: white;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.details-modal-header .modal-close {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.details-modal-header .modal-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

/* ---- Hero Section ---- */

.details-hero {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e8e3da;
  animation: fadeInUp 0.4s ease-out both;
}

.details-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.details-description {
  font-size: 15px;
  line-height: 1.65;
  color: #4a4a4a;
  margin: 0;
}

/* ---- Info Grid ---- */

@keyframes detailCardIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.details-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.details-info-card {
  background: #faf8f3;
  border-radius: 14px;
  padding: 18px 16px;
  text-align: center;
  border: 1px solid #e8e3da;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: detailCardIn 0.45s ease-out both;
}

.details-info-card:hover {
  background: #f0f4f8;
  border-color: #1a3a52;
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(26, 58, 82, 0.12);
}

.details-info-card-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.details-info-card-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.details-info-card-value {
  font-size: 15px;
  font-weight: 700;
  color: #1a3a52;
}

/* ---- Section Blocks ---- */

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

.details-section-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 12px;
  background: #faf8f3;
  border-radius: 14px;
  border-left: 4px solid #1a3a52;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: sectionBlockIn 0.45s ease-out both;
}

.details-section-block:hover {
  background: #f0f4f8;
  border-left-color: #0f2839;
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(26, 58, 82, 0.1);
}

.details-section-icon {
  font-size: 26px;
  min-width: 36px;
  text-align: center;
  padding-top: 2px;
}

.details-section-title {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.details-section-text {
  font-size: 15px;
  color: #2d2d2d;
  line-height: 1.55;
}

/* ---- Custom Fields in Detail ---- */

.details-custom-fields {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid #e8e3da;
  animation: fadeInUp 0.5s ease-out both;
  animation-delay: 0.3s;
}

.details-section-heading {
  font-size: 18px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 14px;
}

.details-fields-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.details-field-item {
  padding: 14px 18px;
  background: #faf8f3;
  border-radius: 10px;
  border-left: 3px solid #2d5f8a;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  animation: fieldSlideIn 0.4s ease-out both;
  transition: all 0.3s ease;
}

.details-field-item:hover {
  background: #f0f4f8;
  transform: translateX(4px);
}

.details-field-item strong {
  color: #1a3a52;
  font-size: 14px;
}

/* ---- Contact Section in Detail ---- */

.details-contact-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.details-contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #faf8f3;
  border-radius: 10px;
  animation: fieldSlideIn 0.4s ease-out both;
}

.details-contact-item a {
  color: #2d5f8a;
  text-decoration: none;
  font-weight: 600;
}

.details-contact-item a:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .details-modal-header {
    padding: 18px 20px;
  }

  .details-modal-header h2 {
    font-size: 18px;
  }

  .details-info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .details-info-card {
    padding: 14px 12px;
  }

  .details-info-card-icon {
    font-size: 24px;
  }

  .details-info-card-value {
    font-size: 13px;
  }

  .details-section-block {
    padding: 14px 16px;
    gap: 12px;
  }

  .btn-details {
    font-size: 12px;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .details-info-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .details-info-card {
    padding: 12px 10px;
  }

  .details-info-card-icon {
    font-size: 20px;
  }

  .details-info-card-label {
    font-size: 10px;
  }

  .details-info-card-value {
    font-size: 12px;
  }

  .details-section-block {
    padding: 12px;
    gap: 10px;
  }

  .details-section-icon {
    font-size: 22px;
    min-width: 28px;
  }

  .btn-details {
    font-size: 11px;
    padding: 8px 12px;
  }
}

/* ==================== FORM PREVIEW STYLES ==================== */

.form-preview-section {
  margin-bottom: 28px;
  animation: fadeInUp 0.5s ease-out both;
}

.form-preview-section:nth-child(2) {
  animation-delay: 0.15s;
}

.form-preview-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8e3da;
}

.form-preview-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 4px;
}

.form-preview-header p {
  font-size: 14px;
  color: #888;
}

.form-preview-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-preview-field {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #faf8f3;
  border-radius: 12px;
  border-left: 4px solid #1a3a52;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fieldSlideIn 0.45s ease-out both;
}

.form-preview-field:nth-child(1) {
  animation-delay: 0.05s;
}
.form-preview-field:nth-child(2) {
  animation-delay: 0.1s;
}
.form-preview-field:nth-child(3) {
  animation-delay: 0.15s;
}
.form-preview-field:nth-child(4) {
  animation-delay: 0.2s;
}
.form-preview-field:nth-child(5) {
  animation-delay: 0.25s;
}
.form-preview-field:nth-child(6) {
  animation-delay: 0.3s;
}

.form-preview-field:hover {
  background: #f0f4f8;
  border-left-color: #0f2839;
  transform: translateX(6px);
  box-shadow: 0 4px 16px rgba(26, 58, 82, 0.12);
}

.form-preview-icon {
  font-size: 24px;
  min-width: 36px;
  text-align: center;
}

.form-preview-field div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.form-preview-field strong {
  font-size: 15px;
  color: #1a3a52;
  font-weight: 700;
}

.form-preview-field small {
  font-size: 13px;
  color: #888;
}

.form-preview-placeholder {
  color: #aaa !important;
  font-style: italic;
}

/* ==================== FORM STUDENTS BUTTON ==================== */

.btn-form-students {
  background: linear-gradient(135deg, #2d5f8a 0%, #1a4570 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(45, 95, 138, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-form-students::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition:
    width 0.45s ease,
    height 0.45s ease;
}

.btn-form-students:hover::before {
  width: 250px;
  height: 250px;
}

.btn-form-students:hover {
  background: linear-gradient(135deg, #1a4570 0%, #2d5f8a 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(45, 95, 138, 0.4);
}

/* ==================== RESULTS BUTTON ==================== */

.btn-results {
  background: linear-gradient(135deg, #8a6d2d 0%, #6b5422 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(138, 109, 45, 0.25);
  position: relative;
  overflow: hidden;
}

.btn-results::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transform: translate(-50%, -50%);
  transition:
    width 0.45s ease,
    height 0.45s ease;
}

.btn-results:hover::before {
  width: 250px;
  height: 250px;
}

.btn-results:hover {
  background: linear-gradient(135deg, #6b5422 0%, #8a6d2d 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 20px rgba(138, 109, 45, 0.4);
}

/* ==================== RESULTS TABLE IN MODAL ==================== */

.results-list-modal {
  animation: fadeIn 0.4s ease-out;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.08);
}

.results-table thead tr {
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
}

.results-table th {
  padding: 14px 20px;
  color: white;
  font-weight: 700;
  font-size: 14px;
  text-align: left;
  letter-spacing: 0.3px;
}

.results-table tbody tr {
  transition: all 0.3s ease;
  animation: resultRowIn 0.4s ease-out both;
}

.results-table tbody tr:nth-child(even) {
  background: #faf8f3;
}

.results-table tbody tr:hover {
  background: #f0f4f8;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(26, 58, 82, 0.1);
}

.results-table td {
  padding: 14px 20px;
  font-size: 14px;
  color: #2d2d2d;
  border-bottom: 1px solid #e8e3da;
}

.place-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 14px;
  background: #e8e3da;
  color: #666;
  transition: all 0.3s ease;
}

.place-badge.place-1 {
  background: linear-gradient(135deg, #ffd700 0%, #ffc107 100%);
  color: #5a4800;
  box-shadow: 0 3px 10px rgba(255, 193, 7, 0.4);
}

.place-badge.place-2 {
  background: linear-gradient(135deg, #c0c0c0 0%, #9e9e9e 100%);
  color: #444;
  box-shadow: 0 3px 10px rgba(158, 158, 158, 0.4);
}

.place-badge.place-3 {
  background: linear-gradient(135deg, #cd7f32 0%, #a0522d 100%);
  color: white;
  box-shadow: 0 3px 10px rgba(160, 82, 45, 0.4);
}

.result-status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  background: #e8f0f6;
  color: #1a3a52;
}

.result-row {
  animation: resultRowIn 0.4s ease-out both;
}

.results-empty {
  padding: 48px 24px;
}

/* ==================== RESPONSIVE FOR NEW STYLES ==================== */

@media (max-width: 768px) {
  .form-preview-field {
    padding: 14px 16px;
    gap: 12px;
  }

  .form-preview-icon {
    font-size: 20px;
    min-width: 28px;
  }

  .form-preview-field strong {
    font-size: 14px;
  }

  .form-preview-field small {
    font-size: 12px;
  }

  .results-table th,
  .results-table td {
    padding: 10px 14px;
    font-size: 13px;
  }

  .place-badge {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }

  .btn-form-students,
  .btn-results {
    font-size: 12px;
    padding: 10px 14px;
  }
}

@media (max-width: 480px) {
  .form-preview-field {
    padding: 12px;
    gap: 10px;
    border-radius: 8px;
  }

  .form-preview-header h3 {
    font-size: 17px;
  }

  .results-table th,
  .results-table td {
    padding: 8px 10px;
    font-size: 12px;
  }

  .place-badge {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }

  .btn-form-students,
  .btn-results {
    font-size: 11px;
    padding: 8px 10px;
  }
}

/* ==================== DOCUMENTS MODAL ==================== */

#viewDocumentsModal.active {
  animation: modalBackdropIn 0.35s ease-out forwards !important;
}

.docs-modal-header {
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4329 100%);
  color: white;
  padding: 22px 28px;
  border-radius: 16px 16px 0 0;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-modal-header h2 {
  color: white;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.docs-header-stats {
  display: flex;
  gap: 16px;
  animation: fadeIn 0.5s ease-out 0.3s both;
}

.docs-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(4px);
  animation: scaleIn 0.4s ease-out 0.4s both;
}

.docs-stat-chip-num {
  font-weight: 800;
  color: white;
}

.docs-modal-header .modal-close {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.docs-modal-header .modal-close:hover {
  color: white;
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg);
}

.docs-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.docs-footer-info {
  font-size: 13px;
  color: #888;
  animation: fadeIn 0.5s ease-out 0.2s both;
}

/* ---- Upload Section ---- */

@keyframes uploadFormSlide {
  from {
    opacity: 0;
    max-height: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
    margin-bottom: 0;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

.docs-upload-section {
  margin-bottom: 20px;
  border: 2px solid #e8e3da;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  animation: fadeInUp 0.4s ease-out both;
  transition: border-color 0.3s ease;
}

.docs-upload-section:hover {
  border-color: #2d5f3f;
}

.docs-upload-section.open {
  border-color: #2d5f3f;
  box-shadow: 0 4px 20px rgba(45, 95, 63, 0.12);
}

.docs-upload-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: #2d5f3f;
  transition: all 0.3s ease;
  user-select: none;
}

.docs-upload-toggle:hover {
  background: #f0f7f2;
}

.docs-upload-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4329 100%);
  color: white;
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.docs-upload-section.open .docs-upload-toggle-icon {
  transform: rotate(45deg);
}

.docs-upload-form {
  display: none;
  padding: 0 20px 20px;
  flex-direction: column;
  gap: 16px;
}

.docs-upload-section.open .docs-upload-form {
  display: flex;
  animation: fadeInUp 0.35s ease-out;
}

.docs-upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.docs-upload-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.docs-upload-field label {
  font-size: 13px;
  font-weight: 700;
  color: #1a3a52;
}

.docs-upload-select,
.docs-upload-textarea {
  padding: 10px 14px;
  border: 2px solid #d4cfc4;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  color: #2d2d2d;
  background: white;
  transition: all 0.3s ease;
}

.docs-upload-select:focus,
.docs-upload-textarea:focus {
  outline: none;
  border-color: #2d5f3f;
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.12);
}

.docs-upload-textarea {
  resize: vertical;
  min-height: 48px;
}

/* Drop zone */
.docs-upload-drop-zone {
  position: relative;
  border: 2px dashed #c8d6c0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.35s ease;
  background: #fafcf9;
}

.docs-upload-drop-zone:hover,
.docs-upload-drop-zone.drag-over {
  border-color: #2d5f3f;
  background: #f0f7f2;
  transform: scale(1.01);
}

.docs-upload-drop-zone.drag-over {
  box-shadow: 0 0 0 4px rgba(45, 95, 63, 0.15);
}

.docs-upload-hidden-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.docs-drop-content {
  pointer-events: none;
}

.docs-drop-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.7;
}

.docs-drop-text {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.docs-drop-link {
  color: #2d5f3f;
  font-weight: 700;
  text-decoration: underline;
}

.docs-drop-hint {
  font-size: 12px;
  color: #aaa;
}

.docs-drop-file-info {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 16px;
  background: #e8f5f1;
  border-radius: 8px;
  animation: scaleIn 0.3s ease-out;
}

.docs-drop-file-name {
  font-size: 14px;
  font-weight: 600;
  color: #2d5f3f;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-drop-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #c41e3a;
  transition: transform 0.2s ease;
  line-height: 1;
}

.docs-drop-file-remove:hover {
  transform: scale(1.2);
}

/* Upload progress */
.docs-upload-progress {
  border-radius: 8px;
  overflow: hidden;
}

.docs-progress-bar {
  width: 100%;
  height: 6px;
  background: #e8e3da;
  border-radius: 3px;
  overflow: hidden;
}

.docs-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2d5f3f, #3a8b60);
  border-radius: 3px;
  transition: width 0.3s ease;
  animation: shimmer 1.5s linear infinite;
  background-size: 200% 100%;
}

.docs-progress-text {
  font-size: 12px;
  color: #2d5f3f;
  margin-top: 6px;
  font-weight: 600;
}

/* Upload button */
.docs-upload-btn {
  padding: 12px 28px;
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4329 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 14px rgba(45, 95, 63, 0.3);
  align-self: flex-start;
}

.docs-upload-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(45, 95, 63, 0.4);
  background: linear-gradient(135deg, #1a4329 0%, #2d5f3f 100%);
}

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

.docs-upload-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: 0 2px 8px rgba(45, 95, 63, 0.15);
}

/* ---- Filters Bar ---- */

.docs-filters-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeInUp 0.4s ease-out both;
}

.docs-search-wrap {
  flex: 1;
  position: relative;
}

.docs-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #999;
  pointer-events: none;
}

.docs-search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid #d4cfc4;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #2d2d2d;
  background: white;
  transition: all 0.3s ease;
}

.docs-search-input:focus {
  outline: none;
  border-color: #2d5f3f;
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.12);
}

.docs-search-input::placeholder {
  color: #aaa;
}

.docs-filter-select {
  min-width: 180px;
  padding: 12px 16px;
  border: 2px solid #d4cfc4;
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: #2d2d2d;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.docs-filter-select:focus {
  outline: none;
  border-color: #2d5f3f;
  box-shadow: 0 0 0 3px rgba(45, 95, 63, 0.12);
}

/* ---- Empty State ---- */

.docs-empty-state {
  text-align: center;
  padding: 56px 24px;
  animation: fadeInUp 0.5s ease-out both;
}

.docs-empty-icon {
  font-size: 56px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.docs-empty-state h3 {
  font-size: 20px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 8px;
}

.docs-empty-state p {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
}

/* ---- Student Groups ---- */

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

.docs-list-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.docs-student-group {
  background: white;
  border: 2px solid #e8e3da;
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  animation: docGroupIn 0.5s ease-out both;
}

.docs-student-group:hover {
  border-color: #2d5f3f;
  box-shadow: 0 6px 20px rgba(45, 95, 63, 0.1);
}

.docs-student-group.collapsed .docs-file-list {
  max-height: 0;
  padding: 0 20px;
  opacity: 0;
  overflow: hidden;
}

.docs-student-group.collapsed .docs-student-toggle {
  transform: rotate(-90deg);
}

/* ---- Student Header ---- */

.docs-student-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.25s ease;
  user-select: none;
}

.docs-student-header:hover {
  background: #f8f6f1;
}

.docs-student-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2d5f3f 0%, #1a4329 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(45, 95, 63, 0.25);
}

.docs-student-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.docs-student-avatar span {
  color: white;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.docs-student-info {
  flex: 1;
  min-width: 0;
}

.docs-student-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a52;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.docs-student-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.docs-meta-tag {
  font-size: 12px;
  color: #777;
  background: #f0ede6;
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.docs-student-toggle {
  font-size: 14px;
  color: #999;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

/* ---- File List ---- */

.docs-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 20px 16px;
  max-height: 600px;
  opacity: 1;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.4s ease,
    opacity 0.3s ease;
}

@keyframes fileCardIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.docs-file-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #faf8f3;
  border-radius: 10px;
  border-left: 3px solid #2d5f3f;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fileCardIn 0.4s ease-out both;
}

.docs-file-card:hover {
  background: #f0f4f1;
  border-left-color: #1a4329;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(45, 95, 63, 0.1);
}

.docs-file-icon {
  font-size: 26px;
  min-width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.docs-file-info {
  flex: 1;
  min-width: 0;
}

.docs-file-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
}

.docs-file-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: #999;
}

.docs-file-desc {
  font-size: 12px;
  color: #777;
  margin-top: 4px;
  font-style: italic;
}

/* ---- Action Buttons ---- */

.docs-file-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.docs-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #e8e3da;
  color: #555;
}

.docs-action-btn:hover {
  transform: translateY(-2px) scale(1.1);
}

.docs-btn-preview {
  background: #e8f0f6;
  color: #1a3a52;
}

.docs-btn-preview:hover {
  background: #1a3a52;
  color: white;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.3);
}

.docs-btn-download {
  background: #e8f5f1;
  color: #2d5f3f;
}

.docs-btn-download:hover {
  background: #2d5f3f;
  color: white;
  box-shadow: 0 4px 12px rgba(45, 95, 63, 0.3);
}

.docs-btn-delete {
  background: #fce8ec;
  color: #c41e3a;
}

.docs-btn-delete:hover {
  background: #c41e3a;
  color: white;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .docs-filters-bar {
    flex-direction: column;
  }

  .docs-filter-select {
    min-width: 100%;
  }

  .docs-student-header {
    padding: 14px 16px;
    gap: 10px;
  }

  .docs-student-avatar {
    width: 38px;
    height: 38px;
  }

  .docs-student-avatar span {
    font-size: 13px;
  }

  .docs-student-name {
    font-size: 14px;
  }

  .docs-file-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .docs-file-icon {
    font-size: 22px;
    min-width: 28px;
  }

  .docs-file-name {
    font-size: 13px;
  }

  .docs-file-meta {
    flex-direction: column;
    gap: 2px;
  }

  .docs-action-btn {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .docs-modal-header {
    padding: 18px 20px;
  }

  .docs-modal-header h2 {
    font-size: 18px;
  }

  .docs-header-stats {
    gap: 8px;
    flex-wrap: wrap;
  }

  .docs-stat-chip {
    font-size: 11px;
    padding: 2px 8px;
  }

  .docs-upload-row {
    grid-template-columns: 1fr;
  }

  .docs-upload-toggle {
    padding: 12px 16px;
    font-size: 14px;
  }

  .docs-upload-drop-zone {
    padding: 18px;
  }

  .docs-drop-icon {
    font-size: 28px;
  }

  .docs-modal-footer {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .docs-file-card {
    flex-wrap: wrap;
  }

  .docs-file-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid #e8e3da;
  }

  .docs-student-meta {
    flex-direction: column;
    gap: 4px;
  }

  .docs-meta-tag {
    font-size: 11px;
  }

  .docs-upload-section {
    border-radius: 10px;
  }

  .docs-upload-toggle {
    padding: 10px 14px;
    font-size: 13px;
    gap: 8px;
  }

  .docs-upload-toggle-icon {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .docs-upload-form {
    padding: 0 14px 14px;
    gap: 12px;
  }

  .docs-upload-drop-zone {
    padding: 16px;
  }

  .docs-drop-icon {
    font-size: 24px;
  }

  .docs-drop-text {
    font-size: 13px;
  }

  .docs-upload-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* ================================
   STANDARD FIELDS SECTION STYLES
   ================================ */

.standard-fields-section {
  background: #f8f6f1;
  border: 2px solid #e8e3da;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.standard-fields-section h4 {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e8e3da;
}

.standard-fields-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.standard-fields-group {
  background: white;
  border-radius: 10px;
  padding: 16px;
  border: 1px solid #e8e3da;
}

.standard-fields-group-title {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #d4cfc4;
}

.standard-field-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #faf8f3;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.standard-field-item:last-child {
  margin-bottom: 0;
}

.standard-field-item:hover {
  background: #f0ede6;
}

.standard-field-item .field-info {
  flex: 1;
}

.standard-field-item .field-info strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #1a3a52;
  margin-bottom: 2px;
}

.standard-field-item .field-info small {
  font-size: 12px;
  color: #888;
}

/* Toggle Switch Styles */
.standard-field-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.standard-field-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #d4cfc4;
  transition: 0.3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.standard-field-toggle input:checked + .toggle-slider {
  background-color: #1a3a52;
}

.standard-field-toggle input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.standard-field-toggle input:focus + .toggle-slider {
  box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.15);
}

/* ================================
   DYNAMIC FIELDS STYLES
   ================================ */

.dynamic-fields-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.dynamic-fields-header label {
  font-size: 16px;
  font-weight: 700;
  color: #1a3a52;
}

.dynamic-fields-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dynamic-field-wrapper {
  background: white;
  border: 2px solid #e8e3da;
  border-radius: 12px;
  padding: 16px;
  animation: slideInUp 0.3s ease-out;
  transition: all 0.3s ease;
}

.dynamic-field-wrapper:hover {
  border-color: #1a3a52;
  box-shadow: 0 4px 12px rgba(26, 58, 82, 0.1);
}

.dynamic-field-wrapper.animate-in {
  animation: slideInUp 0.3s ease-out;
}

.dynamic-field-wrapper.animate-out {
  animation: slideOutRight 0.3s ease-out forwards;
  opacity: 0;
  transform: translateX(20px);
}

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

.dynamic-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.dynamic-field-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #e8f0f6;
  color: #1a3a52;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.dynamic-field-type-badge .type-icon {
  font-size: 14px;
}

.dynamic-field-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto auto auto;
  gap: 12px;
  align-items: center;
}

.dynamic-field-row input[type="text"] {
  padding: 10px 14px;
  border: 2px solid #d4cfc4;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.dynamic-field-row input[type="text"]:focus {
  outline: none;
  border-color: #1a3a52;
  box-shadow: 0 0 0 3px rgba(26, 58, 82, 0.1);
}

.dynamic-field-row select {
  padding: 10px 14px;
  border: 2px solid #d4cfc4;
  border-radius: 8px;
  font-size: 14px;
  background: white;
  cursor: pointer;
  min-width: 140px;
}

.dynamic-field-row select:focus {
  outline: none;
  border-color: #1a3a52;
}

.dynamic-field-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1a3a52;
  cursor: pointer;
}

.dynamic-field-row label {
  font-size: 13px;
  color: #666;
  cursor: pointer;
  white-space: nowrap;
}

.dynamic-field-label {
  min-width: 200px;
}

.dynamic-field-placeholder {
  min-width: 150px;
}

/* Options container for select/radio/checkbox */
.dynamic-field-options {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d4cfc4;
}

.dynamic-field-options-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.dynamic-field-options-header label {
  font-size: 13px;
  font-weight: 600;
  color: #1a3a52;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.option-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-item input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #d4cfc4;
  border-radius: 6px;
  font-size: 13px;
}

.option-item input:focus {
  outline: none;
  border-color: #1a3a52;
}

.btn-remove-option {
  width: 28px;
  height: 28px;
  border: none;
  background: #fce8ec;
  color: #c41e3a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-remove-option:hover {
  background: #c41e3a;
  color: white;
}

.btn-add-option {
  padding: 6px 12px;
  background: #f0f4f8;
  color: #1a3a52;
  border: 1px dashed #1a3a52;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-add-option:hover {
  background: #1a3a52;
  color: white;
  border-style: solid;
}

/* ================================
   ADD FIELD MODAL STYLES
   ================================ */

.modal-medium {
  max-width: 700px;
}

.field-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.field-type-card {
  background: white;
  border: 2px solid #e8e3da;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.field-type-card:hover {
  border-color: #1a3a52;
  background: #f8f6f1;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(26, 58, 82, 0.15);
}

.field-type-card:active {
  transform: translateY(-2px);
}

.field-type-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background: linear-gradient(135deg, #1a3a52 0%, #0f2839 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  font-weight: 700;
}

.field-type-name {
  font-size: 14px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 4px;
}

.field-type-desc {
  font-size: 12px;
  color: #888;
  line-height: 1.4;
}

/* Tab description */
.tab-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.tab-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a3a52;
  margin-bottom: 8px;
}

/* Responsive for dynamic fields */
@media (max-width: 768px) {
  .dynamic-field-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dynamic-field-row select {
    min-width: 100%;
  }

  .dynamic-field-label,
  .dynamic-field-placeholder {
    min-width: 100%;
  }

  .field-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .standard-field-item {
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .field-type-grid {
    grid-template-columns: 1fr;
  }

  .standard-fields-group {
    padding: 12px;
  }

  .standard-field-item {
    padding: 8px 10px;
  }
}
