:root {
    --bg-deep: #020617;
    --bg-glow: #3b0764;
    --glass-bg: #0f172a73;
    --glass-border: #ffffff1a;
    --glass-shadow: 0 30px 60px -15px #0009;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --code-bg: #00000080;
    --code-border: #ffffff0d;
    --code-text: #a78bfa;
    --radius-xl: 24px;
    --radius-md: 12px;
    --radius-sm: 8px
}

* {
    box-sizing: border-box
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-deep);
    background-image: radial-gradient(circle at 50% 0%, var(--bg-glow) 0%, var(--bg-deep) 60%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center
}

.container {
    width: 100%;
    max-width: 850px;
    padding: 4rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1
}

header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%
}

h1 {
    margin: 0 0 1rem;
    font-size: 3.5rem;
    letter-spacing: -.04em;
    font-weight: 800;
    background: linear-gradient(to right, #f8fafc, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent
}

p.subtitle {
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 600px
}

.npm-badge {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    background: #0006;
    border: 1px solid var(--glass-border);
    padding: .75rem 1.25rem;
    border-radius: 50px;
    margin: 2rem 0;
    font-family: ui-monospace, monospace;
    font-size: .95rem;
    color: #4ade80
}

.npm-install-icon {
    color: var(--text-muted);
    user-select: none
}

.glass-panel {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem
}

.input-group {
    display: flex;
    gap: .5rem;
    width: 100%
}

input {
    flex: 1;
    padding: 1.1rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: #ffffff08;
    color: var(--text-main);
    font-size: 1.05rem;
    transition: all .2s ease
}

input:focus {
    outline: none;
    background: #ffffff0f;
    border-color: var(--primary)
}

input::placeholder {
    color: #475569
}

button {
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: background .15s ease;
    white-space: nowrap
}

button:hover {
    background: var(--primary-hover)
}

#results-container {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    border-top: 1px solid #ffffff0d;
    padding-top: 1.5rem
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
    font-weight: 600;
    font-size: .9rem;
    text-transform: uppercase;
    letter-spacing: .05em
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: .4rem .8rem;
    font-size: .8rem;
    border-radius: var(--radius-sm)
}

.copy-btn:hover {
    background: #ffffff1a;
    color: var(--text-main)
}

pre {
    margin: .5rem 0 0;
    padding: 1.25rem;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-md);
    color: var(--code-text);
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: .85rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all
}

.preview-wrapper {
    margin-top: .5rem;
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: #00000040;
    border-radius: var(--radius-md);
    padding: .25rem;
    min-height: 250px;
    overflow: visible
}

.preview-wrapper iframe,
.preview-wrapper blockquote {
    width: 100%;
    max-width: 100%;
    border: none !important;
    border-radius: 8px;
    margin: 0 auto;
}

.preview-wrapper iframe[src*="youtube.com"]:not([data-short="true"]),
.preview-wrapper iframe[src*="vimeo.com"],
.preview-wrapper iframe[src*="google.com/maps"] {
    aspect-ratio: 16/9;
    height: auto;
}

.preview-wrapper iframe[data-short="true"] {
    aspect-ratio: 9/16;
    max-width: 320px;
    height: auto;
    margin: 0 auto;
}

.error-state {
    color: #ef4444;
    font-weight: 500;
    font-family: system-ui;
    text-align: center;
    width: 100%;
    padding: 2rem
}

.services-wrapper {
    width: 100%;
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem
}

.services-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    font-weight: 600
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    max-width: 700px
}

.service-tag {
    background: #0f172a99;
    border: 1px solid #ffffff14;
    padding: .5rem 1rem;
    border-radius: 50px;
    font-size: .85rem;
    color: #cbd5e1;
    transition: all .2s ease
}

.service-tag:hover {
    border-color: var(--primary);
    color: #fff;
    background: #8b5cf61a
}

.footer {
    margin-bottom: 2rem;
    font-size: .85rem;
    color: var(--text-muted);
    text-align: center;
    opacity: .85;
    width: fit-content;
    font-family: ui-monospace, monospace;
    padding: 10px 25px 12px;
    background-color: #0006;
    border-radius: 50px;
    border: 1px solid #ffffff0d;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center
}

.footer a {
    color: var(--primary);
    text-decoration: none
}

.footer a:hover {
    text-decoration: underline;
    color: var(--primary-hover)
}

.social-nav {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff0d;
    border: 1px solid #ffffff1a;
    transition: all .2s ease
}

.social-link:hover {
    background: #ffffff26;
    transform: translateY(-2px)
}

.social-link svg {
    width: 22px;
    height: 22px
}

.social-github svg {
    fill: #fff
}

.social-sponsor svg {
    fill: #ef4444
}

.social-sponsor:hover {
    background: #ef444426;
    border-color: #ef444466
}