@font-face {
    font-family: 'CustomFont';
    src: url('../../fonts/font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CustomFont';
    src: url('../../fonts/bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg: #0d0d0d;
    --card: #141414;
    --muted: #bfc9df;
    --accent: #5561ff;
    --glow: rgba(115, 135, 255, 0.12);
    --pastel-blue: #a8d5ff;
}

* {
    box-sizing: border-box;
    font-family: 'CustomFont', Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    margin: 0;
    background: var(--bg);
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    color: #e9eef8;
    -webkit-font-smoothing: antialiased;
    display: flex;
    gap: 24px;
    padding: 36px;
    max-width: 1400px;
    margin: 0 auto;
}

.container {
    flex: 1;
    max-width: 820px;
    padding: 22px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--pastel-blue);
    text-decoration: none;
    margin-bottom: 20px;
    font-weight: 500;
    transition: color .2s;
}

.back-link:hover {
    color: #c0e3ff;
}

h1, h2 {
    text-align: center;
    margin: 6px 0;
    font-weight: 600;
}

h2 {
    color: var(--muted);
    font-weight: 500;
    font-size: 16px;
}

.upload-box {
    display: flex;
    justify-content: center;
    margin: 18px 0;
}

.upload-label {
    padding: 10px 16px;
    border-radius: 9px;
    background: linear-gradient(180deg, #3a3aff, #3340e6);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
}

.upload-label:hover {
    transform: translateY(-2px);
    transition: .12s;
}

input[type="file"] {
    display: none;
}

.error {
    text-align: center;
    color: #ff6b6b;
    min-height: 18px;
    margin: 6px 0;
}

.info-text {
    text-align: center;
    color: var(--muted);
    margin-bottom: 12px;
}

#preview img {
    display: block;
    margin: 0 auto 12px;
    width: 128px;
    height: 128px;
    image-rendering: pixelated;
    border-radius: 8px;
    border: 1px solid #222;
}

.hex-line-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    margin: 10px 0;
    background: linear-gradient(180deg, #0f0f10, #0c0c0c);
    border: 1px solid #222;
    overflow: visible;
    transition: box-shadow .24s ease, border-color .24s ease, background-color .24s ease, transform .22s ease;
}

.hex-line-box.copied {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
}

.hex-line-box.next-glow {
    border-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 36px rgba(85, 97, 255, 0.14);
}

.hex-line-box.next-glow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.04));
    pointer-events: none;
    z-index: 1;
    transition: opacity .28s ease;
}

.left-arrow.big-arrow {
    position: absolute;
    left: -32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 28px;
    color: white;
    opacity: .95;
    pointer-events: none;
    animation: arrowPulse 1.2s infinite ease-in-out;
}

@keyframes arrowPulse {
    0% { transform: translate(-4px, -50%) scale(1); opacity: .75; }
    50% { transform: translate(4px, -50%) scale(1.04); opacity: 1; }
    100% { transform: translate(-4px, -50%) scale(1); opacity: .75; }
}

.hex-line-box.slide-down {
    animation: slideDownIn 260ms cubic-bezier(.2, .9, .3, 1) forwards;
}

@keyframes slideDownIn {
    from { transform: translateY(-10px); opacity: .0; }
    to { transform: translateY(0); opacity: 1; }
}

.line-number {
    min-width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f0f10;
    border: 1px solid #222;
    color: #dfe7ff;
    font-weight: 700;
    font-size: 13px;
    z-index: 2;
}

.hex-text {
    flex: 1;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: #e9eef8;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    z-index: 2;
    padding-left: 6px;
}

.copy-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 0;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    z-index: 2;
    transition: transform .12s ease, background .12s ease;
}

.copy-btn:hover {
    transform: translateY(-2px);
    background: #6d79ff;
}

.copied-label {
    margin-left: 10px;
    color: #7fffa1;
    font-weight: 700;
    opacity: 0;
    z-index: 2;
    transition: opacity .14s ease;
}

.copied-label.visible {
    opacity: 1;
}

.divider {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid #2a2a2a;
}

.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #222;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 0;
}

.yaml-block {
    background: #0f0f10;
    padding: 15px;
    border: 1px solid #222;
    border-radius: 10px;
    margin-bottom: 20px;
}

.yaml-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0;
}

.yaml-row label {
    width: 90px;
    color: #dfe7ff;
    font-weight: 600;
}

.yaml-row input, .yaml-row select {
    flex: 1;
    padding: 8px;
    background: #141414;
    color: #e9eef8;
    border: 1px solid #222;
    border-radius: 8px;
}

.btn-disabled {
    background: #555 !important;
    cursor: not-allowed !important;
    opacity: .6;
}

.btn-disabled:hover {
    transform: none !important;
    background: #555 !important;
}

.sidebar {
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-self: flex-start;
    position: sticky;
    top: 36px;
}

.disclaimer-box {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
}

.disclaimer-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #e9eef8;
}

.disclaimer-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 18px;
}

.plugin-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: color .2s ease;
}

.plugin-link:hover {
    color: #ffea73;
    text-decoration: underline;
}

.steps-section {
    margin-top: 20px;
}

.steps-title {
    font-size: 16px;
    font-weight: 600;
    color: #e9eef8;
    margin: 0 0 12px 0;
}

.steps-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
}

.steps-list li {
    margin-bottom: 10px;
}

.steps-list code {
    background: #0f0f10;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    color: #7fffa1;
    font-size: 12px;
}

.creator-box {
    background: var(--card);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    gap: 16px;
}

.creator-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(211, 146, 6, 0.4), 0 0 40px rgba(211, 190, 6, 0.3), 0 0 60px rgba(211, 211, 6, 0.1);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 20px rgba(211, 146, 6, 0.5), 0 0 40px rgba(211, 190, 6, 0.3), 0 0 60px rgba(211, 211, 6, 0.1); }
    50% { box-shadow: 0 0 30px rgba(211, 146, 6, 0.6), 0 0 60px rgba(211, 190, 6, 0.4), 0 0 90px rgba(211, 211, 6, 0.1); }
}

.creator-info {
    flex: 1;
}

.creator-title {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}

.creator-name {
    margin: 4px 0 8px 0;
    font-size: 15px;
    font-weight: 400;
    color: #e9eef8;
}

.github-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--pastel-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color .2s ease;
}

.github-link:hover {
    color: #c0e3ff;
}

.github-link svg {
    width: 18px;
    height: 18px;
}

@media(max-width:1200px) {
    body {
        flex-direction: column;
        padding: 18px;
    }

    .sidebar {
        width: 100%;
        position: static;
    }
}

@media(max-width:540px) {
    .container {
        margin: 18px;
        padding: 14px;
    }

    .line-number {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .copy-btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    .hex-text {
        font-size: 12px;
    }

    .creator-box {
        flex-direction: column;
        text-align: center;
    }
}