/* --- Layer 1: Full gradient background --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #000000, #4a4a4a, #dcdcdc);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- Layer 2: Simulated phone frame --- */
.phone-frame {
    width: 100%;
    max-width: 360px;
    height: 100%;
    max-height: 640px;
    background: #222;
    border-radius: 30px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;                                       /* Clip the blur to the border radius */
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1rem;
    background-image: url(assets/images/David-Laid-BW.jpg);
    background-repeat: no-repeat;
    background-size: cover;                                 /* To fill background image the entire container */
    background-position: center;                            /* To center backgroud image  */
}

.blurred-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(assets/images/David-Laid-BW.jpg); /* same as phone-frame */
    background-size: cover;
    background-position: center;
    filter: blur(2px); 
    z-index: 0;
    border-radius: 30px;
    opacity: 0.7;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 30px;
    z-index: 1;
}
/* --- Layer 3: The existing counter app container --- */
.container {
    background: #3a3a3a;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    background: rgba(58, 58, 58, 0.3);                        /* semi-transparent */
    border-radius: 20px;
    padding-top: 5rem;
    padding-bottom: 5rem;
    padding-left: 2rem;
    padding-right: 2rem;
    text-align: center;
    color: #fff;
    width: 100%;
    position: relative;
    z-index: 2;                                                 /* To make it above blurred layer */
    color: white;
}

h1 {
    font-size: 1.5rem;
    color: #ff5722;
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: #f5f5f5;
}

button {
    display: block;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 1rem;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

#increment-btn {
    background-color: #ff5722;
    color: white;
}

#increment-btn:hover {
    background-color: #e64a19;
}

#save-btn {
    background-color: #4caf50;
    color: white;
}

#save-btn:hover {
    background-color: #388e3c;
}

#saveEl {
    font-size: 0.9rem;
    color: #aaa;
    margin-top: 1rem;
}

/* To handle responsiveness for smaller devices */
@media (max-width: 400px) {
    .container {
        background: rgba(58, 58, 58, 0.3);
    }
    .phone-frame {
        border-radius: 20px;
        padding: 0.8rem;
    }

    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 3rem;
    }

    button {
        font-size: 0.9rem;
        padding: 0.6rem;
    }
}
