/* Miniai.online - Advanced Styles for Next-Gen Experience */

/* Base variables and custom properties */
:root {
  --primary-purple: #6366f1;
  --primary-pink: #ec4899;
  --primary-blue: #3b82f6;
  --dark-bg: #0f0f1f;
  --darker-bg: #0a0a15;
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --text-gradient: linear-gradient(135deg, #6366f1, #ec4899);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  
  /* Mobile-specific variables */
  --mobile-padding: 1rem;
  --mobile-font-scale: 0.9;
  --touch-target-size: 44px;
  --mobile-border-radius: 16px;
  
  /* Dynamic viewport height */
  --vh: 1vh;
}

/* Modern CSS Reset and Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Enhanced typography and base styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, var(--dark-bg) 0%, var(--darker-bg) 100%);
  overflow-x: hidden;
}

/* Custom Scrollbar - Premium Look */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #5855eb 0%, #7c3aed 50%, #db2777 100%);
            box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
        }

        html {
            scroll-behavior: smooth;
            scroll-padding-top: 80px;
        }

        body {
            font-family: 'Inter', system-ui, sans-serif;
            background: linear-gradient(135deg, #0f0f1f 0%, #1a1a2e 50%, #16213e 100%);
            background-attachment: fixed;
            color: #e0e0e0;
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* Advanced Glassmorphism */
        .glass-effect {
            background: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        }

        .glass-effect:hover {
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.2);
            transform: translateY(-5px);
            box-shadow:
                0 20px 50px rgba(0, 0, 0, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        /* Enhanced Neumorphism */
        .neumorphic-button {
            background: linear-gradient(145deg, #1a1a2e, #16213e);
            box-shadow: 
                8px 8px 16px rgba(0, 0, 0, 0.4),
                -8px -8px 16px rgba(255, 255, 255, 0.02);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 12px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
        }

        .neumorphic-button:hover {
            box-shadow: 
                4px 4px 8px rgba(0, 0, 0, 0.3),
                -4px -4px 8px rgba(255, 255, 255, 0.04),
                inset 2px 2px 4px rgba(99, 102, 241, 0.1);
            transform: translateY(-1px);
        }

        .neumorphic-button:active {
            box-shadow: inset 4px 4px 8px rgba(0, 0, 0, 0.3);
            transform: translateY(1px);
        }

        /* Advanced gradient text effect */
        .gradient-text {
          background: var(--text-gradient);
          background-clip: text;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
          background-size: 300% 300%;
          animation: gradient-flow 4s ease infinite;
        }

        @keyframes gradient-flow {
          0%, 100% { background-position: 0% 50%; }
          50% { background-position: 100% 50%; }
        }

        /* Modern button styles */
        .modern-button {
          background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
          background-size: 200% 200%;
          animation: gradient-shift 3s ease infinite;
          box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
          border: none;
          color: white;
          font-weight: 600;
          text-decoration: none;
          transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
          position: relative;
          overflow: hidden;
        }

        .modern-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;
        }

        .modern-button:hover::before {
          left: 100%;
        }

        .modern-button:hover {
          transform: translateY(-2px);
          box-shadow: 0 12px 40px rgba(99, 102, 241, 0.6);
        }

        @keyframes gradient-shift {
          0%, 100% { background-position: 0% 50%; }
          50% { background-position: 100% 50%; }
        }

        /* Gradient Text with Animation */
        .gradient-text {
            background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
            background-size: 300% 300%;
            background-clip: text;
            -webkit-background-clip: text;
            color: transparent;
            animation: gradient 8s ease infinite;
            font-weight: 700;
        }

        /* Advanced Animations */
        @keyframes gradient {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

        @keyframes float {

            0%,
            100% {
                transform: translateY(0px) rotate(0deg);
            }

            50% {
                transform: translateY(-20px) rotate(5deg);
            }
        }

        @keyframes glow {
            0% {
                box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
                filter: brightness(1);
            }

            100% {
                box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
                filter: brightness(1.2);
            }
        }

        @keyframes slide-up {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes scale-in {
            from {
                opacity: 0;
                transform: scale(0.9);
            }

            to {
                opacity: 1;
                transform: scale(1);
            }
        }

        @keyframes pulse-glow {

            0%,
            100% {
                box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
            }

            50% {
                box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
            }
        }

        /* Card Hover Effects */
        .tool-card {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .tool-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s;
        }

        .tool-card:hover::before {
            transform: translateX(100%);
        }

        .tool-card:hover {
            transform: translateY(-10px) scale(1.02);
            filter: brightness(1.1);
        }

        /* Navigation Enhancements */
        .nav-link {
            position: relative;
            transition: all 0.3s ease;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            width: 0;
            height: 2px;
            background: linear-gradient(90deg, #6366f1, #ec4899);
            transition: all 0.3s ease;
            transform: translateX(-50%);
        }

        .nav-link:hover::after {
            width: 100%;
        }

        /* Hero Section Enhancements */
        .hero-title {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            line-height: 1.1;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        }

        /* Particle System */
        .particles {
            position: absolute;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .particle {
          position: absolute;
          background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
          border-radius: 50%;
          animation: float-particle 8s ease-in-out infinite;
        }

        .particle::before {
          content: '';
          position: absolute;
          top: 50%;
          left: 50%;
          width: 120%;
          height: 120%;
          background: radial-gradient(circle, rgba(236, 72, 153, 0.2), transparent);
          border-radius: 50%;
          transform: translate(-50%, -50%);
          animation: pulse-glow 2s ease-in-out infinite alternate;
        }

        @keyframes float-particle {
          0%, 100% { 
            transform: translateY(0px) rotate(0deg);
            opacity: 0.4;
          }
          25% { 
            transform: translateY(-20px) rotate(90deg);
            opacity: 0.7;
          }
          50% { 
            transform: translateY(-10px) rotate(180deg);
            opacity: 0.5;
          }
          75% { 
            transform: translateY(-30px) rotate(270deg);
            opacity: 0.8;
          }
        }

        @keyframes pulse-glow {
          from { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
          to { opacity: 0.7; transform: translate(-50%, -50%) scale(1.2); }
        }

        /* Loading Animation */
        .loading-shimmer {
            background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
            background-size: 200% 100%;
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% {
                background-position: -200% 0;
            }

            100% {
                background-position: 200% 0;
            }
        }

        /* Responsive images and icons */
img, svg, .fa, .fas, .fab, .far, .fal, .fad {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  img, svg, .fa, .fas, .fab, .far, .fal, .fad {
    max-width: 90vw;
    height: auto;
  }
}

/* Responsive Enhancements */
        @media (max-width: 768px) {
            .container {
                padding-left: 1rem;
                padding-right: 1rem;
            }

            .hero-title {
                font-size: 2.5rem;
            }

            .glass-effect {
                border-radius: 15px;
            }
        }

        /* ======================================
   MOBILE-FIRST RESPONSIVE DESIGN
   ====================================== */

/* Mobile Navigation Enhancements */
.mobile-menu-button {
    display: none;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
    border: none;
    border-radius: 12px;
    padding: 12px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.mobile-menu-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(15, 15, 31, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 20px;
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-menu a:hover {
    background: linear-gradient(135deg, var(--primary-purple)/20, var(--primary-pink)/20);
    transform: translateX(8px);
}

/* Touch-Friendly Button Improvements */
.modern-button {
    min-height: 48px;
    min-width: 140px;
    font-size: 1rem;
    padding: 14px 24px;
    touch-action: manipulation;
}

.neumorphic-button {
    min-height: 44px;
    padding: 12px 20px;
    touch-action: manipulation;
}

/* Card Hover Effects for Mobile */
@media (hover: none) and (pointer: coarse) {
    .glass-effect:hover {
        transform: none;
    }
    
    .glass-effect:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

/* ======================================
   MOBILE BREAKPOINTS
   ====================================== */

/* Small Mobile Devices (320px - 480px) */
@media (max-width: 480px) {
    /* Navigation */
    .mobile-menu-button {
        display: block;
    }
    
    nav .hidden.md\\:flex {
        display: none !important;
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.1;
        margin-bottom: 1rem;
        word-break: break-word;
    }
    
    .hero-title .gradient-text {
        font-size: 2.2rem !important;
    }
    
    .hero-title span:last-child {
        font-size: 1.1rem !important;
        margin-top: 0.5rem;
    }
    
    /* Hero subtitle */
    header p {
        font-size: 1.1rem !important;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    /* Feature highlights - stack vertically */
    .flex-wrap {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .flex-wrap > div {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    /* CTA Buttons */
    .flex.flex-col.sm\\:flex-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .flex.flex-col.sm\\:flex-row a {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 16px 24px;
        font-size: 1.1rem;
    }
    
    /* Statistics Grid */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem !important;
    }
    
    .grid.grid-cols-2.md\\:grid-cols-4 > div {
        min-width: 0;
        word-break: break-word;
    }
    
    /* Project Cards */
    .container.mx-auto.px-6.grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .glass-effect {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .glass-effect h3 {
        font-size: 1.3rem;
    }
    
    .glass-effect p {
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    /* Form Improvements */
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    input, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 14px 16px;
    }
    
    /* Spacing Adjustments */
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Footer */
    .grid.grid-cols-1.md\\:grid-cols-2.lg\\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Medium Mobile Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Navigation */
    .mobile-menu-button {
        display: block;
    }
    
    nav .hidden.md\\:flex {
        display: none !important;
    }
    
    /* Hero adjustments */
    .hero-title {
        font-size: 3.5rem !important;
    }
    
    .hero-title .gradient-text {
        font-size: 4rem !important;
    }
    
    .hero-title span:last-child {
        font-size: 2rem !important;
    }
    
    /* Project grid - 2 columns */
    .container.mx-auto.px-6.grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Statistics - keep 4 columns but smaller */
    .grid.grid-cols-2.md\\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
    
    .grid.grid-cols-2.md\\:grid-cols-4 > div {
        text-align: center;
    }
    
    .grid.grid-cols-2.md\\:grid-cols-4 .text-3xl {
        font-size: 1.8rem;
    }
}

/* Tablet Portrait (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Project grid - 2 columns */
    .container.mx-auto.px-6.grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    /* Upcoming tools grid */
    #upcoming .container.mx-auto.px-6.grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ======================================
   PERFORMANCE OPTIMIZATIONS
   ====================================== */

/* Reduce animations on low-power devices */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .particles {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-effect {
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid white;
    }
      .gradient-text {
        background: white;
        -webkit-background-clip: text;
        background-clip: text;
        color: white;
    }
}

/* ======================================
   TOUCH AND GESTURE IMPROVEMENTS
   ====================================== */

/* Improved touch targets */
a, button, input, textarea, select {
    min-height: 44px;
    min-width: 44px;
}

/* Prevent text selection on touch devices for UI elements */
.modern-button,
.neumorphic-button,
nav a,
.glass-effect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Allow text selection for content */
p, h1, h2, h3, h4, h5, h6, span {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Smooth scrolling for mobile */
html {
    -webkit-overflow-scrolling: touch;
}

/* ======================================
   MOBILE-SPECIFIC UTILITY CLASSES
   ====================================== */

.mobile-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only {
        display: block;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-full-width {
        width: 100%;
    }
    
    .mobile-hidden {
        display: none;
    }
}

/* ======================================
   LOADING AND PERFORMANCE
   ====================================== */

/* Skeleton loading for better perceived performance */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

html, body {
  max-width: 100vw;
  overflow-x: hidden !important;
}

@media (max-width: 480px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
  }
  section, header, footer, nav, .container {
    max-width: 100vw;
    overflow-x: hidden;
  }
}

@media (max-width: 480px) {
  #suggestion-form input,
  #suggestion-form textarea {
    font-size: 16px;
    padding: 16px 14px;
    border-radius: 12px;
    margin-bottom: 10px;
  }
  #suggestion-form label {
    font-size: 1rem;
    margin-bottom: 4px;
  }
  #suggestion-form button {
    width: 100%;
    font-size: 1.1rem;
    padding: 16px 0;
    border-radius: 14px;
  }
}