/* ============================================
   ADVANCED EFFECTS & ANIMATIONS
   Premium Student Portal Design
   ============================================ */

/* ========== ANIMATED GRADIENT BACKGROUND ========== */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

body {
  position: relative;
  overflow-x: hidden;
  transition: all 0.5s ease;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, #1a1a2e, #16213e, #0f3460, #533483, #1a1a2e);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  z-index: -2;
}

/* ========== FLOATING PARTICLES ========== */
.particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-100px) translateX(50px) rotate(90deg);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-200px) translateX(-50px) rotate(180deg);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-100px) translateX(-100px) rotate(270deg);
    opacity: 0.6;
  }
}

.particle:nth-child(1) {
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent);
  top: 10%;
  left: 10%;
  animation: float 20s infinite ease-in-out;
}

.particle:nth-child(2) {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3), transparent);
  top: 60%;
  left: 80%;
  animation: float 25s infinite ease-in-out 5s;
}

.particle:nth-child(3) {
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(255, 193, 7, 0.4), transparent);
  top: 80%;
  left: 20%;
  animation: float 18s infinite ease-in-out 10s;
}

.particle:nth-child(4) {
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(76, 175, 80, 0.3), transparent);
  top: 30%;
  left: 70%;
  animation: float 22s infinite ease-in-out 3s;
}

.particle:nth-child(5) {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle, rgba(244, 67, 54, 0.3), transparent);
  top: 50%;
  left: 40%;
  animation: float 19s infinite ease-in-out 7s;
}

/* ========== CARD HOVER EFFECTS ========== */
.card {
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  transition: all 0.6s;
  opacity: 0;
}

.card:hover::before {
  opacity: 1;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(255, 255, 255, 0.4),
              0 0 40px rgba(255, 255, 255, 0.3),
              inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* ========== GLOWING BORDERS ========== */
@keyframes borderGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5),
                0 0 10px rgba(255, 255, 255, 0.3),
                0 0 15px rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8),
                0 0 20px rgba(255, 255, 255, 0.5),
                0 0 30px rgba(255, 255, 255, 0.3);
  }
}

.nav-card {
  animation: borderGlow 3s ease-in-out infinite;
}

/* ========== PULSING ANIMATIONS ========== */
@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
}

.pulse-effect {
  animation: pulse 2s ease-in-out infinite;
}

/* ========== RIPPLE EFFECT ========== */
.ripple {
  position: relative;
  overflow: hidden;
}

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

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

/* ========== TEXT ANIMATIONS ========== */
@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5),
                 0 0 20px rgba(255, 255, 255, 0.3),
                 0 0 30px rgba(255, 255, 255, 0.2);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8),
                 0 0 30px rgba(255, 255, 255, 0.5),
                 0 0 40px rgba(255, 255, 255, 0.3);
  }
}

.glow-text {
  animation: textGlow 2s ease-in-out infinite;
}

/* ========== ROTATING GRADIENT BORDER ========== */
@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.rotating-border {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.rotating-border::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ffffff,
    #f0f0f0,
    #e0e0e0,
    #d0d0d0,
    #f0f0f0,
    #ffffff
  );
  animation: rotateBorder 4s linear infinite;
  z-index: -1;
}

.rotating-border::after {
  content: '';
  position: absolute;
  inset: 2px;
  background: rgba(26, 26, 46, 0.95);
  border-radius: 18px;
  z-index: -1;
}

/* ========== WAVE ANIMATION ========== */
@keyframes wave {
  0% {
    transform: translateX(0) translateY(0);
  }
  50% {
    transform: translateX(-25%) translateY(-10px);
  }
  100% {
    transform: translateX(0) translateY(0);
  }
}

.wave-bg {
  position: relative;
  overflow: hidden;
}

.wave-bg::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255, 255, 255, 0.1)' d='M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,112C672,96,768,96,864,112C960,128,1056,160,1152,160C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
  background-size: 50% 100%;
  animation: wave 15s ease-in-out infinite;
  opacity: 0.5;
}

/* ========== BUTTON EFFECTS ========== */
.btn-primary,
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before,
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary:hover,
.btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.5),
              0 0 20px rgba(255, 255, 255, 0.3);
}

.btn-primary:active,
.btn:active {
  transform: translateY(0) scale(0.98);
}

/* ========== FLOATING ANIMATION ========== */
@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-20px) rotate(5deg);
  }
}

.float-animation {
  animation: floatSlow 3s ease-in-out infinite;
}

/* ========== ICON BOUNCE ========== */
@keyframes iconBounce {
  0%, 100% {
    transform: scale(1) rotateZ(0deg);
  }
  25% {
    transform: scale(1.1) rotateZ(-5deg);
  }
  50% {
    transform: scale(1.2) rotateZ(5deg);
  }
  75% {
    transform: scale(1.1) rotateZ(-5deg);
  }
}

.card:hover .icon-bounce {
  animation: iconBounce 0.6s ease;
}

/* ========== GRADIENT TEXT ========== */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 50%, #e0e0e0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* ========== NEON GLOW ========== */
@keyframes neonGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 10px rgba(255, 255, 255, 0.3))
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.2));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8))
            drop-shadow(0 0 20px rgba(255, 255, 255, 0.5))
            drop-shadow(0 0 30px rgba(255, 255, 255, 0.3));
  }
}

.neon-effect {
  animation: neonGlow 2s ease-in-out infinite;
}

/* ========== SLIDE IN ANIMATIONS ========== */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.slide-in-up {
  animation: slideInUp 0.6s ease-out;
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ========== STAGGERED ANIMATIONS ========== */
.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }
.card:nth-child(6) { animation-delay: 0.6s; }
.card:nth-child(7) { animation-delay: 0.7s; }
.card:nth-child(8) { animation-delay: 0.8s; }

/* ========== NAVBAR EFFECTS ========== */
.navbar {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(26, 26, 46, 0.8) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.navbar:hover {
  background: rgba(26, 26, 46, 0.95) !important;
  box-shadow: 0 5px 40px rgba(255, 255, 255, 0.4);
}

/* ========== SCROLLBAR STYLING ========== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(26, 26, 46, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
}

/* ========== TOOLTIP STYLES ========== */
.tooltip-custom {
  position: relative;
}

.tooltip-custom::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tooltip-custom:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========== LOADING SPINNER ========== */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* ========== PROGRESS BAR ANIMATIONS ========== */
@keyframes progressGlow {
  0%, 100% {
    box-shadow: 0 0 5px currentColor,
                0 0 10px currentColor;
  }
  50% {
    box-shadow: 0 0 10px currentColor,
                0 0 20px currentColor,
                0 0 30px currentColor;
  }
}

.progress-bar-animated {
  animation: progressGlow 2s ease-in-out infinite;
}

/* ========== GRID BACKGROUND ========== */
.grid-background {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

/* ========== STAR FIELD ========== */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

.star {
  position: fixed;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
  z-index: -1;
}

/* ========== CARD CONTENT REVEAL ========== */
@keyframes revealContent {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card:hover .card-content {
  animation: revealContent 0.4s ease-out;
}

/* ========== BOUNCE ENTRANCE ========== */
@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

/* ========== FLIP ANIMATION ========== */
@keyframes flip {
  from {
    transform: perspective(400px) rotateY(0);
  }
  to {
    transform: perspective(400px) rotateY(360deg);
  }
}

.flip-animation {
  animation: flip 1s ease-in-out;
}

/* ========== SHAKE ANIMATION ========== */
@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.shake-animation {
  animation: shake 0.5s ease-in-out;
}

/* ========== BLUR REVEAL ========== */
@keyframes blurReveal {
  from {
    filter: blur(10px);
    opacity: 0;
  }
  to {
    filter: blur(0);
    opacity: 1;
  }
}

.blur-reveal {
  animation: blurReveal 0.8s ease-out;
}

/* ========== MORPHING BACKGROUND ========== */
@keyframes morph {
  0%, 100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
}

.morph-background {
  animation: morph 8s ease-in-out infinite;
}

/* ========== HOLOGRAPHIC EFFECT ========== */
@keyframes holographic {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.holographic {
  background: linear-gradient(
    90deg,
    #ffffff 0%,
    #f0f0f0 20%,
    #e0e0e0 40%,
    #d0d0d0 60%,
    #e0e0e0 80%,
    #ffffff 100%
  );
  background-size: 200% 100%;
  animation: holographic 3s linear infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== CARD STACK EFFECT ========== */
.card-stack {
  position: relative;
}

.card-stack::before,
.card-stack::after {
  content: '';
  position: absolute;
  width: 95%;
  height: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  z-index: -1;
}

.card-stack::before {
  top: -5px;
}

.card-stack::after {
  top: -10px;
  background: rgba(255, 255, 255, 0.05);
}

/* ========== BREATHING ANIMATION ========== */
@keyframes breathe {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.breathe-animation {
  animation: breathe 3s ease-in-out infinite;
}

/* ========== GLOW PULSE ========== */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3),
                0 0 20px rgba(255, 255, 255, 0.2),
                0 0 30px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6),
                0 0 40px rgba(255, 255, 255, 0.4),
                0 0 60px rgba(255, 255, 255, 0.2);
  }
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* ========== TYPEWRITER EFFECT ========== */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid #ffffff;
  white-space: nowrap;
  animation: typewriter 3s steps(40) 1s 1 normal both,
             blink 0.75s step-end infinite;
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

/* ========== ZOOM IN/OUT ========== */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes zoomOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0);
  }
}

.zoom-in {
  animation: zoomIn 0.5s ease-out;
}

.zoom-out {
  animation: zoomOut 0.5s ease-out;
}

/* ========== ATTENTION SEEKER ========== */
@keyframes pulse-attention {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
  }
  70% {
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}

.attention-pulse {
  animation: pulse-attention 2s infinite;
}

/* ========== 3D TRANSFORM ========== */
.transform-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.transform-3d:hover {
  transform: rotateY(10deg) rotateX(10deg);
  transition: transform 0.5s ease;
}

/* ========== RAINBOW BORDER ========== */
@keyframes rainbowBorder {
  0% {
    border-color: #ffffff;
  }
  25% {
    border-color: #f0f0f0;
  }
  50% {
    border-color: #e0e0e0;
  }
  75% {
    border-color: #f0f0f0;
  }
  100% {
    border-color: #ffffff;
  }
}

.rainbow-border {
  border: 2px solid;
  animation: rainbowBorder 4s linear infinite;
}

/* ========== MAGNETIC CURSOR EFFECT ========== */
.magnetic {
  transition: transform 0.2s ease;
}

.magnetic:hover {
  transform: scale(1.1);
  cursor: pointer;
}

/* ========== PARALLAX LAYERS ========== */
.parallax-layer {
  position: absolute;
  width: 100%;
  height: 100%;
}

.parallax-layer-1 {
  transform: translateZ(-100px) scale(1.1);
}

.parallax-layer-2 {
  transform: translateZ(-200px) scale(1.2);
}

/* ========== LIQUID EFFECT ========== */
@keyframes liquid {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(0deg);
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    transform: rotate(180deg);
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    transform: rotate(360deg);
  }
}

.liquid-blob {
  animation: liquid 10s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS FOR ANIMATIONS
   ============================================ */

/* Mobile devices - reduce particle count and animation complexity */
@media (max-width: 767.98px) {
  /* Reduce particle visibility on mobile */
  .particle:nth-child(n+11) {
    display: none;
  }

  /* Simplify floating animations */
  @keyframes float {
    0%, 100% {
      transform: translateY(0);
      opacity: 0.2;
    }
    50% {
      transform: translateY(-20px);
      opacity: 0.3;
    }
  }

  /* Reduce glow intensity on mobile */
  .glow-text {
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
  }

  .neon-effect {
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.4),
                 0 0 10px rgba(255, 215, 0, 0.3);
  }

  /* Simplify card transforms */
  .transform-3d {
    transform: none !important;
  }

  /* Reduce blur for better performance */
  body::before {
    opacity: 0.8;
  }

  /* Simplify morphing backgrounds */
  .morph-background {
    animation: none;
  }

  /* Reduce wave animation complexity */
  .wave-bg::after {
    animation-duration: 20s;
  }

  /* Simplify holographic effect */
  .holographic {
    background: linear-gradient(135deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  /* Reduce icon bounce */
  .icon-bounce {
    animation-duration: 3s;
  }

  /* Simplify attention pulse */
  .attention-pulse {
    animation: pulse 2s ease-in-out infinite;
  }

  /* Reduce ripple effect */
  .ripple::after {
    animation-duration: 1s;
  }

  /* Disable parallax on mobile */
  .parallax-layer {
    transform: none !important;
  }

  /* Simplify liquid blobs */
  .liquid-blob {
    animation-duration: 15s;
  }

  /* Reduce scrollbar styling */
  ::-webkit-scrollbar {
    width: 8px;
  }

  ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.2));
  }
}

/* Tablets - moderate effects */
@media (min-width: 768px) and (max-width: 991.98px) {
  /* Show fewer particles */
  .particle:nth-child(n+21) {
    display: none;
  }

  /* Moderate glow effects */
  .glow-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4),
                 0 0 20px rgba(255, 255, 255, 0.3);
  }
}

/* Landscape mobile - special handling */
@media (max-width: 767.98px) and (orientation: landscape) {
  /* Hide all particles in landscape mobile */
  .particle {
    display: none;
  }

  /* Minimize animations */
  .float-animation,
  .icon-bounce,
  .pulse-effect {
    animation-duration: 4s;
  }
}

/* Touch devices - optimize for performance */
@media (hover: none) and (pointer: coarse) {
  /* Disable expensive hover effects */
  .magnetic:hover {
    transform: scale(1.05);
  }

  .transform-3d:hover {
    transform: translateY(-5px);
  }

  /* Simplify backdrop filters */
  .glassmorphism {
    backdrop-filter: blur(5px);
  }

  /* Reduce glow on active state instead of hover */
  .card:active {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  /* Disable all animations */
  .particle,
  .float-animation,
  .icon-bounce,
  .pulse-effect,
  .rotating-border,
  .wave-bg,
  .morph-background,
  .holographic,
  .gradient-text,
  .shimmer-effect,
  .glitch-effect,
  .typewriter,
  .card-stack,
  .attention-pulse,
  .ripple,
  .magnetic,
  .liquid-blob {
    animation: none !important;
  }

  /* Disable transforms */
  .transform-3d {
    transform: none !important;
  }

  /* Keep only essential transitions */
  * {
    transition: opacity 0.2s ease, background-color 0.2s ease !important;
  }
}

/* High performance mode for low-end devices */
@media (max-width: 575.98px) and (prefers-reduced-motion: no-preference) {
  /* Minimal particles */
  .particle:nth-child(n+6) {
    display: none;
  }

  /* Disable expensive effects */
  body::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: none;
  }

  /* Simplify glassmorphism */
  .glassmorphism,
  .card,
  .navbar {
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.2);
  }

  /* Disable text effects */
  .gradient-text,
  .holographic,
  .shimmer-effect {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: inherit;
    color: #ffffff;
  }
}

/* Print styles */
@media print {
  /* Hide all decorative effects */
  .particle,
  body::before,
  .float-animation,
  .wave-bg::after,
  .rotating-border::before {
    display: none !important;
  }

  /* Simplify backgrounds */
  body {
    background: white;
  }

  .card,
  .navbar {
    background: white;
    border: 1px solid #000;
    box-shadow: none;
  }

  /* Ensure text is readable */
  .gradient-text,
  .holographic,
  .glow-text {
    -webkit-text-fill-color: black;
    color: black;
    text-shadow: none;
  }
}