* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
    background: #ffffff;
    overflow: hidden;
}

/* ----- Setup screen ------------------------------------------------- */

.setup {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f3f4f6;
}

.setup[hidden] { display: none; }

.setup-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 28px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    margin: 16px;
}

.setup-card h1 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: #111827;
}

.setup-card p {
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
    margin: 6px 0 14px;
}

.setup-card code {
    background: #f3f4f6;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 13px;
}

.setup-card label {
    display: block;
    margin-bottom: 14px;
    font-size: 12px;
    color: #4b5563;
}

.setup-card input[type="text"] {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #111827;
    background: #ffffff;
}

.setup-card input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.primary {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: #2563eb;
    color: white;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.primary:hover { background: #1d4ed8; }

.error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    margin: 10px 0 0;
}

.hint {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
    margin: 12px 0 0;
}

/* ----- Show screen --------------------------------------------------- */

.show {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.show[hidden] { display: none; }

.show iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.edit-pill {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: white;
    border: 0;
    cursor: pointer;
    font-size: 14px;
    line-height: 28px;
    text-align: center;
    padding: 0;
    opacity: 0.4;
    transition: opacity 150ms ease;
}

.edit-pill:hover { opacity: 1; }
