/* === ЗМІННІ === */
:root {
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-light: rgba(16, 185, 129, 0.1);
  --discord: #5865F2;
  --discord-dark: #4752C4;
  --background: #0b0e11;
  --card-bg: rgba(255, 255, 255, 0.03);
  --card-border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --glow: 0 0 25px rgba(16, 185, 129, 0.3);
}

/* === АНІМАЦІЇ === */
@keyframes bgPulse {
  0% { background-color: var(--background); }
  50% { background-color: #0f1318; }
  100% { background-color: var(--background); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: var(--glow); }
  50% { box-shadow: 0 0 35px rgba(16, 185, 129, 0.6); }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === ОСНОВНІ СТИЛІ === */
body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif;
  background-color: var(--background);
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  animation: bgPulse 8s infinite;
  position: relative;
}

/* === ЕФЕКТ ЧАСТИНОК === */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(88, 101, 242, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* === ГОЛОВНИЙ КОНТЕЙНЕР === */
.main-container {
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 60px 80px;
  border-radius: 25px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.8s ease-out, float 6s ease-in-out infinite;
}

.main-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
  transition: left 0.5s ease;
}

.main-container:hover::before {
  left: 100%;
}

.main-container h1 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--primary);
  letter-spacing: 1.5px;
  font-weight: 700;
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
  position: relative;
}

.main-container h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  border-radius: 2px;
}

/* === КНОПКА DISCORD === */
.btn, 
#login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 16px 40px;
  border-radius: 15px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2rem;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn::before,
#login-btn::before {
  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.5s ease;
}

.btn:hover::before,
#login-btn:hover::before {
  left: 100%;
}

.btn:hover,
#login-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6);
  animation: glowPulse 2s infinite;
}

.btn:active,
#login-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* Іконка Discord */
#login-btn img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: transform 0.3s ease;
}

#login-btn:hover img {
  transform: scale(1.2) rotate(5deg);
}

.discord-green-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.discord-green-btn:hover {
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6);
}

/* Оригінальна Discord синя */
.discord-blue-btn {
  background: linear-gradient(135deg, #5865F2, #4752C4);
  box-shadow: 0 8px 25px rgba(88, 101, 242, 0.4);
}

/* === НОТИФІКАЦІЇ === */
.custom-notification {
  position: fixed;
  top: 30px;
  right: 30px;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  color: var(--text);
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: var(--shadow);
  z-index: 10000;
  animation: slideInUp 0.5s ease;
  border: 1px solid var(--card-border);
  border-left: 4px solid;
  max-width: 450px;
  transform-origin: top right;
}

.custom-notification.success {
  border-left-color: var(--primary);
  background: rgba(16, 185, 129, 0.1);
}

.custom-notification.error {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.custom-notification.info {
  border-left-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-message {
  flex: 1;
  font-weight: 500;
  font-size: 0.95rem;
}

/* === КНОПКИ ПЕРВИННІ (зелені) === */
.primary-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4) !important;
}

.primary-btn:hover {
  box-shadow: 0 15px 35px rgba(16, 185, 129, 0.6) !important;
  animation: glowPulse 2s infinite !important;
}

/* === АДАПТИВНІСТЬ === */
@media (max-width: 768px) {
  .main-container {
    width: 85%;
    padding: 40px 30px;
    margin: 20px;
  }

  .main-container h1 {
    font-size: 2rem;
  }

  .btn, #login-btn {
    font-size: 1.1rem;
    padding: 14px 32px;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 30px 20px;
  }

  .main-container h1 {
    font-size: 1.7rem;
  }

  .btn, #login-btn {
    font-size: 1rem;
    padding: 12px 24px;
  }

  .custom-notification {
    right: 15px;
    left: 15px;
    max-width: none;
  }
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* === FOCUS STATES === */
.btn:focus,
#login-btn:focus {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* === LOADING STATES === */
.btn.loading,
#login-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after,
#login-btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === ДОДАТКОВІ ЗЕЛЕНІ ЕЛЕМЕНТИ === */
.highlight {
  color: var(--primary);
  font-weight: 600;
}

.border-primary {
  border: 1px solid var(--primary) !important;
}

.bg-primary-light {
  background: var(--primary-light) !important;
}

.text-primary {
  color: var(--primary) !important;
}

/* === ЕФЕКТ ХВИЛІ НА КНОПКАХ === */
.wave-btn {
  position: relative;
  overflow: hidden;
}

.wave-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.4);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.wave-btn:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(40, 40);
    opacity: 0;
  }
}