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

:root {
    --bg: #0a0d12;
    --surface: #11161e;
    --surface-hover: #171e28;
    --border: #242c38;
    --text: #f1f5f9;
    --muted: #8994a3;
    --accent: #7c3aed;
    --accent-hover: #8b5cf6;
    --danger: #ef4444;
    --success: #22c55e;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at top left,
            rgba(124, 58, 237, 0.12),
            transparent 35%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(59, 130, 246, 0.08),
            transparent 35%
        ),
        var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    padding: 48px;
}

/* Main container */

body > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--accent-hover);
}

h1 {
    font-size: 38px;
    font-weight: 750;
    letter-spacing: -1.5px;
    margin-bottom: 10px;
}

p {
    color: var(--muted);
    line-height: 1.6;
}

/* Controls */

#controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 28px;
}

#domain {
    flex: 1;
    min-width: 0;
    height: 48px;
    padding: 0 16px;

    background: var(--surface);
    color: var(--text);

    border: 1px solid var(--border);
    border-radius: 10px;

    outline: none;
    font-size: 15px;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

#domain::placeholder {
    color: #566170;
}

#domain:hover {
    background: var(--surface-hover);
}

#domain:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

#test {
    height: 48px;
    padding: 0 24px;

    border: 0;
    border-radius: 10px;

    background: var(--accent);
    color: #fff;

    font-size: 15px;
    font-weight: 650;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease;
}

#test:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 25px rgba(124, 58, 237, 0.25);
}

#test:active {
    transform: translateY(1px);
}

/* Status */

#status {
    min-height: 24px;
    margin-top: 18px;

    color: var(--muted);
    font-size: 14px;
}

/* Iframe area */

#frame-container {
    position: relative;

    width: 100%;
    height: 700px;

    margin-top: 24px;

    overflow: hidden;

    background: #080b10;

    border: 1px solid var(--border);
    border-radius: 14px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#frame-container::before {
    content: "TARGET PREVIEW";

    position: absolute;
    top: 0;
    left: 0;
    right: 0;

    height: 36px;

    display: flex;
    align-items: center;

    padding-left: 16px;

    background: rgba(17, 22, 30, 0.95);
    border-bottom: 1px solid var(--border);

    color: #667281;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;

    z-index: 5;
    pointer-events: none;
}

#target-frame {
    display: none;

    width: 100%;
    height: calc(100% - 36px);

    margin-top: 36px;

    border: 0;

    background: #fff;
}

/* Responsive */

@media (max-width: 700px) {
    body {
        padding: 24px;
    }

    h1 {
        font-size: 30px;
    }

    #controls {
        flex-direction: column;
        align-items: stretch;
    }

    #domain,
    #test {
        width: 100%;
    }

    #frame-container {
        height: 550px;
    }
}