@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --pfa-blue: #1a5fb4;
  --pfa-blue-hover: #2e7dd4;
  --pfa-blue-glow: rgba(26, 95, 180, 0.15);
  --pfa-space-bg: #050508;
  --pfa-nebula-gray: rgba(100, 100, 110, 0.04);
  --pfa-nebula-dark: rgba(30, 30, 35, 0.05);
  --pfa-nebula-blue: rgba(26, 95, 180, 0.03);
  --pfa-black: #0A0A0A;
  --pfa-gray-dark: #18181B;
  --pfa-gray-medium: #27272A;
  --pfa-gray-light: #3F3F46;
  --pfa-text-primary: #E4E4E7;
  --pfa-text-secondary: #A1A1AA;
  --pfa-text-muted: #71717A;
  --pfa-white: #FFFFFF;
  --star-color: rgba(255, 255, 255, 0.65);
  --text-color: var(--pfa-text-primary);
  --text-secondary: var(--pfa-text-secondary);
  --text-muted: var(--pfa-text-muted);
  --accent-color: var(--pfa-blue);
  --accent-hover: var(--pfa-blue-hover);
  --card-bg-alpha: rgba(24, 24, 27, 0.45);
  --card-bg-hover-alpha: rgba(30, 30, 33, 0.65);
  --card-border: rgba(63, 63, 70, 0.4);
  --card-border-hover: rgba(113, 113, 122, 0.55);
  --card-backdrop-blur: blur(16px);
  --border-color: var(--pfa-gray-light);
  --shadow-color: rgba(26, 95, 180, 0.15);
  --shadow-color-dark: rgba(0, 0, 0, 0.4);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Inter', -apple-system, system-ui, sans-serif;
}

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

*:focus {
  outline: none;
}

*::selection {
  background: rgba(26, 95, 180, 0.2);
}

*::-moz-selection {
  background: rgba(26, 95, 180, 0.2);
}

body {
  font-family: var(--font-main);
  background: #050508;
  color: var(--pfa-text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.background-effects {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background: linear-gradient(180deg, #050508 0%, #0a0a0d 50%, #050508 100%);
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(26, 95, 180, 0.5);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: geometricFall 25s linear infinite;
  opacity: 0;
  transform-origin: center center;
  filter: drop-shadow(0 0 3px rgba(26, 95, 180, 0.6));
}

.particle::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  width: 6px;
  height: 6px;
  background: rgba(26, 95, 180, 0.25);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation: pulse 4s ease-in-out infinite;
}

.particle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 2px;
  background: rgba(26, 95, 180, 0.3);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transform: translate(-50%, -50%) rotate(60deg);
}

.particle:nth-child(1) { left: 5%; animation-delay: 0s; animation-duration: 22s; }
.particle:nth-child(2) { left: 10%; animation-delay: -1.2s; animation-duration: 24s; }
.particle:nth-child(3) { left: 15%; animation-delay: -2.5s; animation-duration: 26s; }
.particle:nth-child(4) { left: 20%; animation-delay: -0.8s; animation-duration: 23s; }
.particle:nth-child(5) { left: 25%; animation-delay: -1.8s; animation-duration: 25s; }
.particle:nth-child(6) { left: 30%; animation-delay: -3.2s; animation-duration: 21s; }
.particle:nth-child(7) { left: 35%; animation-delay: -1.1s; animation-duration: 27s; }
.particle:nth-child(8) { left: 40%; animation-delay: -2.8s; animation-duration: 24s; }
.particle:nth-child(9) { left: 45%; animation-delay: -1.5s; animation-duration: 22s; }
.particle:nth-child(10) { left: 50%; animation-delay: -3.5s; animation-duration: 26s; }
.particle:nth-child(11) { left: 55%; animation-delay: -0.5s; animation-duration: 23s; }
.particle:nth-child(12) { left: 60%; animation-delay: -2.2s; animation-duration: 25s; }
.particle:nth-child(13) { left: 65%; animation-delay: -3.8s; animation-duration: 24s; }
.particle:nth-child(14) { left: 70%; animation-delay: -1.0s; animation-duration: 22s; }
.particle:nth-child(15) { left: 75%; animation-delay: -2.9s; animation-duration: 26s; }
.particle:nth-child(16) { left: 80%; animation-delay: -1.4s; animation-duration: 23s; }
.particle:nth-child(17) { left: 85%; animation-delay: -3.1s; animation-duration: 25s; }
.particle:nth-child(18) { left: 90%; animation-delay: -1.3s; animation-duration: 24s; }
.particle:nth-child(19) { left: 95%; animation-delay: -2.4s; animation-duration: 22s; }
.particle:nth-child(20) { left: 12.5%; animation-delay: -2.7s; animation-duration: 25s; }

@keyframes geometricFall {
  0% {
    opacity: 0;
    transform: translateY(-100vh) rotate(0deg) scale(0.8);
  }
  5% {
    opacity: 0.6;
  }
  50% {
    opacity: 0.8;
    transform: translateY(50vh) rotate(180deg) scale(1);
  }
  95% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(100vh) rotate(360deg) scale(0.8);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

#stars-static-1, #stars-static-2, #stars-static-3 {
  display: none;
}

@keyframes twinkle {
  0%, 100% { 
    opacity: 0.2; 
    transform: scale(0.8);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.3);
  }
}

.header {
  position: relative;
  z-index: 10;
  background-color: rgba(10, 10, 13, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--pfa-gray-medium);
  padding: 1rem 0;
  margin-bottom: 2rem;
  animation: headerSlideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--pfa-white);
  font-weight: 700;
  font-size: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.nav-brand::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-brand:hover {
  color: var(--accent-color);
  transform: translateX(4px);
}

.nav-brand:hover::after {
  width: 100%;
}

.nav-logo {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-brand:hover .nav-logo {
  transform: rotate(-12deg) scale(1.1);
}

.nav-brand i {
  font-size: 1.5rem;
  color: var(--accent-color);
}

.nav-title {
  font-weight: 700;
}

.main-content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.card {
  background-color: var(--card-bg-alpha);
  backdrop-filter: var(--card-backdrop-blur);
  -webkit-backdrop-filter: var(--card-backdrop-blur);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  max-width: 500px;
  width: 100%;
  margin: 0 auto;
  animation: cardSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}


.card:hover {
  border-color: var(--card-border-hover);
}

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

.card-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--pfa-gray-medium);
  text-align: center;
}

.card-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
  color: var(--pfa-white);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  animation: titleFadeIn 0.8s ease-out 0.2s both;
}

.card-title i {
  color: var(--accent-color);
  font-size: 1.5rem;
  animation: iconPulse 2s ease-in-out infinite;
}

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

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.1);
    opacity: 0.8;
  }
}

.card-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 0;
}

.card-body {
  color: var(--text-secondary);
  flex-grow: 1;
  padding-top: 1rem;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  background-color: var(--accent-color);
  color: var(--pfa-white);
  box-shadow: 0 3px 10px var(--shadow-color);
  animation: buttonFadeIn 0.6s ease-out 0.4s both;
}

.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;
  z-index: 1;
}

.btn:hover::before {
  left: 100%;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  z-index: 0;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(26, 95, 180, 0.4);
}

.btn:active {
  opacity: 0.9;
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--pfa-gray-light);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: var(--pfa-text-secondary);
  color: var(--pfa-white);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

.error-message {
  color: #ef4444;
  font-size: 0.9rem;
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  display: none;
  animation: errorShake 0.5s ease;
}

.error-message.show {
  display: block;
  animation: errorSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes errorShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.login-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.login-discord-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.login-note {
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  animation: fadeIn 0.8s ease-out 0.6s both;
}

.noperm-icon-wrapper, .logout-icon-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
  animation: iconBounce 1s ease-out 0.3s both;
}

.noperm-icon-wrapper i, .logout-icon-wrapper i {
  font-size: 4rem;
  color: var(--accent-color);
  opacity: 0.8;
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-180deg);
  }
  60% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.noperm-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.footer {
  position: relative;
  z-index: 10;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--pfa-gray-medium);
  margin-top: auto;
  background: linear-gradient(to top, rgba(10, 10, 13, 0.8), rgba(10, 10, 13, 0));
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

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

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.footer-logo .nav-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--pfa-white);
  line-height: 1;
}

.footer-logo i {
  font-size: 1.2rem;
  color: var(--accent-color);
}

.footer-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 100%;
  padding-top: 1.5rem;
}

.copyright a {
    color: var(--pfa-blue);
    text-decoration: none;
    transition: color var(--transition);
}

.copyright a:hover {
    color: var(--pfa-blue-hover);
    text-decoration: underline;
}

.copyright {
  color: var(--text-muted);
}

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

@media (max-width: 768px) {
  .main-content {
    padding: 1rem 0;
  }
  
  .card {
    padding: 2rem 1.5rem;
  }
  
  .card-title {
    font-size: 1.5rem;
  }
  
  .login-discord-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .noperm-actions {
    flex-direction: column;
  }
  
  .noperm-actions .btn {
    width: 100%;
  }
}
