:root {
    --bg-base: #0a0a0c;
    --glass-bg: rgba(16, 18, 27, 0.92);
    --glass-border: rgba(148, 163, 184, 0.18);
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.28);
    --secondary: #ec4899;
    --accent: #22d3ee;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-soft: #cbd5e1;
    --danger: #ef4444;
    --success: #10b981;
    --input-bg: rgba(2, 6, 23, 0.56);
    --radius-lg: 18px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --font: "IBM Plex Sans", "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1)
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font)
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
    position: relative;
    overflow-x: hidden
}

.background-orbs {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.26;
    animation: float 20s infinite alternate ease-in-out
}

.orb-1 {
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%)
}

.orb-2 {
    bottom: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, transparent 70%);
    animation-delay: -10s
}

@keyframes float {
    0% {
        transform: translate(0, 0)
    }

    100% {
        transform: translate(-100px, 100px)
    }
}

.container {
    width: 100%;
    max-width: 680px;
    padding: 2rem;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.35rem
}

.header {
    text-align: center;
    margin-bottom: 0.25rem
}

.logo {
    margin-bottom: 0.85rem
}

.logo-img {
    max-height: 104px;
    width: auto;
    filter: drop-shadow(0 0 15px var(--primary-glow))
}

.main-title {
    font-size: clamp(1.9rem, 4vw, 2.45rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.25rem
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.8
}

.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2.75rem;
    box-shadow: 0 28px 70px -28px rgba(0, 0, 0, 0.72);
    transition: var(--transition)
}

.card-header {
    margin-bottom: 2.25rem;
    text-align: left
}

.card-header h2 {
    font-size: 1.62rem;
    margin-bottom: 0.65rem;
    font-weight: 700
}

.card-header p {
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.6
}

.form-feedback {
    margin-bottom: 1.75rem;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    background: rgba(239, 68, 68, 0.08);
    color: #fca5a5;
    font-size: 0.95rem;
    line-height: 1.5
}

.form-feedback-title {
    display: block;
    color: #fecaca;
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 0.45rem
}

.form-feedback-body {
    color: #fca5a5
}

.form-feedback-instruction {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(252, 165, 165, 0.2);
    color: #fee2e2;
    font-weight: 650
}

code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    color: var(--accent)
}

.upload-area {
    display: flex;
    flex-direction: column
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 1.8rem
}

.input-group label {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    color: var(--text-soft)
}

.input-group input {
    background: var(--input-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    min-height: 50px;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 0.94rem;
    outline: none;
    transition: var(--transition)
}

.input-group input::placeholder {
    color: rgba(148, 163, 184, 0.58)
}

.input-group input:focus {
    border-color: rgba(34, 211, 238, 0.7);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
    background: rgba(2, 6, 23, 0.74)
}

.dropzone {
    position: relative;
    border: 1px dashed rgba(148, 163, 184, 0.34);
    border-radius: var(--radius-md);
    padding: 2.6rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(2, 6, 23, 0.34);
    margin-bottom: 1.8rem;
    overflow: hidden
}

.dropzone:focus-visible {
    border-color: rgba(34, 211, 238, 0.72);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14)
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(34, 211, 238, 0.72);
    background: rgba(34, 211, 238, 0.06)
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    pointer-events: none;
    transition: opacity 0.2s
}

.upload-icon {
    width: 42px;
    height: 42px;
    color: var(--accent);
    margin-bottom: 0.45rem
}

.dropzone-text {
    font-size: 1rem;
    font-weight: 650
}

.dropzone-sub {
    font-size: 0.9rem;
    color: var(--text-muted)
}

.file-preview {
    position: absolute;
    inset: 0;
    background: #101827;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    z-index: 3;
    pointer-events: none
}

.file-preview.hidden {
    display: none
}

.file-name {
    font-weight: 600;
    color: var(--accent);
    word-break: break-all;
    padding: 0 2rem
}

.file-size {
    font-size: 0.9rem;
    color: var(--text-muted)
}

.clear-btn {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
    font-size: 1.25rem;
    line-height: 1
}

.clear-btn:hover {
    background: var(--danger)
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 52px;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 var(--primary-glow)
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.34)
}

.submit-btn:disabled {
    background: #2d3139;
    color: #64748b;
    box-shadow: none;
    cursor: not-allowed
}

.hidden {
    display: none !important
}

.status-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.25rem;
    animation: fadeIn 0.4s ease-out forwards
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.loader-ring {
    width: 58px;
    height: 58px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.75rem
}

.loader-ring.success {
    border-color: var(--success);
    animation: none
}

.loader-ring.error {
    border-color: var(--danger);
    animation: none
}

.loader-ring.retry {
    border-color: var(--danger);
    animation: none
}

@keyframes spin {
    100% {
        transform: rotate(360deg)
    }
}

.status-content {
    text-align: center;
    margin-bottom: 2.1rem
}

.status-content h3 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 0.5rem
}

.status-message {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 92%;
    margin: 0.65rem auto 0
}

.status-message.success-message {
    color: var(--text-main)
}

.status-message.error-message {
    color: var(--danger)
}

.status-message.markdown-message {
    width: min(100%, 560px);
    max-width: 100%;
    margin-top: 1rem;
    padding: 1.25rem 1.3rem;
    text-align: left;
    border: 1px solid rgba(16, 185, 129, 0.18);
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.06);
    color: var(--text-main)
}

.status-message.markdown-message h4,
.status-message.markdown-message h5,
.status-message.markdown-message h6 {
    margin: 0 0 0.7rem;
    color: #d1fae5;
    line-height: 1.25
}

.status-message.markdown-message p,
.status-message.markdown-message ul,
.status-message.markdown-message ol {
    margin: 0 0 0.85rem
}

.status-message.markdown-message p:last-child,
.status-message.markdown-message ul:last-child,
.status-message.markdown-message ol:last-child {
    margin-bottom: 0
}

.status-message.markdown-message ul,
.status-message.markdown-message ol {
    padding-left: 1.25rem
}

.status-message.markdown-message li + li {
    margin-top: 0.35rem
}

.status-message.markdown-message a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none
}

.status-message.markdown-message a:hover {
    text-decoration: underline
}

.permalink-panel {
    width: 100%;
    margin-top: 2.25rem;
    padding: 1.1rem 1.15rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(34, 211, 238, 0.18);
    background: rgba(34, 211, 238, 0.06);
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.5
}

.permalink-row {
    display: flex;
    gap: 0.85rem;
    align-items: stretch;
    margin-top: 0.75rem
}

.permalink-row a {
    flex: 1;
    min-width: 0;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.22);
    color: var(--accent);
    font-family: var(--mono);
    font-size: 0.82rem;
    text-decoration: none;
    word-break: break-all
}

.copy-link-btn {
    flex: 0 0 auto;
    border: 0;
    border-radius: var(--radius-sm);
    min-height: 42px;
    padding: 0 1rem;
    background: rgba(34, 211, 238, 0.16);
    color: var(--text-main);
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition)
}

.copy-link-btn:hover {
    background: rgba(34, 211, 238, 0.26)
}

.copy-feedback {
    min-height: 1.2rem;
    margin-top: 0.55rem;
    color: #bae6fd;
    font-size: 0.85rem
}

.progress-bar-container {
    width: 100%;
    margin-bottom: 2.5rem
}

.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s ease-out
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    text-align: right
}

.pipeline-steps {
    list-style: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.15rem
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.35;
    transition: all 0.3s
}

.step.active {
    opacity: 1
}

.step.completed {
    opacity: 1
}

.step-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-muted);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: var(--bg-base)
}

.step:not(:last-child) .step-icon::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 8px;
    width: 2px;
    height: 1.25rem;
    background: rgba(255, 255, 255, 0.1)
}

.step.active .step-icon {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow)
}

.step.active .step-icon::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%
}

.step.completed .step-icon {
    border-color: var(--success);
    background: var(--success)
}

.step.completed:not(:last-child) .step-icon::after {
    background: var(--success)
}

.step-label {
    font-size: 0.95rem;
    font-weight: 600
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 1rem
}

.footer-version {
    margin-top: 0.35rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.03em;
}

.uuid-reference {
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.45);
    font-family: var(--mono);
    font-size: 0.78rem;
    word-break: break-all
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding: 1rem 0
    }

    .container {
        padding: 1.25rem
    }

    .glassmorphism {
        padding: 1.45rem
    }

    .main-title {
        font-size: 1.75rem
    }

    .card-header {
        margin-bottom: 1.65rem
    }

    .dropzone {
        padding: 2.1rem 1.2rem
    }

    .permalink-row {
        flex-direction: column
    }

    .copy-link-btn {
        min-height: 44px
    }
}
