/* General Reset for Full Responsiveness */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, sans-serif;
    background-color: #0e0e0e;
    color: white;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 20px;
    max-width: 100%;
    border-bottom: 1px solid #6a0dad;
}

.auth-buttons button {
    background-color: #6a0dad;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-buttons button:hover {
    background-color: #5a4dcc;
}

.logo {
    max-width: 100px;
    height: auto;
}

/* Main Container */
.container {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
}

/* Video Section */
.video-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.video-wrapper,
.prediction-status {
    flex: 1;
    min-width: 300px;
    max-width: 100%;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.prediction-status {
    background-color: #161616;
    border-radius: 10px;
    text-align: center;
}

.prediction-status h2 {
    font-size: 20px;
    color: white;
    font-weight: bold;
}

/* Options Section */
.options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #6a0dad;
}

.option {
    background-color: #111;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 21px;
    cursor: pointer;
    text-align: center;
    width: 80px;
    transition: background-color 0.3s;
    font-weight: bold;
}

.option:hover {
    background-color: #333;
}

/* Controls Container */
.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    #margin: 40px 70px;
    flex-wrap: wrap;
    gap: 10px;
}

.controls {
    display: flex;
    gap: 10px;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Button Styles */
.btn {
    background-color: #444;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 21px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;

}

.btn:hover {
    background-color: #6a0dad;
}

.predict-btn {
    background-color: #6a0dad;
}

.file-upload input[type="file"] {
    padding: 10px;
    background-color: #444;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
}

.file-upload input[type="file"]:hover {
    background-color: #666;
}

.connect-btn {
    background-color: #6a0dad;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 21px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}

.connect-btn:hover {
    background-color: #8b5fc0;
}

/* Modal for Server Connection */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white; /* White background for the card */
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    color: #161616;
    width: 300px;
}

.loading-spinner {
    margin: 20px auto;
    border: 6px solid #444;
    border-top: 6px solid #6a0dad;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-wrapper,
    .prediction-status {
        max-width: 100%;
        height: 300px;
    }

    .video-section {
        flex-direction: column;
        align-items: center;
    }

    iframe {
        width: 100%;
        height: 100%;
    }

    .option {
        width: 60px;
        font-size: 14px;
        padding: 8px 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .connect-btn {
        padding: 8px 12px;
        font-size: 14px;
    }

    .controls-container {
        flex-direction: column;
        align-items: center;
        margin: 20px 0;
    }

    .controls {
        display: flex;
        gap: 10px;
        justify-content: center;
    }

    .file-upload {
        display: flex;
        align-items: center;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 18px;
    }

    .video-wrapper,
    .prediction-status {
        height: 200px;
    }

    .options {
        gap: 10px;
    }

    .option {
        width: 50px;
        font-size: 12px;
        padding: 6px 8px;
    }

    .btn,
    .connect-btn {
        font-size: 12px;
        padding: 6px 8px;
    }

    .controls-container {
        flex-direction: column;
        align-items: center;
    }

    .file-upload {
        flex-direction: column;
        gap: 8px;
    }

    .file-upload input[type="file"] {
        width: 100%;
    }

    .video-section {
        flex-direction: column;
    }
}

@media (max-width: 360px) {
    h1 {
        font-size: 16px;
    }

    .option {
        width: 40px;
        font-size: 10px;
        padding: 5px 6px;
    }

    .btn,
    .connect-btn {
        font-size: 10px;
        padding: 5px 6px;
    }

    .controls-container {
        margin: 10px;
    }

    .video-wrapper,
    .prediction-status {
        height: 150px;
    }

    .options {
        gap: 5px;
    }
}
/* CSS for Waiting for Prediction */
#predictionText {
    color: white;
}

/* Red color when waiting for the next character */
.waiting-red {
    color: red;
}
