/* Global Variables & Premium Design System */

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

:root {
  /* Color Palette */
  --bg-color: #07111F;
  --primary-color: #6C63FF;
  --secondary-color: #FF6BAA;
  --accent-color: #FFD700;
  
  --text-white: #FFFFFF;
  --text-muted: #A0AEC0;
  --text-gold: #FFE57F;
  
  /* Glassmorphism Styles */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-glow: rgba(108, 99, 255, 0.25);
  --glass-accent-glow: rgba(255, 107, 170, 0.25);
  
  /* Font Families */
  --font-ui: 'Montserrat', sans-serif;
  --font-serif: 'Playfair Display', serif;
  --font-fancy: 'Alex Brush', cursive;

  /* Transitions */
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-white);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

/* Custom Cursor Elements */
.custom-cursor-follower {
  width: 32px;
  height: 32px;
  border: 1.5px solid var(--accent-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background-color 0.25s, border-color 0.25s;
  mix-blend-mode: difference;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
}

.custom-cursor-follower.expand {
  width: 55px;
  height: 55px;
  background-color: rgba(255, 107, 170, 0.15);
  border-color: var(--secondary-color);
}

/* Hide cursor followers on mobile touch screens */
@media (pointer: coarse) {
  .custom-cursor-follower, .custom-cursor-dot {
    display: none !important;
  }
}

/* Background Canvas */
#bg-particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* Layout Utilities */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.5rem 6.5rem 1.5rem;
}

/* Glassmorphism Cards with Spotlight glow capabilities */
.glass-card, .glass-card-nav {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  padding: 2.5rem;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  transition: var(--transition-smooth);
  
  --mouse-x: 50%;
  --mouse-y: 50%;
}

/* Cursor-Tracking Spotlight Overlay */
.glass-card::before, .glass-card-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: radial-gradient(350px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.05), transparent 45%);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover::before, .glass-card-nav:hover::before {
  opacity: 1;
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 12px 40px 0 var(--glass-glow);
}

/* Headings & Text */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: 0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #FFF 30%, var(--accent-color) 70%, var(--secondary-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Button & Interactive Ripple Styling */
.btn-ripple {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
  outline: none;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 50px;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-white);
  box-shadow: 0 4px 15px var(--glass-glow);
  transition: var(--transition-smooth);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ripple:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--glass-accent-glow);
}

.btn-ripple:active {
  transform: translateY(-1px);
}

.ripple-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-anim 0.6s linear;
  pointer-events: none;
}

/* Global Sticky bottom Navigation bar */
.navigation-bar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  background: rgba(7, 17, 31, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  gap: 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.navigation-bar:hover {
  box-shadow: 0 15px 40px var(--glass-glow);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  transition: var(--transition-smooth);
  min-width: 70px;
}

.nav-item .nav-icon {
  font-size: 1.25rem;
  margin-bottom: 2px;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item:hover .nav-icon {
  transform: translateY(-2px);
}

.nav-item.active {
  color: var(--accent-color);
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
}

/* Page Transition Overlay Screen */
.page-transition-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.page-transition-overlay.fade-out {
  opacity: 0;
}

.page-transition-overlay.fade-in {
  opacity: 1;
  pointer-events: all;
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(108, 99, 255, 0.3);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 107, 170, 0.5);
}

/* ==========================================
   Animations Keyframes
   ========================================== */

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes floatUpDown {
  0% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
  100% { transform: translateY(0); }
}

@keyframes glowPulse {
  0% { box-shadow: 0 0 10px rgba(108, 99, 255, 0.2); }
  50% { box-shadow: 0 0 25px rgba(255, 107, 170, 0.5); }
  100% { box-shadow: 0 0 10px rgba(108, 99, 255, 0.2); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

@keyframes entranceScale {
  0% {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ==========================================
   Mobile-First Responsive Design System
   ========================================== */

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 375px) {
  :root {
    --base-font-size: 14px;
  }
  
  body {
    font-size: var(--base-font-size);
  }
  
  .app-container {
    padding: 1rem 0.75rem 5rem 0.75rem;
  }
  
  .glass-card, .glass-card-nav {
    padding: 1.25rem;
    border-radius: 16px;
    max-width: 100%;
  }
  
  .navigation-bar {
    width: 95%;
    gap: 0.25rem;
    padding: 0.35rem 0.4rem;
    bottom: 1rem;
  }
  
  .nav-item {
    min-width: 50px;
    padding: 0.35rem 0.5rem;
    font-size: 0.65rem;
  }
  
  .nav-item .nav-icon {
    font-size: 1rem;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .btn-ripple {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Small Devices (landscape phones, 376px and up) */
@media (min-width: 376px) and (max-width: 480px) {
  .app-container {
    padding: 1.25rem 1rem 5.25rem 1rem;
  }
  
  .glass-card, .glass-card-nav {
    padding: 1.5rem;
  }
  
  .navigation-bar {
    width: 92%;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
  }
  
  .nav-item {
    min-width: 55px;
    padding: 0.4rem 0.7rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.4rem; }
}

/* Medium Devices (tablets, 481px and up) */
@media (min-width: 481px) and (max-width: 768px) {
  .app-container {
    padding: 1.5rem 1.25rem 5.5rem 1.25rem;
  }
  
  .glass-card, .glass-card-nav {
    padding: 1.75rem;
  }
  
  .navigation-bar {
    width: 90%;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
  }
  
  .nav-item {
    min-width: 60px;
    padding: 0.5rem 0.85rem;
  }
  
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.9rem; }
  h3 { font-size: 1.5rem; }
}

/* Large Devices (landscape tablets, small laptops, 769px and up) */
@media (min-width: 769px) and (max-width: 1024px) {
  .app-container {
    padding: 2rem 1.5rem 6rem 1.5rem;
  }
  
  .glass-card, .glass-card-nav {
    padding: 2rem;
  }
  
  .navigation-bar {
    width: 85%;
    max-width: 500px;
    gap: 1rem;
    padding: 0.6rem 1rem;
  }
  
  .nav-item {
    min-width: 65px;
    padding: 0.6rem 1rem;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.1rem; }
  h3 { font-size: 1.6rem; }
}

/* Extra Large Devices (desktops, 1025px and up) */
@media (min-width: 1025px) {
  .app-container {
    padding: 2.5rem 2rem 6.5rem 2rem;
  }
  
  .glass-card, .glass-card-nav {
    padding: 2.5rem;
  }
  
  .navigation-bar {
    width: auto;
    max-width: 600px;
    gap: 1.5rem;
    padding: 0.5rem 1rem;
  }
  
  .nav-item {
    min-width: 70px;
    padding: 0.5rem 1rem;
  }
  
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }
}

/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
  /* Increase touch targets */
  .btn-ripple {
    min-height: 48px;
    min-width: 48px;
  }
  
  .music-btn, .carousel-btn {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Better spacing for touch */
  .glass-card, .glass-card-nav {
    margin-bottom: 1rem;
  }
  
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Improve text readability */
  p, span, div {
    max-width: 100%;
  }
}

/* Landscape mode optimizations */
@media (max-height: 500px) and (orientation: landscape) {
  .app-container {
    padding: 1rem 1.5rem 4rem 1.5rem;
  }
  
  .navigation-bar {
    bottom: 0.75rem;
    padding: 0.3rem 0.75rem;
  }
  
  .nav-item {
    padding: 0.3rem 0.6rem;
  }
  
  .nav-item .nav-icon {
    font-size: 1rem;
    margin-bottom: 1px;
  }
  
  .nav-item .nav-text {
    font-size: 0.65rem;
  }
}

/* Global utility class for hiding elements */
.hidden {
  display: none !important;
}
