/* === components.css === */
/* НАЗНАЧЕНИЕ: Стили компонентов (кнопки, карточки, формы, модальные окна) */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 1rem 2rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(to right, rgba(59, 130, 246, 0.9), rgba(139, 92, 246, 0.9));
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--ai-blue);
  color: var(--ai-blue);
}

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
  color: var(--ai-blue);
}

.btn-large {
  min-height: 66px;
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Cards */
.card {
  background: var(--gradient-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card h3 {
  margin-bottom: 1rem;
}

.card-hover:hover {
  transform: scale(1.02);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.1);
}

.card-gradient {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.card-special {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
  border: 2px solid var(--ai-green);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

/* Forms */
.registration-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.form-group label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ai-blue);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.radio-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--ai-blue);
}

.radio-label input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--ai-blue);
}

.radio-label input[type="radio"]:checked + span {
  color: var(--ai-blue);
  font-weight: 600;
}

.radio-label span {
  flex: 1;
  font-size: 1rem;
}

.form-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

/* Notification */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  min-width: 300px;
  max-width: 400px;
  padding: 1.25rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  transform: translateX(500px);
  transition: transform 0.4s ease;
  display: none;
}

.notification.show {
  display: block;
  transform: translateX(0);
}

.notification.success {
  border-left: 4px solid var(--ai-green);
}

.notification.error {
  border-left: 4px solid var(--color-danger);
}

.notification.info {
  border-left: 4px solid var(--ai-blue);
}

@media (max-width: 768px) {
  .notification {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: auto;
    max-width: none;
  }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(8px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: scaleIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn .loading-spinner {
  margin-right: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card {
    padding: 1.5rem;
  }

  .btn {
    min-height: 54px;
    padding: 0.875rem 1.5rem;
  }

  .btn-large {
    min-height: 60px;
    padding: 1rem 1.75rem;
    font-size: 1rem;
  }
}

/* Comparison Tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.comparison-table thead {
  background: rgba(103, 58, 183, 0.1);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.comparison-table th {
  font-weight: 700;
  font-size: 1rem;
}

.comparison-table td:first-child {
  font-weight: 600;
  width: 25%;
}

.comparison-table tbody tr:hover {
  background: rgba(103, 58, 183, 0.02);
}

@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.9rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }

  .comparison-table td:first-child {
    width: 35%;
  }
}

/* Student Floating Badge */
.student-badge-floating {
  position: fixed;
  top: 120px;
  right: 20px;
  z-index: 999;
  animation: badgePulse 2s ease-in-out infinite;
  cursor: pointer;
}

.student-badge-floating .badge-content {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 0.95rem;
}

.student-badge-floating .badge-content:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(102, 126, 234, 0.7);
}

.student-badge-floating .emoji {
  font-size: 1.25rem;
}

@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .student-badge-floating {
    top: auto;
    bottom: 140px;
    right: 15px;
  }

  .student-badge-floating .badge-content {
    padding: 10px 16px;
    font-size: 0.85rem;
  }

  .student-badge-floating .text {
    display: none;
  }

  .student-badge-floating .emoji {
    font-size: 1.5rem;
  }

  /* Уменьшаем размер текста в кнопках на мобильных */
  .btn-large, .btn-block {
    font-size: 0.9rem !important;
    padding: 0.875rem 1rem !important;
    white-space: normal;
    line-height: 1.3;
  }
}

/* Адаптивный текст кнопок */
.btn-text-short {
  display: none;
}

@media (max-width: 768px) {
  .btn-text-full {
    display: none;
  }

  .btn-text-short {
    display: inline;
    font-size: 1.05rem;
  }

  /* Переопределяем размеры кнопок для короткого текста */
  .btn-large .btn-text-short,
  .btn-block .btn-text-short {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .btn-large, .btn-block {
    padding: 0.875rem 1rem !important;
  }

  .btn-text-short {
    font-size: 1rem !important;
  }
}
