* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f172a; /* Dark Slate */
    color: #f8fafc;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    text-align: center;
    max-width: 900px;
    width: 100%;
    padding: 20px;
}

header h1 {
    font-size: 3rem;
    color: #38bdf8; /* Bright Blue */
    margin-bottom: 10px;
    letter-spacing: 2px;
}

#status {
    color: #94a3b8;
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.video-wrapper {
    position: relative;
    display: inline-block;
    border-radius: 20px;
    overflow: hidden;
    border: 4px solid #38bdf8;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
    margin-bottom: 25px;
    background: #000;
}

#video {
    width: 100%;
    max-width: 640px;
    height: auto;
    display: block;
    transform: scaleX(-1); /* Mirror effect */
}

.message-box {
    background-color: #1e293b;
    border: 3px solid #38bdf8;
    border-radius: 15px;
    padding: 40px 20px;
    font-size: 2.5rem;
    font-weight: bold;
    color: #4ade80; /* Bright Green */
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.controls {
    margin-bottom: 25px;
}

button {
    background-color: #38bdf8;
    color: #0f172a;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background-color: #0ea5e9;
}

.legend {
    background-color: #1e293b;
    border-radius: 15px;
    padding: 20px;
    text-align: left;
}

.legend h3 {
    color: #38bdf8;
    margin-bottom: 15px;
    text-align: center;
}

.legend-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.legend-grid strong {
    color: #f8fafc;
}
/* --- Update existing header styles --- */
header {
    margin-bottom: 25px;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px; /* Space between GIF and text */
    background-color: #1e293b; /* Matching your message box */
    padding: 20px;
    border-radius: 20px;
    border: 2px solid #38bdf8;
    box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

/* --- GIF/Image Styling --- */
.gif-container {
    flex-shrink: 0;
}

.hero-gif {
    width: 150px; /* Adjust size as needed */
    height: auto;
    border-radius: 15px;
    /* Optional: Add a subtle border to the GIF */
    border: 2px solid #0ea5e9; 
}

/* --- Title Styling --- */
.title-container {
    text-align: left;
}

.title-container h1 {
    font-size: 3rem;
    color: #38bdf8;
    margin-bottom: 5px;
    letter-spacing: 2px;
    line-height: 1.1;
}

.title-container #status {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* --- Floating Animation for the GIF --- */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.hero-gif {
    animation: float 3s ease-in-out infinite;
}

/* --- Mobile Responsiveness --- */
/* If the screen is small, stack the GIF and text vertically */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .title-container {
        text-align: center;
    }
    
    .title-container h1 {
        font-size: 2.5rem;
    }
}