@import url('styles.css');

/* Адаптация страницы профиля под футуристичный стиль */
body.profile-page {
  background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
  color: #e0e0ff;
}

body.profile-page .content-section {
  background: rgba(20, 18, 45, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(100, 80, 255, 0.2);
  color: #e0e0ff;
  margin-top: 80px;
}

.courses-title {
  color: #ffffff !important;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.program-card {
  background: rgba(30, 25, 60, 0.6);
  color: #e0e0ff;
  border: 1px solid rgba(100, 80, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 220px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.4);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.15);
}

.free-course-card {
  background: rgba(42, 47, 69, 0.7);
  border: 2px solid #00f0ff;
}

.free-course-btn {
  margin-top: 10px;
  background: linear-gradient(90deg, #00f0ff, #6e44ff);
  color: #000;
  border: none;
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.free-course-btn.unlocked {
  cursor: pointer;
  opacity: 1;
  background: linear-gradient(90deg, #00d4ff, #8a2be2);
}

.free-course-btn.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.lock-icon {
  font-size: 1.1em;
  margin-left: 7px;
  color: #ff5252;
  vertical-align: middle;
  user-select: none;
}

.lock-icon.unlocked {
  color: #00f0ff;
}

.profile-login-btn {
  background: linear-gradient(90deg, #00f0ff, #6e44ff);
  color: #000;
  border-radius: 16px;
  padding: 10px 24px;
  font-weight: 300;
  border: none;
  cursor: pointer;
  font-family: 'Yandex Sans', Arial, Helvetica, sans-serif;
  transition: all 0.3s ease;
}

.profile-login-btn:hover {
  background: linear-gradient(90deg, #00d4ff, #8a2be2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.profile-user-btn {
  background: none;
  color: #e0e0ff;
  border: none;
  cursor: pointer;
  font-family: 'Yandex Sans', Arial, Helvetica, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s ease;
  position: relative;
}

.profile-user-btn:hover,
.profile-user-btn:focus {
  background: rgba(100, 80, 255, 0.3);
}

#user-dropdown {
  position: absolute;
  top: 120%;
  right: 0;
  background: rgba(20, 18, 45, 0.9);
  border: 1px solid rgba(100, 80, 255, 0.3);
  border-radius: 6px;
  padding: 8px 0;
  min-width: 140px;
  box-shadow: 0 4px 16px rgba(0, 240, 255, 0.2);
  z-index: 1002;
  backdrop-filter: blur(10px);
}

#user-dropdown.hidden {
  display: none;
}

#user-dropdown button {
  background: none;
  border: none;
  color: #e0e0ff;
  width: 100%;
  padding: 8px 12px;
  text-align: left;
  cursor: pointer;
  font-family: 'Yandex Sans', Arial, sans-serif;
  transition: background 0.2s ease;
}

#user-dropdown button:hover {
  background: rgba(50, 40, 120, 0.6);
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.popup.hidden {
  display: none;
}

.popup-content {
  background: rgba(20, 18, 45, 0.95);
  border: 1px solid rgba(100, 80, 255, 0.3);
  padding: 30px;
  border-radius: 16px;
  width: 320px;
  color: #e0e0ff;
  position: relative;
  font-family: 'Yandex Sans', Arial, sans-serif;
  box-sizing: border-box;
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
}

.popup-content .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #e0e0ff;
  cursor: pointer;
}

.popup-content .close:hover {
  color: #ff33aa;
}

.link-button {
  background: none;
  border: none;
  color: #00f0ff;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  text-decoration: underline;
  font-family: 'Yandex Sans', Arial, sans-serif;
  transition: color 0.2s ease;
}

.link-button:hover {
  color: #00d4ff;
}

form {
  display: grid;
  gap: 15px;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
  text-align: left;
  font-family: 'Yandex Sans', Arial, Helvetica, sans-serif;
}

form input {
  padding: 12px;
  font-size: 1.1rem;
  border: 1px solid rgba(100, 80, 255, 0.3);
  border-radius: 6px;
  color: #000;
  background: rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s;
  font-family: 'Yandex Sans', Arial, Helvetica, sans-serif;
  box-sizing: border-box;
}

form input:focus {
  border-color: #00f0ff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.3);
}

form button {
  background: linear-gradient(90deg, #00f0ff, #6e44ff);
  color: #000;
  border: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  cursor: pointer;
  font-family: 'Yandex Sans', Arial, Helvetica, sans-serif;
}

form button:hover {
  background: linear-gradient(90deg, #00d4ff, #8a2be2);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 212, 255, 0.4);
}

.popup-content p {
  margin-top: 10px;
  font-size: 1rem;
  color: #a0a0ff;
  text-align: center;
}

@media (max-width: 600px) {
  .popup-content {
    width: 90%;
    padding: 20px;
  }
}

.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: rgba(20, 15, 40, 0.95);
  color: #e0e0ff;
  padding: 16px 24px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-family: 'Yandex Sans', Arial, sans-serif;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1100;
  max-width: 320px;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
}

.toast .close-toast {
  position: absolute;
  top: 6px;
  right: 10px;
  background: none;
  border: none;
  color: #e0e0ff;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  padding: 0;
  line-height: 1;
}

.toast .close-toast:hover {
  color: #ff33aa;
}

.program-card h3,
.program-card p,
.program-card span {
  color: #e0e0ff !important;
}

.hidden-course {
  display: none !important;
}

.visible-course {
  display: block !important;
}

.email-verification-banner {
  background: rgba(30, 25, 60, 0.8);
  color: #ffd700;
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 8px 15px;
  text-align: center;
  font-size: 0.9rem;
  position: sticky;
  top: 64px;
  z-index: 100;
  display: none;
  transition: all 0.3s ease;
  animation: fadeInDown 0.4s ease;
  backdrop-filter: blur(5px);
}

.email-verification-banner.active {
  display: block;
}

.banner-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.banner-button {
  background: linear-gradient(90deg, #ffd700, #ff9800);
  color: #000;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.2s;
}

.banner-button:hover {
  background: linear-gradient(90deg, #ffcc00, #ef6c00);
  transform: translateY(-1px);
}

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