/* ===========================
   VARIABLES
   =========================== */
:root {
    --bg: #f5f6fa;
    --text: #1a1a1a;
    --glass: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.25);
    --shadow: 0 10px 40px rgba(0,0,0,0.08);
    --radius: 1.4rem;

    --primary: #2563eb;
}

/* DARK MODE AUTO */
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f172a;
        --text: #e5e7eb;
        --glass: rgba(255, 255, 255, 0.08);
        --glass-border: rgba(255, 255, 255, 0.15);
        --shadow: 0 10px 40px rgba(0,0,0,0.45);
    }
}

/* ===========================
   GLOBAL
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 2rem 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===========================
   HEADER
   =========================== */

.topbar {
    text-align: center;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.topbar h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
}

.subtitle {
    margin-top: 0.4rem;
    opacity: 0.7;
    font-size: 1rem;
}

/* ===========================
   GRID
   =========================== */
.grid {
    display: grid;
    gap: 1.6rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    width: 100%;
    max-width: 900px;
}

/* ===========================
   CARD
   =========================== */

.card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.6rem 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0,0,0,0.15);
}

.card h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    font-weight: 600;
}

/* ===========================
   ICONES
   =========================== */

.icon {
    background: white;
    padding: 0.8rem;
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: 0.3s;
}

.card:hover img {
    transform: scale(1.13);
}

/* ===========================
   PWA BANNER
   =========================== */

.pwa-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transform: translateY(100%);
    transition: 0.3s ease;
}

.pwa-banner.show {
    transform: translateY(0);
}

.banner-actions {
    display: flex;
    gap: 0.6rem;
}

#install-btn {
    border: none;
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 0.45rem 1rem;
    border-radius: 0.7rem;
}

#close-btn {
    border: none;
    background: none;
    font-size: 1.4rem;
    color: white;
}

/* MOBILE SMALL */
@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
