@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');

:root {
  --primary: #ff4d6d;
  --primary-dark: #c9184a;
  --primary-light: #ff758f;
  --bg-dark: #0a0a0a;
  --bg-card: #1a1a1a;
  --text-main: #ffffff;
  --text-muted: #a0a0a0;
  --accent: #ff8fa3;
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --font-main: 'Outfit', sans-serif;
  --font-accent: 'Playfair Display', serif;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-main);
  overflow-x: hidden;
  overflow-y: scroll; /* Prevent layout shift from scrollbar disappearing */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Global GPU Acceleration Utility */
.gpu-smooth {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
  will-change: transform, opacity;
}

h1, h2, h3, .accent-font {
  font-family: var(--font-accent);
}

.glass-morphism {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
}

.premium-btn {
  background: linear-gradient(45deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.premium-btn:hover {
  transform: translateY(-4px) scale(1.02) translateZ(0);
  box-shadow: 0 12px 24px rgba(255, 77, 109, 0.4);
  filter: brightness(1.1);
}

.premium-btn:active {
  transform: translateY(-1px) scale(0.96) translateZ(0);
  transition: all 0.1s ease;
}

.premium-input {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: white;
  padding: 14px 20px;
  border-radius: 12px;
  width: 100%;
  outline: none;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.premium-input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Barba Transitions */
.transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: #0a0a0a;
  z-index: 10000;
  pointer-events: none;
  transform: scaleY(0);
  transform-origin: bottom;
  will-change: transform;
  visibility: hidden;
}

[data-barba="container"] {
  width: 100%;
  min-height: 100vh;
  background: transparent !important;
}

/* Ensure containers can overlap during sync transition */
.barba-leaving {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  z-index: 1;
}

.barba-entering {
  position: relative;
  width: 100% !important;
  z-index: 2;
}

/* ========== GLOBAL NAVIGATION ========== */
.nav-container {
  position: fixed;
  top: 25px;
  right: 25px;
  z-index: 10000;
  display: flex;
  gap: 12px;
  animation: fadeInDown 0.8s ease forwards;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-btn span:first-child {
  font-size: 1.1rem;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Slightly elastic */
}

.nav-btn:hover {
  background: rgba(255, 77, 109, 0.15);
  border-color: rgba(255, 77, 109, 0.4);
  transform: translateY(-2px) translateZ(0);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.nav-btn:hover span:first-child {
  transform: scale(1.3) rotate(15deg);
}

.nav-btn:active {
  transform: scale(0.94) translateZ(0);
  transition: all 0.1s ease;
}

.logout-style {
  background: rgba(255, 77, 109, 0.05);
}

.logout-style:hover {
  background: rgba(255, 77, 109, 0.25);
  border-color: #ff4d6d;
}

.premium-logout {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.1), rgba(201, 24, 74, 0.15));
  border: 1px solid rgba(255, 77, 109, 0.3);
  position: relative;
  overflow: hidden;
}

.premium-logout::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: 0.5s;
}

.premium-logout:hover::before {
  left: 100%;
}

.premium-logout:hover {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.3), rgba(201, 24, 74, 0.4));
  border-color: #ff4d6d;
  box-shadow: 0 0 20px rgba(255, 77, 109, 0.4);
  transform: translateY(-3px) scale(1.05);
}

@keyframes fadeInDown {
  0% {
    opacity: 0;
    transform: translateY(-40px) scale(0.9) translateZ(0);
  }
  70% {
    transform: translateY(5px) scale(1.02) translateZ(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1) translateZ(0);
  }
}

@media (max-width: 768px) {
  .nav-container {
    top: 15px;
    right: 15px;
    gap: 8px;
  }
  .nav-btn {
    padding: 8px 15px;
    font-size: 0.8rem;
  }
  .nav-text {
    display: none; /* Hide text on small screens to save space */
  }
}
