/* ============================================================
   Indiagram - Custom Styles
   Mobile-first, responsive, PWA-optimized
   ============================================================ */

/* ---- Base ---- */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #000000;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 102, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 102, 0, 0.03) 0%, transparent 50%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Touch targets (minimum 44px for accessibility) ---- */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Glass Cards ---- */
.neon-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 102, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-select: none;
    user-select: none;
}
.neon-card:hover {
    background: rgba(31, 31, 31, 0.8);
    border-color: rgba(255, 102, 0, 0.5);
    transform: translateY(-4px);
    box-shadow:
        0 20px 40px -15px rgba(0, 0, 0, 0.8),
        0 0 30px rgba(255, 102, 0, 0.2),
        inset 0 0 20px rgba(255, 102, 0, 0.05);
}
/* Active state for mobile tap */
.neon-card:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* ---- Icon Wrappers ---- */
.icon-wrapper-neon {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1) 0%, rgba(255, 102, 0, 0.05) 100%);
    border: 1px solid rgba(255, 102, 0, 0.2);
    transition: all 0.3s ease;
}
.neon-card:hover .icon-wrapper-neon {
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.2) 0%, rgba(255, 102, 0, 0.1) 100%);
    border-color: rgba(255, 102, 0, 0.6);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

/* ---- Navigation ---- */
.nav-dark {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 102, 0, 0.1);
}
.bottom-nav-dark {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 102, 0, 0.1);
}

/* ---- Neon Text ---- */
.neon-text {
    color: #FF6600;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

/* ---- Buttons ---- */
.download-btn {
    background: #FF6600;
    color: #000000;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(255, 102, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid #FF6600;
    cursor: pointer;
    min-height: 44px;
}
.download-btn:hover {
    background: transparent;
    color: #FF6600;
    box-shadow: 0 6px 30px rgba(255, 102, 0, 0.5);
}
.download-btn:active {
    transform: scale(0.97);
}
.download-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.fab-neon {
    background: #FF6600;
    color: #000;
    box-shadow: 0 8px 30px rgba(255, 102, 0, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.fab-neon:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 40px rgba(255, 102, 0, 0.6);
}
.fab-neon:active {
    transform: scale(0.95);
}

/* ---- Platform Grid ---- */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Responsive grid adjustments */
@media (max-width: 640px) {
    .platform-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    .neon-card {
        padding: 1rem 0.5rem !important;
    }
    .neon-card .icon-wrapper-neon {
        width: 3rem !important;
        height: 3rem !important;
    }
    .neon-card .icon-wrapper-neon svg {
        width: 1.25rem !important;
        height: 1.25rem !important;
    }
    .neon-card span {
        font-size: 0.6rem !important;
    }
}

@media (max-width: 374px) {
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .platform-grid {
        gap: 1rem;
        padding: 0 0.5rem;
    }
}

/* ---- Stagger Animations ---- */
.stagger-1  { animation-delay: 0.05s; }
.stagger-2  { animation-delay: 0.1s;  }
.stagger-3  { animation-delay: 0.15s; }
.stagger-4  { animation-delay: 0.2s;  }
.stagger-5  { animation-delay: 0.25s; }
.stagger-6  { animation-delay: 0.3s;  }
.stagger-7  { animation-delay: 0.35s; }
.stagger-8  { animation-delay: 0.4s;  }
.stagger-9  { animation-delay: 0.45s; }

/* ---- Links (no underline in cards) ---- */
a.neon-card,
a.neon-card:hover {
    text-decoration: none;
}

/* ---- Utility ---- */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* ---- Form Focus States ---- */
input:focus {
    outline: none;
}
input[type="text"],
input[type="url"],
input[type="email"] {
    font-size: 16px; /* Prevents iOS zoom on focus */
}

/* ---- Toast Notification ---- */
.sb-toast {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    z-index: 9999;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: calc(100vw - 2rem);
    text-align: center;
    white-space: nowrap;
}
.sb-toast.show {
    transform: translateX(-50%) translateY(0);
}
.sb-toast.success {
    background: rgba(255, 102, 0, 0.15);
    border: 1px solid rgba(255, 102, 0, 0.4);
    color: #FF6600;
}
.sb-toast.error {
    background: rgba(255, 50, 50, 0.15);
    border: 1px solid rgba(255, 50, 50, 0.4);
    color: #ff5050;
}

/* ---- PWA standalone mode tweaks ---- */
@media (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top, 0px);
    }
    .nav-dark {
        padding-top: env(safe-area-inset-top, 0px);
    }
}

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

/* ---- Print ---- */
@media print {
    .nav-dark,
    .bottom-nav-dark,
    .fab-neon,
    #pwa-install-banner,
    #pwa-install-btn {
        display: none !important;
    }
    body {
        background: white;
        color: black;
    }
}
