/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    --primary: #059669;       /* Emerald 600 */
    --primary-dark: #047857;  /* Emerald 700 */
    --accent: #F59E0B;        /* Amber 500 (Stars) */
    --bg-light: #F8FAFC;      /* Slate 50 */
    --text-main: #0F172A;     /* Slate 900 */
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.15), 0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    /* Prevent blue highlight on tap on mobile */
    -webkit-tap-highlight-color: transparent; 
}

/* =========================================
   2. UTILITY CLASSES
   ========================================= */

/* Hides scrollbar but allows scrolling (Good for horizontal sliders) */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Line Clamp Backups (If Tailwind plugin is missing) */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================================
   3. COMPONENT STYLES
   ========================================= */

/* --- App Card Micro-interactions --- */
.app-card {
    will-change: transform, box-shadow;
    /* Smooth bounce effect on hover */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
}

.app-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hover-shadow);
    border-color: #A7F3D0; /* Emerald 200 */
    z-index: 10;
}

.app-card:active {
    transform: scale(0.98);
}

/* --- Download Button (The Money Button) --- */
.btn-download {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    position: relative;
    overflow: hidden;
    /* Subtle glow on hover */
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.39);
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-download:active {
    transform: scale(0.98);
}

/* ⚡ THE SHIMMER ANIMATION (High CTR) */
/* This adds a light reflection moving across the button */
.btn-download::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );
    transition: 0.5s;
    animation: shimmer 3s infinite;
}

/* Keyframes for Shimmer */
@keyframes shimmer {
    0% { left: -100%; }
    20% { left: 100%; } /* Fast pass */
    100% { left: 100%; } /* Wait before next pass */
}

/* =========================================
   4. PAGE ANIMATIONS
   ========================================= */

/* Fade In Up (Used when loading pages) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 15px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

main {
    animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* =========================================
   5. MOBILE RESPONSIVE TWEAKS
   ========================================= */

/* Fix for very small screens (iPhone SE / Older Androids) */
@media (max-width: 370px) {
    .grid {
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns */
        gap: 0.5rem;
    }
    
    .app-card {
        padding: 0.75rem;
    }
    
    .app-card h3 {
        font-size: 0.75rem; 
    }
}