*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #1a1d23;
    color: #e8eaed;
}

.chrome {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    background: #252932;
    border-bottom: 1px solid #3a4048;
}

.nav-buttons {
    display: flex;
    gap: 0.35rem;
}

.nav-buttons button,
.address-bar button,
.chrome-action {
    border: 1px solid #4a515c;
    background: #313742;
    color: #e8eaed;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
}

.chrome-action {
    padding: 0.45rem 0.65rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.nav-buttons button:not(:disabled):hover,
.address-bar button:hover,
.chrome-action:hover {
    background: #3d4552;
}

.nav-buttons button {
    width: 2rem;
    height: 2rem;
}

.nav-buttons button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.address-bar {
    flex: 1;
    display: flex;
    gap: 0.5rem;
    min-width: 0;
}

.address-bar input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid #4a515c;
    border-radius: 8px;
    background: #171a20;
    color: #e8eaed;
    font-size: 0.95rem;
}

.address-bar input:focus {
    outline: 2px solid #5b8def;
    outline-offset: 0;
}

.address-bar button {
    padding: 0.55rem 1rem;
    font-weight: 600;
}

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #b0b8c4;
    white-space: nowrap;
    user-select: none;
}

.nav-link {
    color: #8ab4ff;
    font-size: 0.85rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link:hover {
    text-decoration: underline;
}

.status {
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    background: #3d2f1f;
    color: #ffd89b;
    border-bottom: 1px solid #5c4a2e;
}

.viewport {
    height: calc(100% - 57px);
    position: relative;
}

.external-panel {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0d1117;
    padding: 1.5rem;
}

.external-card {
    max-width: 440px;
    text-align: center;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 12px;
    padding: 2rem;
}

.external-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.external-card p {
    margin: 0 0 1.25rem;
    color: #8b949e;
    line-height: 1.5;
    font-size: 0.95rem;
}

.external-card button.primary {
    border: 0;
    background: #238636;
    color: #fff;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.95rem;
}

.external-card button.primary:hover {
    background: #2ea043;
}

#browser-frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
