/* ============================================
   RUPEESMILE - EXTENDED EFFECTS & ANIMATIONS
   ============================================ */

/* Particle Animation (for background) */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
    opacity: 0.5;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-40px) translateX(-10px);
    opacity: 0.3;
  }
  75% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.6;
  }
}

/* Pulsing Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 225, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 225, 255, 0.8);
  }
}

/* Neon Border Effect */
@keyframes neonBorder {
  0%, 100% {
    border-color: rgba(0, 225, 255, 0.3);
  }
  50% {
    border-color: rgba(0, 225, 255, 0.8);
  }
}

/* Text Shimmer */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Slide In Animation */
@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(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Bounce Animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Rotate Animation */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Scale Pulse */
@keyframes scalePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Gradient Shift */
@keyframes gradientFlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Float Effect */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Gradient Text Animation */
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientFlow 3s linear infinite;
}

/* Pulsing Element */
.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Floating Element */
.floating {
  animation: float 3s ease-in-out infinite;
}

/* Bounce Element */
.bounce-animation {
  animation: bounce 2s ease-in-out infinite;
}

/* Smooth Background Transitions */
.bg-gradient-1 {
  background: linear-gradient(135deg, #0A0F1F 0%, #1a1f3a 50%, #0A0F1F 100%);
  background-size: 400% 400%;
  animation: gradientFlow 15s ease infinite;
}

/* Glassmorphism Hover Effect */
.glass-hover {
  transition: all 0.3s ease;
  position: relative;
}

.glass-hover:hover {
  backdrop-filter: blur(20px);
  background: rgba(10, 15, 31, 0.95);
  border-color: rgba(0, 225, 255, 0.6);
}

/* Neon Text Shadow */
.neon-text {
  text-shadow: 0 0 10px rgba(0, 225, 255, 0.7),
               0 0 20px rgba(0, 225, 255, 0.5),
               0 0 30px rgba(147, 51, 255, 0.5);
}

/* Button Glow on Hover */
.btn.glow-on-hover:hover {
  animation: pulseGlow 0.6s ease-in-out;
}

/* Card Stack Effect */
.card-stack {
  position: relative;
}

.card-stack::before,
.card-stack::after {
  content: '';
  position: absolute;
  background: inherit;
  border: inherit;
  border-radius: inherit;
  z-index: -1;
}

.card-stack::before {
  top: 8px;
  left: 8px;
  opacity: 0.3;
}

.card-stack::after {
  top: 16px;
  left: 16px;
  opacity: 0.1;
}

/* Typewriter Effect */
@keyframes typewriter {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

.typewriter {
  overflow: hidden;
  border-right: 3px solid var(--primary);
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: typewriter 3.5s steps(40, end),
             blink-caret 0.75s step-end infinite;
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary);
  }
}

/* Accent Border Animation */
.accent-border {
  position: relative;
  padding: 1px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% auto;
  animation: gradientFlow 3s linear infinite;
}

/* Code Block Styling (for potential blog/docs) */
code {
  background: rgba(0, 225, 255, 0.1);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

pre {
  background: rgba(10, 15, 31, 0.9);
  border: 1px solid rgba(0, 225, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  overflow-x: auto;
  color: var(--primary);
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Hero Text Animations */
.hero-text-glow {
  animation: fadeIn 1s ease, pulseGlow 3s ease-in-out infinite;
}

/* Underline Animation */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.3s ease;
}

.underline-animation:hover::after {
  width: 100%;
}

/* Border Glow Effect */
.border-glow {
  position: relative;
  border: 2px solid var(--primary);
  background: rgba(10, 15, 31, 0.7);
}

.border-glow::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.border-glow:hover::before {
  opacity: 0.5;
}

/* Section Divider Animation */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    var(--primary), 
    transparent);
  margin: var(--spacing-2xl) 0;
  position: relative;
  animation: gradientFlow 3s linear infinite;
}

/* Tab Navigation */
.tab-nav {
  display: flex;
  border-bottom: 1px solid rgba(0, 225, 255, 0.2);
  gap: var(--spacing-lg);
}

.tab-btn {
  padding: var(--spacing-md) var(--spacing-lg);
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 600;
  text-transform: uppercase;
  position: relative;
  transition: color var(--transition-normal);
}

.tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition-normal);
}

.tab-btn:hover,
.tab-btn.active {
  color: var(--primary);
}

.tab-btn.active::after {
  width: 100%;
}

/* Smooth Page Transitions */
html {
  scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  border: 3px solid rgba(0, 225, 255, 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

/* Success State Animation */
@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.checkmark {
  animation: checkmark 0.6s ease;
}

/* Text Gradient Effect */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Icon Pulse */
.icon-pulse {
  animation: pulseGlow 1.5s ease-in-out infinite;
}

/* Stagger Animation */
@keyframes stagger {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-1 { animation: stagger 0.3s ease 0.1s both; }
.stagger-2 { animation: stagger 0.3s ease 0.2s both; }
.stagger-3 { animation: stagger 0.3s ease 0.3s both; }
.stagger-4 { animation: stagger 0.3s ease 0.4s both; }
.stagger-5 { animation: stagger 0.3s ease 0.5s both; }

/* Smooth Scroll Anchor */
:target {
  scroll-margin-top: 80px;
}

/* Selection Color */
::selection {
  background: var(--primary);
  color: var(--secondary);
}

::-moz-selection {
  background: var(--primary);
  color: var(--secondary);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 15, 31, 0.5);
}

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

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

/* Focus States */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Smooth Transitions */
* {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 0.2s;
  transition-timing-function: ease;
}

button, a, input, textarea, select {
  transition: all var(--transition-normal);
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
  :root {
    --primary: #00FFFF;
    --accent: #DD33FF;
  }
}

/* Dark Mode Preference (if needed) */
@media (prefers-color-scheme: dark) {
  body {
    color-scheme: dark;
  }
}

/* Print Styles */
@media print {
  nav,
  footer,
  .scroll-to-top,
  .mobile-menu-toggle {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .card,
  .btn {
    box-shadow: none;
    border: 1px solid #ccc;
  }
}
