:root {
    --image-path: "/images";
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
        Ubuntu, Cantarell, sans-serif;
}
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
    background-color: #f5f5f5;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.landing-content {
    width: 70%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.landing-content img {
    width: 100%;
}
img.bsrm-logo {
    width: 60%;
    margin-bottom: -5px;
}
.start-button {
    cursor: pointer !important;
    transition: background-color 0.3s;
    background-image: var(--empty-plate-image);
    background-color: transparent;
    width: 100px;
    height: 100px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translate(-50%);
    font-size: 14px;
    border: none;
    font-weight: 700;
}
.start-button:hover {
    background-color: transparent;
}
.camera-container {
    position: relative;
    overflow: hidden;
    background: #000;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    z-index: 1;
}
.camera-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detection-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #000000b3;
    border-radius: 8px;
    color: #fff;
    z-index: 3;
}
.prediction-item {
    justify-content: space-between;
    font-size: 1rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    color: #000;
}
p.prediction-heading {
    background: #fff;
    border-radius: 9px 9px 0 0;
}
p.prediction-tagline {
    background: #ffd400;
    border-radius: 0 0 9px 9px;
}
.prediction-item p {
    padding: 5px;
}
span#url_link {
    position: absolute;
    top: 11px;
    left: 51%;
    transform: translate(-50%);
    font-size: 13px;
    z-index: 2;
}
span#hashtag {
    position: absolute;
    text-align: center;
    width: 100%;
    bottom: 3px;
    font-size: 22px;
}
div#main-container-header {
    position: absolute;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    top: 30px;
    width: 90%;
    z-index: 3;
}
div#main-container-header img {
    width: 100px;
    margin: 0 -10px 0 0;
}
div#main-container-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
    z-index: 3;
}
div#main-container-body {
    background: #000;
    width: 90%;
    height: 80%;
    border-radius: 20px;
}
div#main-container {
    width: 100;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
div#main-container-header img:first-child {
    position: absolute;
    top: -16px;
    border-radius: 50%;
    width: 100px;
    left: 0;
    z-index: 1;
}
@media (min-width: 400px) {
    .responsive-container {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100vw;
        height: 100vh;
    }
    .responsive-content {
        width: 400px;
        position: relative;
    }
}
.camera-error {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    border-radius: 8px;
    padding: 16px;
    color: #991b1b;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    z-index: 10;
    box-shadow: 0 4px 6px #0000001a;
}
.camera-error p {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 16px;
}
.camera-error ul {
    margin: 0 0 16px;
    padding-left: 20px;
    font-size: 14px;
}
.camera-error li {
    margin: 8px 0;
    line-height: 1.4;
}
.camera-error-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}
.camera-error-button {
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.camera-error-button.close {
    background-color: #fff;
    border: 1px solid #ef4444;
    color: #ef4444;
}
.camera-error-button.close:hover {
    background-color: #fee2e2;
}
.camera-error-button.refresh {
    background-color: #ef4444;
    color: #fff;
}
.camera-error-button.refresh:hover {
    background-color: #dc2626;
}
.start-detection-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #00000036;
    z-index: 4;
}
.start-detection-button {
    background-color: transparent;
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    animation: scale-up-down 2s infinite;
}
button.start-detection-button img {
    width: 130px;
    cursor: pointer !important;
}
p.start-detection-button-text {
    position: absolute;
    color: #000;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    text-align: center;
    font-weight: 700;
    width: 70%;
}
.start-detection-button:hover {
    transform: scale(1.05);
}
.start-detection-button:active {
    transform: scale(0.95);
}
@keyframes scale-up-down {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    to {
        transform: scale(1);
    }
}
.terms-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.terms-content {
    background: #fffffff2;
    padding: 1.4rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px #0000001a;
    width: 90%;
    max-width: 500px;
}
.terms-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.5rem;
}
.terms-text {
    margin-bottom: 2rem;
}
.terms-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #444;
}
.terms-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
.terms-buttons button {
    min-width: 100px;
    margin: 5px;
    padding: 7px;
    background: red;
    border: 2px solid red;
    border-radius: 3px;
    color: #fff;
    cursor: pointer;
}
.terms-buttons button:last-child {
    background: green;
    border: 2px solid green;
}
.screenshot-preview {
    width: 100%;
    height: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: #000;
    border-radius: 20px;
    position: relative;
}
.screenshot-preview img {
    width: 100%;
    border-radius: 15px;
    object-fit: contain;
}
.screenshot-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
    position: absolute;
    bottom: 8px;
}
.screenshot-buttons button {
    min-width: 44%;
    background: #fff;
    border: 2px solid white;
    border-radius: 8px;
    color: #000;
    padding: 13px 0;
    font-size: 16px;
    cursor: pointer !important;
    font-weight: 700;
}
.model-version-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: #ffffffe6;
    padding: 5px;
    border-radius: 4px;
}
.model-version-selector select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
}
.model-version-selector select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
button.video-button,
.popup-button {
    background: #000;
    color: #fff;
    padding: 10px 24px;
    border-radius: 10px;
    cursor: pointer !important;
    font-weight: 700;
    margin-top: 10px;
}
button.video-button {
    position: absolute;
    top: 60px;
    margin-top: 0;
}
.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000d9;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}
.video-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    animation: slideUp 0.5s ease-out;
}
.close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: background-color 0.3s;
}
.close-button:hover {
    background-color: #e0e0e0;
}
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-container iframe {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}
@keyframes slideUp {
    0% {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
