* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: #ed1c24;
    font-family: Arial, sans-serif;
    color: white;
    text-align: center;
}

.container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
}

h1 {
    font-size: 24px;
    font-weight: bold;
}

@media (min-width: 768px) {
    h1 {
        font-size: 28px;
    }
}

.video-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    margin: 12px 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.video-container {
    position: relative;
    flex-shrink: 0;
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.product-img {
    width: 100%;
    display: block;
}

.barcode-below {
    width: 100%;
    display: block;
}

#sound-btn {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.legal {
    font-size: 14px;
    color: white;
    margin: 20px auto;
    max-width: 350px;
}

.legal a {
    color: #add8ff;
    text-decoration: underline;
    cursor: pointer;
}

/* Overlay */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 100;
}

#overlay.active {
    opacity: 1;
    visibility: visible;
}

.loader {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
