/* Montserrat Font Override */
* {
    font-family: 'Montserrat', sans-serif;
}

/* Custom Styles for Fractal Solutions */

/* Ethereal Device Styling */
.device-container {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 60px rgba(0, 0, 0, 0.1);
}

/* Ethereal animations */
.ethereal-fade-in {
    animation: etherealFadeIn 0.8s ease-out forwards;
}

.ethereal-slide-up {
    animation: etherealSlideUp 0.6s ease-out forwards;
}

.ethereal-glow {
    position: relative;
    overflow: hidden;
}

.ethereal-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: etherealShimmer 3s infinite;
}

.ethereal-glow-subtle {
    position: relative;
    overflow: hidden;
}

.ethereal-glow-subtle::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: etherealShimmer 4s infinite;
}

@keyframes etherealFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes etherealSlideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes etherealShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Enhanced sliders for both themes */
.slider-ethereal::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.light-theme .slider-ethereal::-webkit-slider-thumb {
    background: #ffffff;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider-ethereal::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.9),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

.light-theme .slider-ethereal::-webkit-slider-thumb:hover {
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.9),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

.slider-ethereal::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 0 10px rgba(0, 0, 0, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.light-theme .slider-ethereal::-moz-range-thumb {
    background: #ffffff;
    box-shadow: 
        0 0 10px rgba(255, 255, 255, 0.7),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider-ethereal::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 
        0 0 20px rgba(0, 0, 0, 0.9),
        0 6px 20px rgba(0, 0, 0, 0.4);
}

.light-theme .slider-ethereal::-moz-range-thumb:hover {
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.9),
        0 6px 20px rgba(0, 0, 0, 0.3);
}

.slider-ethereal::-webkit-slider-track {
    background: linear-gradient(90deg, #6b7280, #374151, #111827);
    border-radius: 8px;
    height: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.light-theme .slider-ethereal::-webkit-slider-track {
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #9ca3af);
}

.slider-ethereal::-moz-range-track {
    background: linear-gradient(90deg, #6b7280, #374151, #111827);
    border-radius: 8px;
    height: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.light-theme .slider-ethereal::-moz-range-track {
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #9ca3af);
}

/* Legacy slider styles for compatibility */
.slider::-webkit-slider-thumb {
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.light-theme .slider::-webkit-slider-thumb {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
}

.light-theme .slider::-webkit-slider-thumb:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.slider::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: #000000;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.light-theme .slider::-moz-range-thumb {
    background: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.slider::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.9);
}

.light-theme .slider::-moz-range-thumb:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

.slider::-webkit-slider-track {
    background: linear-gradient(90deg, #6b7280, #374151, #111827);
    border-radius: 8px;
}

.light-theme .slider::-webkit-slider-track {
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #9ca3af);
}

.slider::-moz-range-track {
    background: linear-gradient(90deg, #6b7280, #374151, #111827);
    border-radius: 8px;
}

.light-theme .slider::-moz-range-track {
    background: linear-gradient(90deg, #e5e7eb, #d1d5db, #9ca3af);
}

/* Enhanced glassmorphism effects */
.glass {
    background: rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.light-theme .glass {
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Smooth animations */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 5px;
}

.light-theme ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #000000, #374151);
    border-radius: 5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #111827, #1f2937);
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #f9fafb, #d1d5db);
}

/* Enhanced focus states */
input:focus, textarea:focus, select:focus {
    box-shadow: 
        0 0 0 3px rgba(0, 0, 0, 0.1),
        0 0 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.light-theme input:focus, 
.light-theme textarea:focus, 
.light-theme select:focus {
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(255, 255, 255, 0.2);
}

/* Enhanced button hover effects */
button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.light-theme button:hover:not(:disabled) {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

button:active:not(:disabled) {
    transform: translateY(0);
}

/* Enhanced loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced card hover effects */
.card-hover:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.light-theme .card-hover:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
}

/* Progress bar animations */
@keyframes progressFill {
    0% {
        width: 0%;
    }
    100% {
        width: var(--progress-width);
    }
}

/* Floating animation for hero elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Shimmer effect for loading states */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: shimmer 1.5s infinite;
}

.light-theme .shimmer {
    background: linear-gradient(90deg, #1f2937 25%, #111827 50%, #1f2937 75%);
}

/* Enhanced project type cards */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card::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;
}

.light-theme .project-card::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.project-card:hover::before {
    left: 100%;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .mobile-stack {
        flex-direction: column;
    }
    
    .mobile-full {
        width: 100%;
    }
    
    .slider::-webkit-slider-thumb,
    .slider-ethereal::-webkit-slider-thumb {
        height: 24px;
        width: 24px;
    }
    
    .slider::-moz-range-thumb,
    .slider-ethereal::-moz-range-thumb {
        height: 24px;
        width: 24px;
    }

    .device-container {
        margin: 0 0.5rem;
        border-radius: 1rem;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .glass {
        background: rgba(0, 0, 0, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Light theme specific styles */
body.light-theme {
    color-scheme: light;
}

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

    .ethereal-fade-in,
    .ethereal-slide-up {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    button {
        border: 2px solid currentColor;
    }
    
    .slider::-webkit-slider-thumb,
    .slider::-moz-range-thumb,
    .slider-ethereal::-webkit-slider-thumb,
    .slider-ethereal::-moz-range-thumb {
        border: 2px solid currentColor;
    }
}