/* Modern CSS Animations and Typography for RemoteChastity */

/* Typography Enhancements */
:root {
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    --gradient-primary: linear-gradient(135deg, #ff6420 0%, #0099ff 100%);
    --gradient-secondary: linear-gradient(135deg, #ff5a1f 0%, #ff7043 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #0099ff 100%);
}

/* Global Typography */
* {
    font-family: var(--font-primary);
}

h1, h2, h3, h4, h5, h6,
.mud-typography-h1, .mud-typography-h2, .mud-typography-h3, 
.mud-typography-h4, .mud-typography-h5, .mud-typography-h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.mud-typography-body1, .mud-typography-body2 {
    font-family: var(--font-primary);
    line-height: 1.6;
    font-weight: 400;
}

/* Enhanced Text Readability */
.enhanced-text {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Display Typography */
.display-text {
    font-family: var(--font-display);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
}

/* Modern CSS Animations for RemoteChastity */

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(1deg);
    }
    50% {
        transform: translateY(-20px) rotate(0deg);
    }
    75% {
        transform: translateY(-10px) rotate(-1deg);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 30px 60px rgba(255,100,32,0.4), 0 0 60px rgba(0,150,255,0.25);
    }
    50% {
        box-shadow: 0 35px 70px rgba(255,100,32,0.5), 0 0 80px rgba(0,150,255,0.35);
    }
    100% {
        box-shadow: 0 30px 60px rgba(255,100,32,0.4), 0 0 60px rgba(0,150,255,0.25);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.95;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    }
    50% {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.4), 0 0 20px rgba(255,255,255,0.3);
    }
    100% {
        text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes backgroundShift {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 0.15;
    }
    50% {
        transform: scale(1.1) rotate(2deg);
        opacity: 0.2;
    }
}

/* Enhanced Gradient Animation */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
        background-size: 200% 200%;
    }
    25% {
        background-position: 100% 50%;
        background-size: 250% 250%;
    }
    50% {
        background-position: 50% 100%;
        background-size: 300% 300%;
    }
    75% {
        background-position: 0% 100%;
        background-size: 250% 250%;
    }
    100% {
        background-position: 0% 50%;
        background-size: 200% 200%;
    }
}

/* Smooth Hover Effects */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Modern Card Effects */
.modern-card {
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.1),
        0 1px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255,255,255,0.8);
}

.modern-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 20px 40px rgba(0,0,0,0.15),
        0 5px 20px rgba(255,100,32,0.1);
}

/* Vibrant Text Effects */
.vibrant-text {
    background: linear-gradient(135deg, #ff6420 0%, #0099ff 50%, #9c27b0 100%);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 8s ease-in-out infinite;
    font-weight: 900;
}

/* Animated Borders */
.animated-border {
    position: relative;
    overflow: hidden;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,100,32,0.4), transparent);
    transition: left 0.5s;
}

.animated-border:hover::before {
    left: 100%;
}

/* Smooth Transitions - Removed wildcard selector that applied transitions to all elements (performance bottleneck) */
/* Use specific class-based transitions instead: .hover-lift, .modern-card, .enhanced-button, etc. */

/* Button Enhancements */
.enhanced-button {
    background: linear-gradient(135deg, #ff6420, #ff8040);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.enhanced-button::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;
}

.enhanced-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255,100,32,0.3);
}

.enhanced-button:hover::before {
    left: 100%;
}

/* Loading Animations */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 2s infinite linear;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Performance Optimized Animations */
/* REMOVED: will-change-transform and will-change-opacity classes caused memory budget issues */
/* Use GPU acceleration only on specific elements when needed via .gpu-accelerated class */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Visual Hierarchy Enhancements */
.hero-section {
    position: relative;
    z-index: 10;
}

.content-section {
    position: relative;
    z-index: 5;
}

/* Improved Spacing System */
.section-padding {
    padding: 8rem 0;
}

.section-padding-small {
    padding: 4rem 0;
}

.content-max-width {
    max-width: 1200px;
    margin: 0 auto;
}

/* Enhanced Card Design */
.premium-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(255,255,255,0.8));
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    box-shadow:
        0 8px 32px rgba(0,0,0,0.1),
        0 20px 60px rgba(0,0,0,0.05),
        inset 0 1px 0 rgba(255,255,255,0.4);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.15),
        inset 0 1px 0 rgba(255,255,255,0.4);
}

/* Gradient Text Enhancement */
.gradient-text-primary {
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-secondary {
    background: var(--gradient-secondary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-accent {
    background: var(--gradient-accent);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Improved Focus States */
.mud-button-root:focus-visible,
.mud-input-root:focus-within {
    outline: 2px solid #ff6420;
    outline-offset: 2px;
    border-radius: 12px;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .section-padding {
        padding: 4rem 0;
    }
    
    .display-text {
        font-size: clamp(2rem, 8vw, 4rem);
        line-height: 1.1;
    }
    
    .hero-section .mud-grid .mud-item {
        padding: 1rem;
    }
    
    .premium-card {
        margin: 1rem 0;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .premium-card {
        background: linear-gradient(145deg, rgba(30,30,30,0.9), rgba(20,20,20,0.8));
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: 
            0 8px 32px rgba(0,0,0,0.3),
            0 20px 60px rgba(0,0,0,0.2),
            inset 0 1px 0 rgba(255,255,255,0.1);
    }
}

/* Print Styles */
@media print {
    .hero-section,
    .premium-card,
    .enhanced-button {
        background: white !important;
        box-shadow: none !important;
        color: black !important;
    }
    
    .gradient-text-primary,
    .gradient-text-secondary,
    .gradient-text-accent {
        background: none !important;
        -webkit-text-fill-color: black !important;
        color: black !important;
    }
}