﻿/* General layout */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f1e6e0;
    font-family: Arial, sans-serif;
}

main {
    flex: 1 0 auto;
    padding-bottom: 75px; /* Increased padding to prevent footer overlap */
}

/* Fixed Footer */
footer {
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    text-align: center;
    padding: 3px 0;
    line-height: 1;
    font-size: 14px;
    color: #666;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.footer-links {
    margin-bottom: 5px;
}

    .footer-links a {
        color: #333;
        text-decoration: none;
        font-size: 14px;
        padding: 0 10px;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: #cc5d36;
            text-decoration: none;
        }

.copyright {
    color: #666;
    font-size: 12px;
}

/* Common Box Layout */
.CommonBox {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - 75px);
    margin-bottom: 65px; /* Add margin to prevent footer overlap */
    position: relative;
    z-index: 1;
}

/* Header */
.header1, .header2 {
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
}

    .header1 h2 {
        color: black;
        font-size: 1.8rem;
        font-weight: bold;
        margin-top: 12vh;
        margin-bottom: 10px;
    }

    .header2 h2 {
        color: black;
        font-size: 1.8rem;
        font-weight: bold;
        margin-top: 8vh;
        margin-bottom: 10px;
    }

/* Navbar adjustments */
.navbar {
    position: fixed;
    width: 100%;
    z-index: 500;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Buttons Container */
.buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: 5px;
    width: 100%;
    margin-top: 10px;
    padding-bottom: 65px; /* Add padding to prevent footer overlap */
}

    .buttons-container .d-flex {
        margin-bottom: 0;
    }

/* Button Styling */
.custom-button {
    background-color: #cc5d36;
    color: white;
    border: none;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
    padding: 15px 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    font-weight: bold;
}

    .custom-button:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    }

/* Modal Overlay for Image Pop-up */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 65px; /* Increased to prevent footer overlap */
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

/* Navbar links for desktop */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-link {
    text-decoration: none;
    font-size: 14px;
    color: black !important;
    font-size: 16px;
    font-weight: 500;
    padding: 5px 10px;
}

    .nav-link:hover {
        color: #0A84FF;
    }


.instruction-text {
    font-size: 0.95rem;
    color: #979696;
    margin-top: -13px;
    margin-bottom: 3px;
}

/* Pop-up animation */
.pop-up-effect {
    animation: popUpEffect 0.5s ease-out forwards;
    max-width: 90vw;
    max-height: calc(100vh - 85px); /* Adjusted to account for footer */
    object-fit: contain;
    margin: auto;
    margin-bottom: 20px;
}

.modal-overlay img {
    margin-bottom: 20px;
}

.modal-overlay button {
    position: fixed;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* Overlay effect when sidebar is open */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    display: none;
}

/* Media Queries for responsiveness */
@media (max-width: 768px) {
    .header1 h2 {
        margin-top: 15vh;
    }

    .header2 h2 {
        margin-top: 5vh;
    }

    .buttons-container {
        padding-bottom: 75px; /* Increased padding for mobile */
    }

    .custom-button {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .header1 h2 {
        font-size: 1.4rem;
        margin-top: 12vh;
        margin-bottom: 15px;
    }

    .header2 h2 {
        font-size: 1.4rem;
        margin-top: 5vh;
        margin-bottom: 15px;
    }

    .buttons-container {
        margin-top: 2px;
    }

    .custom-button {
        width: 40px;
        height: 40px;
        font-size: 0.8rem;
    }
}

/* Download Button Styles - Hidden by default */
.download-element {
    display: none !important;
}

/* Show only when in browser mode */
body:not(.pwa-mode) .download-element {
    display: flex !important;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    align-items: center;
}

    body:not(.pwa-mode) .download-element:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
        background: linear-gradient(135deg, #43A047, #1B5E20);
    }

    body:not(.pwa-mode) .download-element svg {
        margin-right: 5px;
    }

/* Responsive adjustments */
@media (max-width: 576px) {
    body:not(.pwa-mode) .download-element {
        font-size: 12px;
        padding: 5px 10px;
    }

        body:not(.pwa-mode) .download-element svg {
            width: 12px;
            height: 12px;
        }
}

/* Clickable area indicator */
.clickable-mouth {
    cursor: pointer;
    position: relative;
}

    .clickable-mouth:hover::after {
        content: '';
        position: absolute;
        left: 35%;
        top: 55%;
        width: 30%;
        height: 30%;
        border: 2px dashed #fff;
        border-radius: 50%;
        animation: pulse 1.5s infinite;
        pointer-events: none;
    }

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}
