*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, sans-serif;
    background: #0f1419;
    color: #e7ecf3;
}

a {
    color: #7eb8ff;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

.login-card,
.viewer-card {
    background: #1a2332;
    border: 1px solid #2a3648;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.login-card {
    max-width: 420px;
    margin: 4rem auto;
}

h1 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
}

.subtitle {
    margin: 0 0 1.5rem;
    color: #9aa8bc;
    font-size: 0.95rem;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
    color: #b8c4d6;
}

input[type="password"] {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid #3a4a60;
    border-radius: 8px;
    background: #0f1419;
    color: #e7ecf3;
    font-size: 1rem;
}

input[type="password"]:focus {
    outline: 2px solid #3d7eff;
    outline-offset: 1px;
}

button,
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #3d7eff;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.btn:hover {
    background: #2f68d9;
}

.btn-secondary {
    background: #2a3648;
}

.btn-secondary:hover {
    background: #3a4a60;
}

.error {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #ff8f98;
    font-size: 0.9rem;
}

.viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    color: #9aa8bc;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ecf8e;
    box-shadow: 0 0 8px rgba(62, 207, 142, 0.8);
}

.video-wrapper {
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid #2a3648;
}

.video-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-placeholder {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #9aa8bc;
    font-size: 0.95rem;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
}

.video-placeholder.is-loading,
.video-placeholder.is-error {
    display: flex;
}

.controls {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.hint {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: #7d8da3;
    line-height: 1.5;
}
