:root {
  --primary-color: #20BEFF;
  --secondary-color: #1A73E8;
  --dark-blue: #0B3D91;
  --text-dark: #212529;
  --text-muted: #6c757d;
  --bg-light: #F8F9FA;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-dark);
  background-color: #fff;
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

/* Navigation Bar */
.navbar-custom {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar-brand-custom {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-blue);
  text-decoration: none;
  transition: all 0.3s ease;
}

.navbar-brand-custom:hover {
  color: var(--primary-color);
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  font-weight: 700;
  overflow: hidden;
  padding: 0;
}

/* Logo image should fit inside the .logo-icon box (preserve aspect ratio) */
.logo-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

.navbar-nav-custom {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link-custom {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
  padding: 8px 0;
}

.nav-link-custom:hover {
  color: var(--primary-color);
}

.btn-login {
  color: var(--secondary-color);
  background: transparent;
  border: none;
  padding: 10px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background: rgba(26, 115, 232, 0.1);
  color: var(--secondary-color);
}

.btn-register {
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.85), rgba(26, 115, 232, 0.85));
  color: white;
  padding: 8px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(26, 115, 232, 0.25);
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 12px rgba(32, 190, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-register:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(32, 190, 255, 0.35);
  color: white;
}

.btn-dashboard {
  background: rgba(26, 115, 232, 0.12);
  color: var(--secondary-color);
  padding: 8px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(26, 115, 232, 0.25);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-dashboard:hover {
  background: rgba(26, 115, 232, 0.18);
  border-color: rgba(26, 115, 232, 0.45);
  color: var(--secondary-color);
}

.btn-logout {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-logout:hover {
  color: var(--secondary-color);
  background: rgba(26, 115, 232, 0.08);
  border-color: rgba(26, 115, 232, 0.2);
}

/* Mobile menu toggle */
.navbar-toggler-custom {
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
}

.navbar-toggler-custom span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--dark-blue);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

/* Auth Modal */
.auth-modal {
  border-radius: 16px;
  border: 1px solid #e9ecef;
  box-shadow: 0 20px 60px rgba(11, 61, 145, 0.15);
}


.auth-modal .modal-header {
  padding: 1.5rem 1.5rem 0 1.5rem;
}

.auth-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark-blue);
}

.auth-modal .btn-close {
  background-size: 12px;
  box-shadow: none;
}

.auth-modal .modal-body {
  padding: 1.5rem;
}

.auth-form .form-label {
  font-weight: 500;
  color: var(--text-dark);
}

.auth-form .form-control {
  border-radius: 10px;
  border: 1px solid #dbe2ea;
  padding: 0.75rem 1rem;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form .form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(32, 190, 255, 0.15);
}

.auth-form .btn-primary-custom {
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  border-radius: 12px;
}

.auth-page {
  min-height: calc(100vh - 80px);
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.05), rgba(26, 115, 232, 0.08));
  padding: 120px 1rem 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  box-shadow: 0 25px 60px rgba(11, 61, 145, 0.15);
  padding: 2.5rem 2.25rem;
  text-align: center;
}

.auth-card__header {
  margin-bottom: 1.75rem;
}

.auth-card .auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.15), rgba(26, 115, 232, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card .auth-icon svg {
  width: 30px;
  height: 30px;
  color: var(--secondary-color);
}

.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 0.5rem;
}

.auth-card__subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.auth-card__form {
  text-align: left;
}

.auth-alert {
  background: rgba(255, 82, 82, 0.08);
  border: 1px solid rgba(255, 82, 82, 0.3);
  color: #d62839;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-field-group:last-of-type {
  margin-bottom: 0.75rem;
}

.auth-field-error {
  color: #d62839;
  font-size: 0.85rem;
}

.auth-field-error span + span {
  margin-left: 0.35rem;
}

.auth-card__actions {
  margin-top: 0;
}

.auth-card__footer {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.auth-link {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-link-muted {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link-muted:hover {
  color: var(--secondary-color);
}

.auth-card .form-control {
  border-radius: 12px;
  border: 1px solid #dbe2ea;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-card .form-control:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(32, 190, 255, 0.15);
}

.auth-card__footer span {
  color: var(--text-muted);
}

.auth-page .auth-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
}

.auth-page .auth-icon svg {
  width: 32px;
  height: 32px;
}

.logout-modal .logout-message {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.auth-modal .auth-icon,
.auth-modal .logout-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.15), rgba(26, 115, 232, 0.2));
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-modal .auth-icon svg,
.auth-modal .logout-icon svg {
  width: 28px;
  height: 28px;
  color: var(--secondary-color);
}

.logout-modal .logout-confirm-form {
  margin: 0;
}

.logout-modal .logout-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn-danger-custom {
  background: linear-gradient(135deg, #ff5252, #d62839);
  border: none;
  color: white;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 12px rgba(214, 40, 57, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-danger-custom:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(214, 40, 57, 0.35);
}

.btn-ghost-neutral {
  background: rgba(32, 190, 255, 0.08);
  color: var(--secondary-color);
  border: 1px solid rgba(32, 190, 255, 0.2);
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.btn-ghost-neutral:hover {
  background: rgba(32, 190, 255, 0.14);
  border-color: rgba(32, 190, 255, 0.35);
  color: var(--secondary-color);
}

.login-modal .modal-header {
  padding-top: 1.25rem;
}

.login-modal .modal-title {
  font-size: 1.2rem;
}

.auth-form {
  text-align: left;
}

.auth-form .auth-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.auth-form .auth-field-group:last-of-type {
  margin-bottom: 0.75rem;
}

.auth-form .auth-actions {
  margin-top: 0;
}

.auth-secondary-action {
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-secondary-action .auth-link {
  color: var(--secondary-color);
  font-weight: 600;
  text-decoration: none;
}

.auth-secondary-action .auth-link:hover {
  text-decoration: underline;
}

/* Telegram Modal Styles */
.telegram-instructions {
  background: rgba(32, 190, 255, 0.05);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(32, 190, 255, 0.15);
  color: var(--text-dark);
  line-height: 1.6;
}

.telegram-instructions ol {
  margin-bottom: 0;
}

.telegram-instructions code {
  background: rgba(26, 115, 232, 0.1);
  color: var(--secondary-color);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
}

.telegram-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.telegram-qr-image {
  max-width: 280px;
  width: 100%;
  height: auto;
  border: 2px solid rgba(32, 190, 255, 0.2);
  box-shadow: 0 4px 12px rgba(32, 190, 255, 0.15);
}

.telegram-link-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: all 0.2s ease;
  text-decoration: none;
  vertical-align: middle;
}

.telegram-link-icon:hover {
  color: var(--primary-color);
  transform: scale(1.15);
}

.telegram-link-icon svg {
  display: block;
}

@media (max-width: 575px) {
  .telegram-qr-image {
    max-width: 220px;
  }

  .telegram-instructions {
    padding: 0.85rem 1rem;
  }
}

@media (max-width: 575px) {
  .auth-page {
    padding: 110px 1rem 60px;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }

  .auth-card__title {
    font-size: 1.35rem;
  }

  .auth-card .form-control {
    padding: 0.85rem 0.95rem;
  }

  .auth-hero {
    min-height: auto;
    display: block;
    padding-top: 120px;
    padding-bottom: 60px;
  }
}
@media (max-width: 991px) {
  .navbar-nav-custom {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
  }

  .mobile-menu {
    display: none;
    width: 100%;
  }

  .mobile-menu.show {
    display: block;
  }
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.05) 0%, rgba(26, 115, 232, 0.08) 100%);
  clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
  z-index: 0;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--dark-blue);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-weight: 400;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: none;
  color: white;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(32, 190, 255, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(32, 190, 255, 0.4);
  color: white;
}

.btn-outline-custom {
  border: 2px solid var(--secondary-color);
  color: var(--secondary-color);
  background: white;
  padding: 14px 32px;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

.hero-image {
  position: relative;
  z-index: 1;
}

.hero-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.hero-image img:hover {
  transform: scale(1.02);
}

.auth-hero {
  padding-top: 140px;
  padding-bottom: 100px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
}

.auth-hero > .container {
  flex: 1 0 auto;
}

.auth-hero .hero-subtitle {
  max-width: 460px;
}

.auth-hero-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.8rem;
  color: var(--text-dark);
  font-size: 1rem;
}

.auth-hero-list li {
  position: relative;
  padding-left: 28px;
}

.auth-hero-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  box-shadow: 0 0 12px rgba(32, 190, 255, 0.45);
}

.hero-auth-card-wrapper {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}

@media (min-width: 992px) {
  .hero-auth-card-wrapper {
    justify-content: flex-end;
  }
}

.hero-auth-card {
  width: 100%;
  max-width: 420px;
}

/* Features Section */
.features-section {
  padding: 60px 0;
  background: white;
}

.feature-card {
  padding: 2rem;
  border-radius: 12px;
  background: white;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: white;
  font-size: 1.8rem;
}

.feature-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Stats Section */
.stats-section {
  background: white;
  padding: 80px 0;
  position: relative;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(180deg, #f0f8ff 0%, white 100%);
  z-index: 0;
}

.stats-container {
  position: relative;
  z-index: 1;
}

.stat-item {
  text-align: center;
  padding: 3rem 2rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
  height: 100%;
}

.stat-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px rgba(32, 190, 255, 0.2);
  border-color: var(--primary-color);
}

.stat-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(32, 190, 255, 0.1), rgba(26, 115, 232, 0.1));
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 1.2rem;
  color: var(--text-dark);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.stat-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

/* Footer Section */
.footer-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
  padding: 60px 0 30px;
  margin-top: 0;
  border-top: 1px solid #e9ecef;
}

.footer-brand {
  margin-bottom: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}

.footer-logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
}

.footer-logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--dark-blue);
}

.footer-description {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 350px;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark-blue);
  margin-bottom: 1.5rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.social-icon:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(32, 190, 255, 0.3);
}

.footer-bottom {
  border-top: 1px solid #dee2e6;
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom-text {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-bottom-links a:hover {
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }


  .auth-hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .auth-hero-list {
    margin-top: 1.25rem;
    font-size: 0.95rem;
  }
  .hero-buttons {
    flex-direction: column;
  }

  .hero-section {
    padding: 50px 0 40px;
  }

  .footer-section {
    padding: 40px 0 20px;
  }

  .footer-brand,
  .footer-links-section {
    margin-bottom: 2rem;
  }

  .footer-bottom-links {
    flex-direction: column;
    gap: 0.5rem;
  }
}
