body, html {
    margin: 0;
    padding: 0;
    min-height: 100%; /* Changed from height: 100% to allow expansion */
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    /* Removed overflow: hidden so you can actually scroll on mobile */
}

body {
    background: url('background.jpg') no-repeat center center fixed;
    background-size: cover;
}

.overlay {
    position: fixed; /* Changed from absolute to fixed so it stretches if the page grows */
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Changed from height: 100vh to fit stacked content gracefully */
    padding: 20px;     /* Adds a safe boundary around screen edges */
    box-sizing: border-box;
}

h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    text-align: center;
}

.grid {
    display: flex;
    flex-wrap: wrap; /* Allows your items to break onto a new line instead of breaking offscreen */
    justify-content: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Ensures Safari/iOS mobile support for blur */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    width: 200px;
    text-align: center;
    text-decoration: none;
    color: white;
    border-radius: 15px;
    transition: transform 0.3s ease, background 0.3s ease;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
}

.icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.card h2 { margin: 10px 0 5px 0; font-size: 1.5rem; }
.card p { margin: 0; opacity: 0.8; font-size: 0.9rem; }

/* 📱 MOBILE OPTIMIZATION TRICK */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem; /* Shrinks your title slightly so it doesn't wrap awkwardly */
    }

    .grid {
        flex-direction: column; /* Forces links to stack cleanly on top of each other */
        align-items: center;
    }

    .card {
        width: 100%; /* Stretches the link to fill the mobile width for an easier thumb-tap target */
        max-width: 280px;
        padding: 20px;
    }
}
