/* MysteryMaker - Premium CSS with Widget Styles */

/* ========================================
   BASE STYLES
======================================== */

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar - Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1b2e;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #a78bfa);
    border-radius: 5px;
    border: 2px solid #1e1b2e;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa, #c4b5fd);
}

/* Custom scrollbar - Firefox */
html {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #1e1b2e;
}

/* Material Icons adjustments */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Selection styling */
::selection {
    background: rgba(139, 92, 246, 0.4);
    color: white;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* ========================================
   PREMIUM EFFECTS
======================================== */

/* Animated Gradient Orb */
.gradient-orb {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, rgba(139, 92, 246, 0.1) 40%, transparent 70%);
    filter: blur(60px);
    animation: float-orb 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.gradient-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0.05) 40%, transparent 70%);
    animation: float-orb-reverse 20s ease-in-out infinite;
    animation-delay: -5s;
}

@keyframes float-orb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(50px, -30px) scale(1.1);
    }

    50% {
        transform: translate(-30px, 50px) scale(0.95);
    }

    75% {
        transform: translate(-50px, -20px) scale(1.05);
    }
}

@keyframes float-orb-reverse {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(-40px, 40px) scale(0.95);
    }

    50% {
        transform: translate(40px, -40px) scale(1.1);
    }

    75% {
        transform: translate(20px, 30px) scale(1);
    }
}

/* Custom Magnifying Glass Cursor - CSS Geometry */
.custom-cursor {
    position: fixed;
    width: 24px;
    /* Linsen-Größe */
    height: 24px;
    border: 2.5px solid white;
    /* Linsen-Rahmen */
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    /* Schatten für Tiefe */
    transition: width 0.2s, height 0.2s, transform 0.1s ease-out;
}

/* Der Griff der Lupe */
.custom-cursor::after {
    content: '';
    position: absolute;
    top: 18px;
    /* Position unten rechts am Kreis */
    left: 18px;
    width: 10px;
    /* Griff-Länge */
    height: 3px;
    /* Griff-Dicke */
    background: white;
    transform: rotate(45deg);
    /* Diagonal */
    transform-origin: top left;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

/* Hover State - Lupe wird etwas größer */
.custom-cursor.cursor-hover {
    width: 32px;
    height: 32px;
    border-color: #8b5cf6;
    /* Lila Rahmen beim Hovern */
}

/* Griff färbt sich auch lila beim Hovern */
.custom-cursor.cursor-hover::after {
    background: #8b5cf6;
    top: 24px;
    /* Position anpassen für grösseren Kreis */
    left: 24px;
}

/* Old rules removed */

/* Hide default cursor when custom cursor is active */
@media (min-width: 1024px) {
    body:has(.custom-cursor) {
        cursor: none;
    }

    body:has(.custom-cursor) a,
    body:has(.custom-cursor) button,
    body:has(.custom-cursor) input,
    body:has(.custom-cursor) textarea,
    body:has(.custom-cursor) select {
        cursor: none;
    }
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Pulsing Glow CTA */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.3), 0 0 0 0 rgba(139, 92, 246, 0.4);
    }

    50% {
        box-shadow: 0 8px 32px rgba(139, 92, 246, 0.5), 0 0 0 8px rgba(139, 92, 246, 0);
    }
}

/* Animated Border Gradient */
.border-gradient-animated {
    position: relative;
    background: linear-gradient(var(--bg-color, #131022), var(--bg-color, #131022)) padding-box,
        linear-gradient(90deg, #8b5cf6, #22c55e, #8b5cf6) border-box;
    border: 2px solid transparent;
    background-size: 100% 100%, 200% 100%;
    animation: border-shimmer 3s linear infinite;
}

@keyframes border-shimmer {
    0% {
        background-position: 0 0, 0% 50%;
    }

    100% {
        background-position: 0 0, 200% 50%;
    }
}

/* Testimonial Slider */
.testimonial-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.testimonial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background: #8b5cf6;
    transform: scale(1.3);
}

.testimonial-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

/* Floating Animation */
.float-animate {
    animation: float-gentle 6s ease-in-out infinite;
}

.float-animate-delay {
    animation: float-gentle 6s ease-in-out infinite;
    animation-delay: -3s;
}

@keyframes float-gentle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Text Gradient Animation */
.text-gradient-animated {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #22c55e, #8b5cf6);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s linear infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(139, 92, 246, 0.3);
}

/* Shine Effect on Hover */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.shine-effect:hover::before {
    left: 100%;
}

/* ========================================
   NAVBAR
======================================== */

.navbar-scrolled {
    background: rgba(19, 16, 34, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================
   FAQ ACCORDION
======================================== */

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    display: block;
}

/* ========================================
   WIDGET: ACTIVITY TOAST
======================================== */

.activity-toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(30, 27, 46, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateX(-120%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 320px;
}

.activity-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
}

.toast-content {
    font-size: 13px;
    color: #a1a1aa;
    line-height: 1.4;
}

.toast-content strong {
    color: white;
}

.toast-close {
    position: absolute;
    top: 4px;
    right: 8px;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
}

.toast-close:hover {
    color: white;
}

/* ========================================
   WIDGET: FLOATING PARTICLES
======================================== */

.particles-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    bottom: -10px;
    width: 4px;
    height: 4px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: 50%;
    animation: float-up linear infinite;
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(0.5);
        opacity: 0;
    }
}

/* ========================================
   WIDGET: CONFETTI
======================================== */

.confetti {
    position: fixed;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    pointer-events: none;
    z-index: 100;
    animation: confetti-fall 1s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translate(var(--x), var(--y)) rotate(var(--r));
        opacity: 0;
    }
}

/* ========================================
   WIDGET: 3D TILT CARDS
======================================== */

.group {
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
}

.group:hover {
    box-shadow: 0 20px 40px -10px rgba(139, 92, 246, 0.2);
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out;
}

/* Bounce animation for scroll indicator */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(6px);
    }
}

/* Shimmer effect for loading states */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   UTILITY CLASSES
======================================== */

/* Hide scrollbar for carousels */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Glassmorphism utility */
.glass {
    background: rgba(30, 27, 46, 0.7);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow effect utility */
.glow {
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.3);
}

/* ========================================
   SCROLL REVEAL
======================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Children Animation for Grids */
.reveal .grid>*,
.reveal ul>li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.reveal.revealed .grid>*,
.reveal.revealed ul>li {
    opacity: 1;
    transform: translateY(0);
}

.reveal.revealed .grid>*:nth-child(1),
.reveal.revealed ul>li:nth-child(1) {
    transition-delay: 100ms;
}

.reveal.revealed .grid>*:nth-child(2),
.reveal.revealed ul>li:nth-child(2) {
    transition-delay: 200ms;
}

.reveal.revealed .grid>*:nth-child(3),
.reveal.revealed ul>li:nth-child(3) {
    transition-delay: 300ms;
}

.reveal.revealed .grid>*:nth-child(4),
.reveal.revealed ul>li:nth-child(4) {
    transition-delay: 400ms;
}

.reveal.revealed .grid>*:nth-child(5),
.reveal.revealed ul>li:nth-child(5) {
    transition-delay: 500ms;
}

.reveal.revealed .grid>*:nth-child(6),
.reveal.revealed ul>li:nth-child(6) {
    transition-delay: 600ms;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
======================================== */

@media (max-width: 640px) {
    .activity-toast {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: calc(100% - 24px);
    }
}

/* 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;
    }
}

/* ========================================
   STICKY CTA BUTTON
======================================== */

.sticky-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 90;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-cta.show {
    transform: translateY(0);
    opacity: 1;
}

.sticky-cta a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(139, 92, 246, 0.4);
    transition: all 0.2s ease;
}

.sticky-cta a:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.5);
}

@media (max-width: 640px) {
    .sticky-cta {
        right: 16px;
        bottom: 16px;
    }

    .sticky-cta a {
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* ========================================
   PARALLAX EFFECTS
======================================== */

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

@supports (-webkit-touch-callout: none) {

    /* iOS doesn't support background-attachment: fixed */
    .parallax-bg {
        background-attachment: scroll;
    }
}

.parallax-layer {
    transform: translateZ(0);
    will-change: transform;
}

/* ========================================
   DARK/LIGHT THEME TOGGLE
======================================== */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.theme-toggle .material-symbols-outlined {
    font-size: 20px;
    color: #a1a1aa;
    transition: color 0.2s ease;
}

.theme-toggle:hover .material-symbols-outlined {
    color: white;
}

/* Light Theme Styles */
body.light-theme {
    --bg-dark: #f8fafc;
    --bg-surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme {
    background-color: #f8fafc;
    color: #0f172a;
}

body.light-theme .bg-background-dark {
    background-color: #f1f5f9 !important;
}

body.light-theme .bg-surface-dark {
    background-color: #ffffff !important;
}

body.light-theme .text-white {
    color: #0f172a !important;
}

body.light-theme .text-gray-400,
body.light-theme .text-gray-500 {
    color: #64748b !important;
}

body.light-theme .text-gray-300 {
    color: #475569 !important;
}

body.light-theme .border-white\/5,
body.light-theme .border-white\/10 {
    border-color: rgba(0, 0, 0, 0.08) !important;
}

/* Keep white text on dark gradient overlays (setting cards, genre cards) */
body.light-theme .bg-gradient-to-t .text-white,
body.light-theme [class*="from-black"] .text-white,
body.light-theme .absolute .text-white {
    color: white !important;
}

body.light-theme .bg-gradient-to-t .text-gray-300,
body.light-theme [class*="from-black"] .text-gray-300,
body.light-theme .absolute .text-gray-300 {
    color: #d1d5db !important;
}

body.light-theme .bg-gradient-to-t .text-gray-400,
body.light-theme [class*="from-black"] .text-gray-400,
body.light-theme .absolute .text-gray-400 {
    color: #9ca3af !important;
}

body.light-theme .navbar-scrolled {
    background: rgba(248, 250, 252, 0.95) !important;
    border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .activity-toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .theme-toggle .material-symbols-outlined {
    color: #64748b;
}

body.light-theme .theme-toggle:hover .material-symbols-outlined {
    color: #0f172a;
}

/* ========================================
   PRICING PAGE ANIMATIONS
======================================== */

/* Navbar Glass Effect */
.navbar-pricing-scrolled {
    background: rgba(255, 255, 255, 0.8) !important;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    height: 64px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .navbar-pricing-scrolled {
    background: rgba(30, 27, 46, 0.8) !important;
}

/* Card Glow Sweep */
.card-glow {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    z-index: 1;
    pointer-events: none;
}

/* Spotlight Highlight */
.comparison-card-highlight {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
    z-index: 10;
}

.comparison-card-highlight::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), rgba(139, 92, 246, 0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
    border-radius: inherit;
    z-index: 2;
}

.comparison-card-highlight:hover::before {
    opacity: 1;
}

/* Reduced Motion Overrides */
@media (prefers-reduced-motion: reduce) {
    .card-glow {
        display: none;
    }
}

/* ========================================
   TRANSPARENCY SECTION - CLEAN DESIGN
======================================== */

/* Cost Cards */
.cost-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.cost-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.15);
}

/* Cost Icons */
.cost-icon {
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cost-card:hover .cost-icon {
    transform: scale(1.05);
}

/* Trust Statement */
.trust-statement {
    transition: transform 0.3s ease;
}

.trust-statement:hover {
    transform: scale(1.02);
}

/* ========================================
   HOW IT WORKS PAGE ANIMATIONS
======================================== */

/* Active Step Highlight */
.step-container {
    transition: all 0.4s ease;
    border-left: 3px solid transparent;
    padding-left: 0;
    margin-left: 0;
}

.step-container.is-active {
    border-left-color: rgba(139, 92, 246, 0.5);
    padding-left: 1rem;
    margin-left: -1rem;
}

.step-container.is-active .step-number {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 10px 25px rgba(139, 92, 246, 0.3);
}

.step-number {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Shimmer Overlay */
.shimmer-overlay {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* ========================================
   PREMIUM PAGE ANIMATIONS
======================================== */

/* Fade In Up - für Cards und Form-Elemente */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Glow - für Icons und wichtige Elemente */
.animate-pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
    }

    50% {
        box-shadow: 0 0 25px rgba(139, 92, 246, 0.6), 0 0 50px rgba(139, 92, 246, 0.3);
    }
}

/* Slide In - für seitliche Elemente */
.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale In - für Pop-Effekte */
.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Float Animation - für schwebende Elemente */
.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}