* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Accessibility - visually hidden but available to screen readers */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    width: 100%;
    height: 100vh;
    background-color: #000;
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
}

.controls {
    background-color: #111;
    padding: 15px;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #333;
}

.camera-selector {
    padding: 8px 15px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.camera-selector:hover {
    background-color: #555;
}

.camera-selector:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.smithsonian-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s;
    cursor: pointer;
}

.smithsonian-link:hover {
    opacity: 0.7;
}

.smithsonian-link:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.smithsonian-logo {
    width: 40px;
    height: 40px;
    background-color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #000;
    font-size: 18px;
}

.smithsonian-text {
    font-size: 14px;
    font-weight: 500;
}

.external-icon {
    opacity: 0.8;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.container {
    flex: 1;
    display: flex;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
}

.video-wrapper {
    flex: 1;
    position: relative;
    background-color: #000;
    display: none;
}

.video-wrapper.active {
    display: flex;
}

.video-wrapper.grid-mode {
    display: flex !important;
    flex: 1;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Status overlay for loading and errors */
.status-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.status-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.status-message {
    font-size: 16px;
    margin-bottom: 10px;
    text-align: center;
    padding: 0 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #333;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.retry-button {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    pointer-events: auto;
}

.retry-button:hover {
    background-color: #555;
}

.retry-button:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
