:root {
    color-scheme: only light;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: system-ui, sans-serif;
    background: #000;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* Header styling */
header {
    background: #0b0b0b;
    padding: .6rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem 1rem;
    flex-shrink: 0;
    border-bottom: 2px solid #222;
    z-index: 2;
}

.ip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.ip {
    background: #fff;
    color: #000 !important;
    border: 2px solid #000;
    border-radius: 12px;
    padding: .38rem .9rem;
    font-family: monospace;
    font-weight: 800;
    letter-spacing: .3px;
    font-size: 1rem;
}

#port-display {
    color: #0f0;
    font-weight: 800;
    margin-left: .8rem;
}

.button-control {
    margin-left: auto;
    background: #2e2e2e;
    color: #fff;
    border: 1px solid #666;
    border-radius: 8px;
    padding: .45rem 1rem;
    cursor: pointer;
    font-weight: 700;
}

.button-control:hover {
    background: #4a4a4a;
    border-color: #888;
}

/* Main content area */
#frame-container {
    position: relative;
    flex: 1;
    overflow: hidden;
    background: #111;
}

/* Iframe fills the entire screen */
iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(100vh - 3.2rem); /* subtract header height */
    border: none;
    overflow: hidden;
}

iframe::-webkit-scrollbar {
    display: none;
}

iframe {
    scrollbar-width: none;
}

/* Overlay for URL input */
#url-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Overlay form styling */
#url-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: min(90%, 480px);
    background: #181818;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

#url-form label {
    font-size: 1.1rem;
    text-align: center;
    font-weight: 700;
    color: #fff;
}

#url-input {
    padding: .8rem 1rem;
    font-size: 1rem;
    border-radius: 8px;
    border: 2px solid #555;
    background: #222;
    color: #fff;
}

#url-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 8px rgba(0, 123, 255, .6);
}

#url-submit {
    padding: .8rem;
    font-size: 1rem;
    font-weight: 800;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

#url-submit:hover {
    filter: brightness(1.15);
}