/* css/fun-mode.css - Party mode styles for heyasher.com */

/* ===================================
   Fun Mode Base
   =================================== */
.fun-container {
    display: none;
    opacity: 0;
    --bg-dark: #0a0a0f;
    --accent: #6366f1;
    --accent-bright: #818cf8;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #1e293b;
    --glow: #6366f1;
}

/* ===================================
   Mouse Tracking Orbs
   =================================== */
.mouse-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: screen;
    z-index: 1;
    display: none;
}

body.fun-mode .mouse-orb {
    display: block;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.15) 0%, transparent 50%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===================================
   Background Mesh
   =================================== */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.6s ease;
}

body.fun-mode .bg-mesh {
    opacity: 0.03;
}

.bg-mesh::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        var(--accent) 10px,
        var(--accent) 11px
    );
    animation: mesh-move 20s linear infinite;
}

/* ===================================
   Disco Lights Container
   =================================== */
.disco-lights {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: none; /* Hidden by default */
}

body.fun-mode .disco-lights {
    display: block; /* Should show in fun mode */
}

/* ===================================
   3D Disco Ball
   =================================== */
.disco-ball-container {
    position: fixed;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    perspective: 800px;
}

.disco-ball {
    width: 100px;
    height: 100px;
    position: relative;
    transform-style: preserve-3d;
    animation: disco-rotate 8s linear infinite;
}

.disco-ball-face {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, silver, #fff);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 2px;
    padding: 2px;
}

.mirror-tile {
    background: linear-gradient(135deg, #fff 0%, #c0c0c0 50%, #808080 100%);
    border: 0.5px solid rgba(0,0,0,0.1);
    animation: sparkle 2s linear infinite;
}

.mirror-tile:nth-child(odd) { animation-delay: 0.1s; }
.mirror-tile:nth-child(even) { animation-delay: 0.5s; }
.mirror-tile:nth-child(3n) { animation-delay: 1s; }

/* Position each face of the disco ball */
.disco-ball-face:nth-child(1) { transform: rotateY(0deg) translateZ(50px); }
.disco-ball-face:nth-child(2) { transform: rotateY(90deg) translateZ(50px); }
.disco-ball-face:nth-child(3) { transform: rotateY(180deg) translateZ(50px); }
.disco-ball-face:nth-child(4) { transform: rotateY(270deg) translateZ(50px); }
.disco-ball-face:nth-child(5) { transform: rotateX(90deg) translateZ(50px); }
.disco-ball-face:nth-child(6) { transform: rotateX(-90deg) translateZ(50px); }

/* Light beams from disco ball */
.disco-light-beam {
    position: absolute;
    width: 2px;
    height: 500px;
    background: linear-gradient(transparent, rgba(255,255,255,0.8), transparent) !important; /* Add !important */
    transform-origin: top center;
    top: 100%;
    left: 50%;
    opacity: 0.6;
    animation: beam-rotate 4s linear infinite;
}

.disco-light-beam:nth-child(1) {
    background: linear-gradient(transparent, rgba(255,0,255,0.6), transparent);
    animation-duration: 3s;
    transform: rotate(45deg);
}

.disco-light-beam:nth-child(2) {
    background: linear-gradient(transparent, rgba(0,255,255,0.6), transparent);
    animation-duration: 3.5s;
    transform: rotate(-45deg);
}

.disco-light-beam:nth-child(3) {
    background: linear-gradient(transparent, rgba(255,255,0,0.6), transparent);
    animation-duration: 4.5s;
    transform: rotate(90deg);
}

/* ===================================
   Laser Effects
   =================================== */
.laser {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(transparent, #00ff00, transparent);
    animation: laser-sweep 3s linear infinite;
    opacity: 0.6;
    filter: blur(1px);
    box-shadow: 0 0 10px #00ff00;
}

.laser:nth-child(5) {
    background: linear-gradient(transparent, #ff00ff, transparent);
    animation-delay: 1s;
    animation-duration: 2.5s;
    box-shadow: 0 0 10px #ff00ff;
}

.laser:nth-child(6) {
    background: linear-gradient(transparent, #00ffff, transparent);
    animation-delay: 2s;
    animation-duration: 3.5s;
    box-shadow: 0 0 10px #00ffff;
}

/* ===================================
   Spotlights
   =================================== */
.spotlight {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 255, 0.3) 0%, transparent 70%);
    animation: spotlight-move 8s ease-in-out infinite;
    filter: blur(20px);
}

.spotlight:nth-child(7) {
    background: radial-gradient(circle, rgba(0, 255, 255, 0.3) 0%, transparent 70%);
    animation-delay: 2s;
    animation-duration: 6s;
}

.spotlight:nth-child(8) {
    background: radial-gradient(circle, rgba(255, 255, 0, 0.3) 0%, transparent 70%);
    animation-delay: 4s;
    animation-duration: 7s;
}

/* ===================================
   Fun Mode Content Styles
   =================================== */
.fun-card {
    background: rgba(255, 255, 255, 0.02);
    border: 2px solid #1e293b;
    border-radius: 20px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: rainbow-border 3s linear infinite;
}

.fun-card:hover {
    transform: scale(1.05) rotate(1deg) !important;
    border-color: #fff !important;
    animation-play-state: paused !important;
}

.fun-card:nth-child(odd):hover {
    transform: scale(1.05) rotate(-1deg) !important;
}

/* ===================================
   Glitch Effect
   =================================== */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #6366f1;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #ec4899;
    z-index: -2;
}

/* ===================================
   Keyframe Animations
   =================================== */
@keyframes disco-rotate {
    0% { transform: rotateX(-20deg) rotateY(0deg); }
    100% { transform: rotateX(-20deg) rotateY(360deg); }
}

@keyframes sparkle {
    0%, 100% { 
        background: linear-gradient(135deg, #fff 0%, #c0c0c0 50%, #808080 100%);
        box-shadow: 0 0 5px rgba(255,255,255,0.5);
    }
    50% { 
        background: linear-gradient(135deg, #ffff00 0%, #ff00ff 50%, #00ffff 100%);
        box-shadow: 0 0 15px rgba(255,255,255,1);
    }
}

@keyframes beam-rotate {
    0% { transform: rotate(0deg) scaleY(1); }
    50% { transform: rotate(180deg) scaleY(1.2); }
    100% { transform: rotate(360deg) scaleY(1); }
}

@keyframes laser-sweep {
    0% { transform: translateX(0) rotate(0deg); }
    50% { transform: translateX(100vw) rotate(180deg); }
    100% { transform: translateX(0) rotate(360deg); }
}

@keyframes spotlight-move {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(50vw, 20vh) scale(1.5); }
    50% { transform: translate(30vw, 60vh) scale(0.8); }
    75% { transform: translate(70vw, 40vh) scale(1.2); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes rainbow-border {
    0% { border-color: #ff0000; box-shadow: 0 0 30px #ff0000, inset 0 0 30px rgba(255,0,0,0.1); }
    17% { border-color: #ff8800; box-shadow: 0 0 30px #ff8800, inset 0 0 30px rgba(255,136,0,0.1); }
    33% { border-color: #ffff00; box-shadow: 0 0 30px #ffff00, inset 0 0 30px rgba(255,255,0,0.1); }
    50% { border-color: #00ff00; box-shadow: 0 0 30px #00ff00, inset 0 0 30px rgba(0,255,0,0.1); }
    67% { border-color: #0088ff; box-shadow: 0 0 30px #0088ff, inset 0 0 30px rgba(0,136,255,0.1); }
    83% { border-color: #ff00ff; box-shadow: 0 0 30px #ff00ff, inset 0 0 30px rgba(255,0,255,0.1); }
    100% { border-color: #ff0000; box-shadow: 0 0 30px #ff0000, inset 0 0 30px rgba(255,0,0,0.1); }
}

@keyframes mesh-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@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%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gradient-shift {
    0%, 100% { filter: hue-rotate(0deg); }
    50% { filter: hue-rotate(30deg); }
}

@keyframes wild-dance {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); }
    20% { transform: translate(20px, -30px) scale(1.3) rotate(45deg); }
    40% { transform: translate(-30px, -20px) scale(0.8) rotate(90deg); }
    60% { transform: translate(-20px, 30px) scale(1.4) rotate(180deg); }
    80% { transform: translate(30px, 20px) scale(0.9) rotate(270deg); }
    100% { transform: translate(0, 0) scale(1) rotate(360deg); }
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
}

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

@keyframes bounce-text {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-2deg); }
    75% { transform: scale(1.1) rotate(2deg); }
}

@keyframes glitch-1 {
    0% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    20% { clip-path: inset(30% 0 20% 0); transform: translate(2px, -2px); }
    40% { clip-path: inset(10% 0 40% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(40% 0 10% 0); transform: translate(2px, -2px); }
    80% { clip-path: inset(25% 0 25% 0); transform: translate(-2px, 2px); }
    100% { clip-path: inset(20% 0 30% 0); transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0% { clip-path: inset(25% 0 25% 0); transform: translate(2px, -2px); }
    20% { clip-path: inset(10% 0 40% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(40% 0 10% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(30% 0 20% 0); transform: translate(-2px, 2px); }
    80% { clip-path: inset(20% 0 30% 0); transform: translate(2px, -2px); }
    100% { clip-path: inset(25% 0 25% 0); transform: translate(-2px, 2px); }
}

/* ===================================
   Mobile Optimizations
   =================================== */
@media (max-width: 640px) {
    /* Reduce particle counts on mobile */
    .disco-ball {
        width: 80px;
        height: 80px;
    }
    
    .disco-ball-face {
        width: 80px;
        height: 80px;
    }
    
    /* Adjust the translateZ to match smaller disco ball */
    .disco-ball-face:nth-child(1) { transform: rotateY(0deg) translateZ(40px); }
    .disco-ball-face:nth-child(2) { transform: rotateY(90deg) translateZ(40px); }
    .disco-ball-face:nth-child(3) { transform: rotateY(180deg) translateZ(40px); }
    .disco-ball-face:nth-child(4) { transform: rotateY(270deg) translateZ(40px); }
    .disco-ball-face:nth-child(5) { transform: rotateX(90deg) translateZ(40px); }
    .disco-ball-face:nth-child(6) { transform: rotateX(-90deg) translateZ(40px); }
    
    /* Smaller light beams on mobile */
    .disco-light-beam {
        height: 300px;
        width: 1px;
    }
    
    /* Reduce orb sizes for better performance */
    .orb-1 {
        width: 200px;
        height: 200px;
    }
    
    .orb-2 {
        width: 150px;
        height: 150px;
    }
    
    .orb-3 {
        width: 100px;
        height: 100px;
    }
    
    /* Optimize fun cards for mobile */
    .fun-card {
        animation-duration: 5s; /* Slower animation */
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .fun-container *,
    .disco-lights * {
        animation: none !important;
        transition: none !important;
    }
    
    .mouse-orb,
    .bg-mesh {
        display: none !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Bigger touch targets for links */
    .minimal-company a,
    .minimal-contact-info a {
        padding: 8px 4px;
        margin: -8px -4px;
        display: inline-block;
    }
}

/* iPhone notch/island support */
@supports (padding: max(0px)) {
    .minimal-container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        padding-bottom: max(60px, env(safe-area-inset-bottom));
    }
}

/* Landscape mobile adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .minimal-hero {
        margin-bottom: 40px;
    }
    
    .minimal-container {
        padding-top: 80px;
    }
    
    .disco-ball-container {
        top: 10px;
    }
}