.demo-shell {
    --demo-blue: #008dff;
    --demo-blue-dark: #004b88;
    --demo-bg: #f4f7fb;
    background: radial-gradient(circle at top right, #e9f3ff 0%, var(--demo-bg) 42%, #f6f8fc 100%);
    min-height: auto;
    padding: 28px 20px 14px;
    font-family: "Inter", sans-serif;
}

.demo-badge,
.demo-intro-title,
.demo-dropzone-title,
.demo-selected-value,
.demo-modal-title {
    font-family: "Poppins", sans-serif;
}

.demo-layout {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 16px;
}

.demo-intro {
    border-radius: 18px;
    border: 1px solid #dbe8f8;
    background: linear-gradient(125deg, #ffffff 0%, #f5f9ff 100%);
    padding: 18px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 9999px;
    border: 1px solid rgba(0, 141, 255, 0.2);
    background: rgba(0, 141, 255, 0.1);
    color: var(--demo-blue-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 6px 12px;
}

.demo-intro-title {
    margin: 12px 0 6px;
    font-size: clamp(22px, 2.3vw, 32px);
    line-height: 1.12;
    color: #0f172a;
    font-weight: 700;
}

.demo-intro-text {
    margin: 0;
    font-size: 14px;
    color: #54627b;
    max-width: 720px;
}

.demo-meta {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.demo-meta-item {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid #d9e3f2;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 11px;
}

.demo-card {
    min-height: 200px;
    border-radius: 18px;
    border: 1px solid #dae5f4;
    background: #ffffff;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.demo-dropzone {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 14px;
    border: 2px dashed #c8d7ea;
    border-radius: 18px;
    background: transparent;
    overflow: hidden;
    text-align: center;
    min-height: 140px;
    padding: 24px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.demo-dropzone-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
    pointer-events: none;
}

.demo-dropzone-overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 27, 67, 0.2);
    z-index: 1;
    pointer-events: none;
}

.demo-dropzone > *:not(.demo-dropzone-bg):not(.demo-dropzone-overlay) {
    position: relative;
    z-index: 2;
}

.demo-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 0;
}

.demo-dropzone:hover,
.demo-dropzone:focus-within,
.demo-dropzone.is-dragging {
    border-color: #74b6ff;
    box-shadow: 0 0 0 4px rgba(0, 141, 255, 0.12);
    transform: translateY(-1px);
}

.demo-dropzone.is-dragging .demo-dropzone-title {
    background: rgba(255, 255, 255, 0.72);
}

.demo-icon-wrap {
    width: 62px;
    height: 62px;
    margin: 0 auto;
    border-radius: 9999px;
    background: linear-gradient(160deg, #d9e9ff 0%, #edf3ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--demo-blue-dark);
}

.demo-dropzone-title {
    margin: 0;
    display: inline-block;
    padding: 8px 14px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    font-size: clamp(19px, 1.6vw, 24px);
    font-weight: 700;
    line-height: 1.15;
    color: #08122b;
    max-width: 590px;
    margin-left: auto;
    margin-right: auto;
}

.demo-pick-btn {
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: #0b1b43e0;
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 13px;
    padding: 12px 22px;
}

.demo-dropzone input[type="file"] {
    display: none;
}

.demo-selected-file {
    position: relative;
    margin: 0;
    margin-top: 14px;
    background: rgba(246, 249, 254, 0.92);
    border-top: 1px solid #deebf8;
    padding: 15px 18px;
    display: none;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.demo-selected-label {
    margin: 0;
    color: #7282a0;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 800;
    font-size: 12px;
}

.demo-selected-value {
    margin: 4px 0 0;
    font-size: clamp(16px, 1.2vw, 22px);
    font-weight: 700;
    line-height: 1.15;
    color: #0f172a;
    max-width: 500px;
    word-break: break-word;
}

.demo-actions {
    position: relative;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 18px;
    border-top: 1px solid #e6eef8;
    background: #ffffff;
    flex-wrap: wrap;
}

.demo-send-btn {
    border: 0;
    border-radius: 9999px;
    padding: 11px 18px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    background: #0b1b43;
    cursor: pointer;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.demo-send-btn:hover {
    transform: translateY(-1px);
}

.demo-send-btn:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
}

.demo-processing {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.44);
    backdrop-filter: blur(3px);
    z-index: 10;
}

.demo-processing.hidden {
    display: none;
}

.demo-processing-card {
    min-width: 230px;
    border-radius: 14px;
    border: 1px solid #d5e3f6;
    background: #ffffff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.demo-spinner {
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    border: 2px solid #d6e4f8;
    border-top-color: #0f3e8a;
    animation: demo-spin 1s linear infinite;
    flex: 0 0 auto;
}

@keyframes demo-spin {
    to {
        transform: rotate(360deg);
    }
}

.demo-modal-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 12%, rgba(56, 189, 248, 0.16) 0%, rgba(2, 6, 23, 0.58) 52%);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.demo-modal-backdrop.hidden {
    display: none;
}

.demo-modal {
    width: min(calc(100vw - 36px), 440px);
    border-radius: 22px;
    border: 1px solid #d6e3f5;
    background: linear-gradient(180deg, #fdfefe 0%, #f7faff 100%);
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.28);
    overflow: hidden;
}

.demo-captcha-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(6, 13, 29, 0.38);
    z-index: 10001;
}

.demo-captcha-modal.hidden {
    display: none;
}

.demo-captcha-panel {
    width: min(calc(100vw - 36px), 460px);
}

.demo-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e6eef9;
    background: linear-gradient(120deg, rgba(222, 239, 255, 0.8) 0%, rgba(255, 255, 255, 0.35) 100%);
}

.demo-modal-title {
    margin: 0;
    font-size: clamp(17px, 1.35vw, 23px);
    font-weight: 800;
    color: #101828;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.demo-modal-subtitle {
    margin: 6px 0 0;
    font-size: 13px;
    color: #5d6d87;
}

.demo-modal-close {
    border: 0;
    background: rgba(255, 255, 255, 0.65);
    color: #64748b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.demo-modal-close:hover {
    background: #ffffff;
    color: #1f2937;
    transform: translateY(-1px);
}

.demo-modal-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.demo-email-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.demo-email-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    border-radius: 12px;
    border: 1px solid #bed0ea;
    background: #ffffff;
    padding: 13px 14px;
    font-size: 15px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin: 0;
}

.demo-email-input:focus {
    border-color: #66a8f2;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
}

.demo-consent-row {
    margin-top: 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(226, 236, 250, 0.45);
}

.demo-consent-checkbox {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #0f3e8a;
    cursor: pointer;
    flex: 0 0 auto;
}

.demo-consent-label {
    margin: 0;
    font-size: 13px;
    color: #364152;
    line-height: 1.45;
    cursor: pointer;
}

.demo-modal-actions {
    margin-top: 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.demo-btn-light {
    border: 1px solid #bfd2eb;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.9);
    color: #4b5e78;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.demo-btn-primary {
    border: 0;
    border-radius: 9999px;
    background: linear-gradient(135deg, #0b1b43 0%, #173574 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(11, 27, 67, 0.26);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.demo-btn-light:hover,
.demo-btn-primary:hover {
    transform: translateY(-1px);
}

.demo-btn-light:hover {
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(100, 116, 139, 0.14);
}

.demo-btn-primary:hover {
    box-shadow: 0 14px 26px rgba(11, 27, 67, 0.34);
}

.demo-modal-feedback {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #047857;
}

.demo-captcha-block {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid #d9e1ee;
    background: linear-gradient(180deg, #f4f7fb 0%, #eef2f8 100%);
    box-shadow: 0 8px 20px rgba(37, 55, 88, 0.08);
    position: relative;
    overflow: hidden;
}

.demo-captcha-block::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -44px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(87, 132, 195, 0.22) 0%, rgba(87, 132, 195, 0) 70%);
    pointer-events: none;
}

.demo-captcha-block.hidden {
    display: none;
}

.demo-captcha-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.demo-captcha-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #bdd9fb;
    background: rgba(255, 255, 255, 0.8);
    color: #1c4f94;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.demo-captcha-status {
    font-size: 12px;
    font-weight: 600;
    color: #5f6f88;
    text-align: right;
}

.demo-puzzle-track {
    position: relative;
    width: min(100%, 340px);
    height: 136px;
    border-radius: 6px;
    border: 1px solid #c8d5e8;
    background:
        radial-gradient(140px 100px at 76% 18%, rgba(255, 172, 215, 0.86) 0%, rgba(255, 172, 215, 0) 70%),
        radial-gradient(180px 150px at 16% 26%, rgba(86, 198, 255, 0.95) 0%, rgba(86, 198, 255, 0.36) 52%, rgba(86, 198, 255, 0) 80%),
        linear-gradient(130deg, #3bd8c5 2%, #35b8ee 46%, #f190c2 100%);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
    isolation: isolate;
}

.demo-puzzle-track::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(rgba(255, 255, 255, 0.22) 0.8px, rgba(255, 255, 255, 0) 0.8px);
    background-size: 4px 4px;
    opacity: 0.35;
    pointer-events: none;
}

.demo-puzzle-track.is-solved {
    border-color: #6ad0b2;
    box-shadow: 0 0 0 3px rgba(55, 189, 149, 0.18), 0 10px 18px rgba(55, 189, 149, 0.22);
}

.demo-puzzle-track.is-solved .demo-puzzle-piece {
    box-shadow: 0 10px 20px rgba(43, 188, 149, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.demo-puzzle-hole {
    position: absolute;
    top: 0;
    left: 160px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(31, 35, 57, 0.72) 0%, rgba(28, 31, 52, 0.88) 100%);
    box-shadow: inset 0 0 0 2px rgba(14, 16, 29, 0.36), inset 0 10px 16px rgba(0, 0, 0, 0.28);
}

.demo-puzzle-hole::before,
.demo-puzzle-piece::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -8px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    transform: translateX(-50%);
}

.demo-puzzle-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.94);
    background:
        radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0) 50%),
        linear-gradient(150deg, rgba(241, 250, 255, 0.98) 0%, rgba(195, 233, 255, 0.96) 55%, rgba(169, 213, 251, 0.95) 100%);
    box-shadow:
        0 10px 18px rgba(16, 30, 58, 0.42),
        0 0 0 2px rgba(42, 65, 109, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
    transition: left 0.05s linear, box-shadow 0.2s ease;
    cursor: grab;
}

.demo-puzzle-hole::before {
    background: linear-gradient(160deg, rgba(31, 35, 57, 0.72) 0%, rgba(28, 31, 52, 0.88) 100%);
    box-shadow: inset 0 0 0 2px rgba(14, 16, 29, 0.36);
}

.demo-puzzle-piece::before {
    background: linear-gradient(150deg, rgba(241, 250, 255, 0.98) 0%, rgba(195, 233, 255, 0.96) 55%, rgba(169, 213, 251, 0.95) 100%);
    border: 2px solid rgba(255, 255, 255, 0.94);
    box-shadow: 0 0 0 2px rgba(42, 65, 109, 0.46);
}

.demo-puzzle-piece::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 13px;
    height: 13px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 2px rgba(86, 124, 186, 0.32), inset 0 -1px 2px rgba(110, 162, 225, 0.38);
}

.demo-puzzle-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 2px;
    height: 46px;
    padding: 8px 0 2px;
    background: transparent;
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.demo-puzzle-slider::-webkit-slider-runnable-track {
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(185, 195, 209, 0.95);
    background:
        linear-gradient(180deg, rgba(243, 246, 252, 1) 0%, rgba(229, 235, 244, 1) 100%);
    box-shadow: inset 0 1px 3px rgba(27, 40, 63, 0.14);
}

.demo-puzzle-slider::-moz-range-track {
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(185, 195, 209, 0.95);
    background: linear-gradient(180deg, rgba(243, 246, 252, 1) 0%, rgba(229, 235, 244, 1) 100%);
    box-shadow: inset 0 1px 3px rgba(27, 40, 63, 0.14);
}

.demo-puzzle-slider::-moz-range-progress {
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #708dff 0%, #4f77f4 100%);
}

.demo-puzzle-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 74px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(61, 90, 202, 0.9);
    background:
        radial-gradient(circle at 28% 26%, rgba(160, 197, 255, 0.9) 0%, rgba(160, 197, 255, 0) 44%),
        linear-gradient(160deg, #6f8cff 0%, #4a6fed 100%);
    box-shadow: 0 8px 16px rgba(40, 61, 152, 0.36), inset 0 1px 0 rgba(182, 204, 255, 0.68);
    cursor: pointer;
    margin-top: -12px;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m13 6 6 6-6 6'/%3E%3C/svg%3E"), radial-gradient(circle at 28% 26%, rgba(160, 197, 255, 0.9) 0%, rgba(160, 197, 255, 0) 44%), linear-gradient(160deg, #6f8cff 0%, #4a6fed 100%);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 20px, auto, auto;
}

.demo-puzzle-slider::-moz-range-thumb {
    width: 74px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(61, 90, 202, 0.9);
    background: linear-gradient(160deg, #6f8cff 0%, #4a6fed 100%);
    box-shadow: 0 8px 16px rgba(40, 61, 152, 0.36), inset 0 1px 0 rgba(182, 204, 255, 0.68);
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.demo-puzzle-slider:hover::-webkit-slider-thumb,
.demo-puzzle-slider:focus-visible::-webkit-slider-thumb {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 20px rgba(34, 54, 145, 0.42), inset 0 1px 0 rgba(201, 217, 255, 0.75);
}

.demo-puzzle-slider:hover::-moz-range-thumb,
.demo-puzzle-slider:focus-visible::-moz-range-thumb {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 10px 20px rgba(34, 54, 145, 0.42), inset 0 1px 0 rgba(201, 217, 255, 0.75);
}

.demo-puzzle-slider:active::-webkit-slider-thumb,
.demo-puzzle-slider:active::-moz-range-thumb {
    transform: scale(0.98);
}

@media (max-width: 900px) {
    .demo-shell {
        padding: 12px 12px 10px;
    }

    .demo-modal-actions {
        justify-content: stretch;
    }

    .demo-btn-light,
    .demo-btn-primary {
        width: 100%;
        justify-content: center;
    }
}
