/* General Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
}

.bg-animation {
    background: linear-gradient(45deg, #ff9a9e, #fad0c4, #fbc2eb, #6a00ff);
    background-size: 300% 300%;
    animation: gradientBG 15s ease infinite;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Image Hover Effects */
img:hover {
    transform: scale(1.1); /* Skala lebih besar saat hover */
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Bayangan lebih tebal */
}

/* Buttons */
.btn {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:hover {
    transform: scale(1.05);
}

/* Video and Canvas Styling */
video, canvas {
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Timer Styling */
#timer {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Centering Frame Selection and Main Content */
#frameSelection {
    margin-top: 50px; /* Sesuaikan jarak dari header */
}

#mainContent {
    margin-top: 20px; /* Sesuaikan jarak dari atas */
}

/* Button Take Photos */
#capture {
    width: 100%; /* Lebar penuh pada mobile */
    margin-top: 16px; /* Jarak antara video dan tombol */
}

#backToFrameSelection {
    width: 100%; /* Lebar penuh pada mobile */
    margin-top: 16px; /* Jarak antara video dan tombol */
}

@media (max-width: 768px) {
    #mainContent {
        flex-direction: column;
    }

    #frameSelection {
        margin-top: 50px; /* Sesuaikan jarak dari header */
    }

    #video {
        height: 300px !important;
    }

    #mergedCanvas {
        width: 100% !important;
        height: auto !important;
        margin-left: 1px;
    }

    #capture {
        width: 100% !important;
    }

    #backToFrameSelection {
        width: 100% !important;
    }

    /* Gambar contoh lebih besar pada mobile */
    img {
        height: 250px !important; /* Tinggi gambar pada mobile */
    }
}

/* Styling for Color Selection Buttons */
#colorSelection button {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#colorSelection button:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}