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

:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: #f5f5f7;
    --surface-hover: #eeeeee;
    --border: #e5e5e7;
    --text: #171717;
    --muted: #686868;
    --accent: #ff6600;
    --accent-hover: #e55c00;
    --header-bg: rgba(255,255,255,.94);
    --footer-bg: #f8f8fa;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #101114;
    --surface: #191a20;
    --surface-hover: #252630;
    --border: #30313a;
    --text: #f4f4f5;
    --muted: #a0a0aa;
    --accent: #ff6600;
    --accent-hover: #ff771a;
    --header-bg: rgba(16,17,20,.94);
    --footer-bg: #0c0d10;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    transition: background .2s, color .2s;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    cursor: pointer;
}

/* HEADER */

.header {
    flex-shrink: 0;
    background: var(--header-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: 1400px;
    margin: auto;
    padding: 8px clamp(12px, 3vw, 36px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-image {
    display: block;
    width: auto;
    height: 32px;
    max-width: 140px;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn {
    padding: 0 12px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
}

.theme-toggle {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 15px;
}

/* MAIN */

main {
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: auto;
    padding: 8px clamp(12px, 3vw, 36px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.intro {
    width: 100%;
    max-width: 1050px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.intro-text h1 {
    font-size: clamp(16px, 2.2vw, 22px);
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

/* EMBED CONTAINER & ATTRIBUTION */

.embed-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    flex: 1;
    min-height: 0;
    gap: 8px;
}

.embed-frame-container {
    width: min(100vw - 20px, 1050px);
    height: 100%;
    max-height: calc(720px - 36px);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.embed-frame-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.attribution-bar {
    width: min(100vw - 20px, 1050px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    padding: 0 4px;
    flex-shrink: 0;
}

.dev-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 8px;
    color: var(--text);
    font-weight: 500;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.dev-link:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* FOOTER */

.footer {
    flex-shrink: 0;
    border-top: 1px solid var(--border);
    background: var(--footer-bg);
}

.footer-inner {
    max-width: 1400px;
    margin: auto;
    padding: 8px clamp(12px, 3vw, 36px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
}

.footer-links a:hover {
    color: var(--accent);
}
