/**
 * Cosmic Lubrication - Custom Styles
 * Premium, luxurious design with dramatic effects
 */

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Custom selection color */
::selection {
    background-color: rgba(0, 212, 255, 0.3);
    color: white;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #00d4ff;
    outline-offset: 2px;
}

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

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff 0%, #9b6dff 50%, #ff6eb4 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00d4ff 0%, #ff6eb4 100%);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #00d4ff #000;
}

/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================
   ANIMATED GRADIENT TEXT
   ========================================== */
@keyframes gradient-x {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

/* ==========================================
   FLOATING PARTICLES
   ========================================== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(0, 212, 255, 0.6);
    border-radius: 50%;
    animation: particle-float 15s infinite ease-in-out;
}

.particle-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    background: rgba(0, 212, 255, 0.5);
}

.particle-2 {
    top: 60%;
    left: 80%;
    animation-delay: 2s;
    background: rgba(155, 109, 255, 0.5);
    width: 6px;
    height: 6px;
}

.particle-3 {
    top: 80%;
    left: 30%;
    animation-delay: 4s;
    background: rgba(255, 110, 180, 0.5);
}

.particle-4 {
    top: 30%;
    left: 70%;
    animation-delay: 6s;
    background: rgba(0, 212, 255, 0.4);
    width: 3px;
    height: 3px;
}

.particle-5 {
    top: 50%;
    left: 20%;
    animation-delay: 8s;
    background: rgba(155, 109, 255, 0.4);
    width: 5px;
    height: 5px;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        transform: translateY(-100px) translateX(50px) scale(1.5);
        opacity: 0.8;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-200px) translateX(-20px) scale(0.5);
        opacity: 0;
    }
}

/* ==========================================
   SCROLL INDICATOR
   ========================================== */
@keyframes scroll-indicator {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.5;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* ==========================================
   GLOW EFFECTS
   ========================================== */
.glow-cyan {
    box-shadow: 0 0 60px rgba(0, 212, 255, 0.4);
}

.glow-purple {
    box-shadow: 0 0 60px rgba(155, 109, 255, 0.4);
}

.glow-pink {
    box-shadow: 0 0 60px rgba(255, 110, 180, 0.4);
}

/* Hover glow effect */
.hover-glow:hover {
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
}

/* ==========================================
   GLASSMORPHISM
   ========================================== */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ==========================================
   BUTTON EFFECTS
   ========================================== */
.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::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;
}

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

/* Button press effect */
button:active,
a[role="button"]:active,
.btn:active {
    transform: scale(0.98);
}

/* ==========================================
   CARD HOVER EFFECTS
   ========================================== */
.card-lift {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   TEXT EFFECTS
   ========================================== */
.text-glow {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
}

.text-glow-pink {
    text-shadow: 0 0 20px rgba(255, 110, 180, 0.5);
}

/* ==========================================
   BACKGROUND EFFECTS
   ========================================== */
.bg-noise {
    position: relative;
}

.bg-noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
}

/* ==========================================
   FORM STYLES
   ========================================== */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px #0a0a0f inset;
    box-shadow: 0 0 0px 1000px #0a0a0f inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Form focus glow */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

/* ==========================================
   MOBILE MENU ANIMATION
   ========================================== */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   DETAILS/SUMMARY STYLING
   ========================================== */
details summary::-webkit-details-marker {
    display: none;
}

details[open] summary {
    margin-bottom: 0;
}

/* ==========================================
   IMAGE EFFECTS
   ========================================== */
.img-glow {
    filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.3));
}

.img-glow-intense {
    filter: drop-shadow(0 0 80px rgba(0, 212, 255, 0.5));
}

/* ==========================================
   BORDER GRADIENT
   ========================================== */
.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(#0a0a0f, #0a0a0f) padding-box,
                linear-gradient(135deg, #00d4ff, #9b6dff, #ff6eb4) border-box;
}

/* ==========================================
   PULSE ANIMATIONS
   ========================================== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 212, 255, 0.6);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

/* ==========================================
   SHIMMER LOADING
   ========================================== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================
   FADE IN ANIMATIONS
   ========================================== */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
}

/* ==========================================
   STAR TWINKLE
   ========================================== */
@keyframes twinkle {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 1;
    }
}

.star {
    animation: twinkle 2s ease-in-out infinite;
}

/* ==========================================
   PRINT STYLES
   ========================================== */
@media print {
    nav,
    footer,
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    a {
        text-decoration: underline;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .particle {
        display: none;
    }
}

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