/* Main styles for the catalog page. */
/*:root {
    --bg: #020310;
    --font: #dfe3f5;
    --backLogo: radial-gradient(circle, #1d254a, transparent);
    --borderLogo: rgba(148, 163, 255, 0.7);
    --fontMenu: rgba(226, 232, 255, 0.8);
    --borderMenu: linear-gradient(90deg, #38bdf8, #a855f7);
    --backMain: radial-gradient(circle at 0% 0%, #2830ff22 0, transparent 60%),
                radial-gradient(circle at 100% 100%, #00ffd522 0, transparent 55%),
                linear-gradient(135deg, #050816, #0b1324);
    --back2Menu: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}*/

:root {
    --bg: #fafafa;
    --bgAlt: #f0f0f0;
    --bgAlt2: #e8e8e8;
    --border: #d0d0d0;
    --font: #2a2a2a;
    --fontShadow: 0px -1px 1px #fff;
    --fontLight: #f0f0f0;
    --fontLightShadow: 0px -1px 1px #1b1b1b;

    --backLogo: radial-gradient(circle, #e8f0ff, transparent);
    --borderLogo: rgba(120, 150, 255, 0.45);

    --fontMenu: rgba(60, 60, 60, 0.85);
    --borderMenu: linear-gradient(90deg, #8ecdfc, #c6a7f7);

    --backMain:
        radial-gradient(circle at 0% 0%, rgba(180, 210, 255, 0.35) 0, transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(180, 255, 215, 0.35) 0, transparent 55%),
        linear-gradient(135deg, #ffffff, #f2f4fa);

    --backMainAlt:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--font);
    text-shadow: var(--fontShadow);
    font-size: 14px;
}

h1 {
    font-size: 24px;
    margin-top: 48px;
    text-align: center;
    break-before: always;
}

h2 {
    margin-top: 36px;
    font-size: 20px;
    text-align: center;
}

h3 {
    margin-top: 32px;
}

p, td {
    margin-block-start: 0.4em;
    margin-block-end: 0;
    white-space: pre-line;
}

a {
    color: var(--font);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    margin-block-start: 0;
}

.em-formula {
    font-size: 18px;
}

/*

Header

*/
.navigation {
    position: fixed;
    top: 8px;
    left: 8px;
    display: flex;
    height: 32px;
    z-index: 1000;
    user-select: none;
}

.navigation .logo {
    display: inline-block;
    vertical-align: top;
    height: 100%;
    padding: 0px 10px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border-radius: 0 999px 999px 0;
    border: 1px solid var(--borderLogo);
    background: var(--backLogo);
}

.navigation .menu-button {
    display: inline-block;
    vertical-align: top;
    height: 100%;
    padding: 0px 10px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    border-radius: 999px 0 0 999px;
    border: 1px solid var(--borderLogo);
    background: var(--backLogo);
    margin-right: -1px;
}

.navigation > button:hover {
    background: var(--backMain);
    cursor: pointer;
}

.navigation nav {
    display: none;
    position: absolute;
    top: 24px;
    font-size: 14px;
    margin: 16px 8px 0 0;
}

.menu-opened .navigation nav {
    display: block;
}

.navigation nav button {
    display: block;
    width: auto;
    background: var(--backLogo);
    border: none;
    color: var(--font);
    text-decoration: none;
    margin: 0 8px;
    padding: 4px 0;
    position: relative;
}

.navigation nav button:hover {
    cursor: pointer;
}

.navigation nav button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: var(--borderMenu);
    transition: width 0.18s ease-out;
}

.navigation nav button:hover::after,
.navigation nav button.active::after {
    width: 100%;
}

.search-container {
    position: relative;
}

#search-input {
    display: inline-block;
    height: 30px;
    padding: 0px 8px;
    border-radius: 0 999px 999px 0;
    background: var(--backLogo);
    border: 1px solid var(--borderLogo);
}

#search-input:focus {
    outline: none;
    background: var(--bgAlt);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.5);
}

#search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 4px;
    min-width: 320px;
    max-height: 50vh;
    padding: 8px;
    margin: 0px;
    border-radius: 8px;
    background: var(--bgAlt);
    border: 1px solid var(--borderLogo);
    box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 9999;
}

#search-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

#search-results li {
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 12px;
}

#search-results li:hover {
    background: var(--bgAlt2);
}

/* 

Buttons

*/
.btn-primary,
.btn-secondary {
    display: inline-block;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    color: var(--fontLight);
    text-shadow: var(--fontLightShadow);
    cursor: pointer;
    transition: transform 0.14s ease-out, box-shadow 0.14s ease-out, background-color 0.14s, color 0.14s;
}

.btn-primary {
    background: linear-gradient(135deg, #38bdf8, #a855f7);
    box-shadow: 0 14px 40px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(155deg, #0ea5e9, #9333ea);
    box-shadow: 0 18px 50px rgba(56, 189, 248, 0.4);
    text-decoration: none;
}

.btn-secondary {
    background: var(--bgAlt);
    color: var(--font);
    text-shadow: var(--fontShadow);
    border-color: rgba(148, 163, 255, 0.5);
}

.btn-secondary:hover {
    background: var(--bgAlt2);
    text-decoration: none;
}

footer {
    position: fixed;
    left: 4px;
    bottom: 0px;
    font-size: 11px;
    color: var(--font);
}

/* 

Tabs

*/

.tabs {
    display: flex;
    height: 100vh;
    border-bottom: 2px solid var(--borderLogo);
    margin-bottom: 16px;
    flex-direction: column;
}

.tabs .tabs-header {
    display: flex;
    gap: 8px;
}

.tabs .tabs-header button {
    position: relative;
    background: var(--bgAlt);
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--font);
    cursor: pointer;
}

.tabs .tabs-header button.active {
    background: var(--bgAlt2);
}

.tabs .tabs-header button.active::after {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 8px;
    border-top: 4px solid var(--borderLogo);
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 4px solid transparent;
    box-sizing: border-box;
}

.tabs .tabs-body {
    height: 100%;
    overflow: auto;
    padding: 16px;
    background: var(--bgAlt2);
}

.tabs .tabs-body .panel-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 16px;
}

.tabs .tabs-body .panel-title button {
    margin-left: 16px;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 999px;
    background: var(--bgAlt);
    border: 1px solid var(--borderLogo);
    color: var(--font);
    cursor: pointer;
}

/* 

Main Content 

*/
main {
    position: relative;
    width: 100%;
}

main section {
    position: relative;
    display: none;
    min-width: 288px;
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
}

main section#catalog-screen {
    max-width: none;
}

main section .content-container {
    height: 100%;
    padding: 32px 0 24px 0;
}

main section .content-container p:last-child {
    margin-bottom: 32px;
}

main section .content-container .from-author {
    margin-left: 36%;
    margin-right: 24px;
    font-style: italic;
    color: var(--font);
}

main section .graph-container {
    position: relative;
    width: 100%;
    height: 100vh;
}

main section .info-panel-container {
    display: none;
    position: relative;
    float: right;
    width: 33%;
    height: 100vh;
    background-color: var(--bgAlt);
}

main section .info-panel-container .info-panel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-shadow: -2px 0px 4px 0px var(--border);
}

main section .info-panel-container .info-panel .content {
    height: 94%;
    margin: 36px 0px 8px 8px;
    padding-right: 8px;
    overflow: auto;
}

main section mjx-math {
    font-size: 110%;
}

.empty-box {
    margin: 24px auto;
}

.comming-soon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: bold;
    color: #a4bda5;
    text-align: center;
    pointer-events: none;
    user-select: none;
    text-shadow: 1px 1px 1px #ffffffee, -1px -1px 1px #608755b4;
}

.placeholder {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-shadow: 0px 0px 8px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

section blockquote {
    position: relative;
    font-family: serif;
    font-size: 18px;
    font-style: italic;
    font-weight: bold;
    color: var(--font);
}

.classification-summary {
    margin: 16px 0;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}

.contact-link {
    text-decoration: none;
    cursor: pointer;
}

a#move-up {
    display: block;
    position: fixed;
    right: 16px;
    bottom: 24px;
    width: 32px;
    height: 32px;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    opacity: 0.2;
    font-size: 19px;
    text-align: center;
}

a#move-up:hover {
    opacity: 1;
    cursor: pointer;
}

/*

Main screen

*/

#main-screen {
    max-width: none;
    height: 100vh;
    overflow: hidden;
    background: var(--backMain);
}

#screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--backMainAlt);
    background-size: 32px 32px;
    opacity: 0.4;
    pointer-events: none;
}

#main-screen .content-container {
    max-width: 1024px;
    position: relative;
    height: 100vh;
    margin: 0 auto;
    padding: 0;
}

.main-left {
    position: relative;
    float: left;
    height: 100vh;
    width: 58%;
}

.main-left .content-block {
    position: absolute;
    top: 50%;
    left: 0;
    margin-top: -230px;
    padding: 0 0 0 16px;
}

.main-left .main-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 12px;
    opacity: 0.9;
}

.main-left .main-label::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: radial-gradient(circle, #22c55e, #22c55e00);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.25);
}

.main-left .main-title {
    margin: 0 0 16px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.1;
    text-align: left;
}

.main-left .main-subtitle {
    margin: 0 0 24px;
    font-size: 15px;
    max-width: 40rem;
}

.main-left .actions-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.main-left .meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: rgba(62, 75, 158, 0.9);
    margin-top: 4px;
}

.main-right {
    position: relative;
    float: right;
    width: 38%;
    height: 100vh;
}

.main-right .viz {
    position: absolute;
    width: 100%;
    top: 50%;
    right: 0;
    margin-top: -230px;
    margin-right: 16px;
    aspect-ratio: 4 / 5;
    border-radius: 28px;
    border: 1px solid rgba(148, 163, 255, 0.25);
    background: radial-gradient(circle at 20% 0%, #38bdf822 0, transparent 55%),
        radial-gradient(circle at 100% 100%, #a855f722 0, transparent 60%),
        rgba(15, 23, 42, 0.9);
    overflow: hidden;
    backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.8);
}

.main-right .orbit {
    position: absolute;
    border: 2px dashed rgba(148, 163, 255, 0.45);
    inset: 16%;
    animation: soma-orbit-spin 32s linear infinite alternate;
}

.main-right .orbit-2 {
    inset: 26%;
    opacity: 0.7;
    animation-duration: 50s;
}

.main-right .orbit-3 {
    inset: 36%;
    opacity: 0.5;
    animation-duration: 80s;
}

@keyframes soma-orbit-spin {
    from {
        transform: rotate(0deg);
        scale: 1;
        border-radius: 159px;
    }

    to {
        transform: rotate(360deg);
        scale: 1.1;
        border-radius: 69px;
    }
}

.main-right .node {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2),
        0 0 18px rgba(56, 189, 248, 0.7);
}

.main-right .node-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #a855f7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.35),
        0 0 22px rgba(168, 85, 247, 0.9);
}

.main-right .node-level1 {
    top: 18%;
    left: 58%;
}

.main-right .node-level2 {
    top: 66%;
    left: 26%;
}

.main-right .node-level3 {
    top: 32%;
    left: 20%;
}

.main-right .viz-label {
    position: absolute;
    left: 18px;
    bottom: 18px;
    font-size: 11px;
    line-height: 1.4;
    padding: 8px 10px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 255, 0.3);
    color: rgba(226, 232, 255, 0.9);
}

@media screen and (max-width: 480px) {
    main section .content-container {
        padding: 64px 0 24px 0;
    }

    .main-left {
        float: none;
        width: 100%;
        text-align: center;
    }

    .main-right {
        display: none;
    }

    .main-left .main-title {
        text-align: center;
    }

    .main-left .content-block {
        padding: 0 16px;
    }

    .main-left .actions-buttons,
    .main-left .meta-info {
        justify-content: center;
    }
}

/* 

Sidebar

*/

.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background-color: var(--bgAlt);
    box-shadow: -2px 0px 8px 2px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease-out;
    z-index: 999;
}

.sidebar.visible {
    right: 0;
}

.sidebar .toggle-button {
    position: absolute;
    top: 32px;
    left: -32px;
    width: 32px;
    height: 32px;
    background-color: var(--bgAlt2);
    border: 1px 1px 0 1px solid var(--borderLogo);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: -9px 0px 8px 2px rgba(0, 0, 0, 0.1);
    font-size: 13px;
    color: #626262;
}

/*

Table of Contents

*/

#toc .title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

#toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: section;
}

#toc li {
    position: relative;
    padding: 5px 0px 5px 25px;
}

#toc li::before {
    position: absolute;
    left: 0px;
    text-align: right;
}


#toc li>div {
    position: relative;
    border-bottom: 1px dotted #584f60;
}

#toc li>div>span {
    float: right;
}

#toc a {
    text-decoration: none;
    color: #3f3f3f;
}

#toc a:hover {
    text-decoration: underline;
    color: #323232;
}

#toc ul>li {
    counter-increment: section;
}

#toc ul>li::before {
    content: counters(section, ".") ". ";
    width: 20px;
}

#toc ul ul {
    counter-reset: subsection;
}

#toc ul ul>li {
    counter-increment: subsection;
    padding-left: 35px;
}

#toc ul ul>li::before {
    content: counters(section, ".") "." counters(subsection, ".") ". ";
    width: 30px;
}

#toc ul ul ul {
    counter-reset: subsubsection;
}

#toc ul ul ul>li {
    counter-increment: subsubsection;
    padding-left: 45px;
}

#toc ul ul ul>li::before {
    content: counters(section, ".") "." counters(subsection, ".") "." counters(subsubsection, ".") ". ";
    width: 40px;
}

#toc ul ul ul ul {
    counter-reset: subsubsubsection;
}

#toc ul ul ul ul>li {
    counter-increment: subsubsubsection;
    padding-left: 55px;
}

#toc ul ul ul ul>li::before {
    content: counters(section, ".") "." counters(subsection, ".") "." counters(subsubsection, ".") "." counters(subsubsubsection, ".") ". ";
    width: 50px;
}

.hidden-id {
    font-size: 0.1px;
    color: rgba(255, 255, 255, 0.1);
    opacity: 0.1;
}

@media print {
    body {
        margin: 0;
    }

    @page {
        margin: 10mm 10mm 20mm 10mm;
        size: A4;
    }

    header,
    footer,
    .no-print {
        display: none !important;
    }

    footer::after {
        content: counter(page) " (Theory of Causal Arisings)";
        position: running(footer);
        text-align: center;
        font-size: 10px;
    }
}

/*

Tables

*/

.table-container table {
    border-collapse: collapse;
    table-layout: fixed;
    margin: 16px 0;
}

.table-container th {
    padding: 12px 8px;
    background-color: var(--bgAlt2);
    color: var(--font);
}

.table-container th,
.table-container td {
    position: relative;
    border: 1px solid var(--border);
    text-align: center;
}

.table-container th.diagonal {
    padding: 0;
    background: linear-gradient(15deg, var(--bgAlt) 50%, var(--bgAlt2) 50%);
}

.table-container th.side-header {
    background-color: var(--bgAlt);
}

.table-container th.diagonal>span>span {
    position: absolute;
    font-size: 12px;
    white-space: nowrap;
}

.table-container th.diagonal>span>span.horizontal {
    top: 8px;
    right: 0px;
    transform: rotate(15deg);
}

.table-container th.diagonal>span>span.vertical {
    bottom: 6px;
    left: 14px;
    transform: rotate(15deg);
}

.table-container tr td {
    padding: 4px 8px;
    font-size: 14px;
    text-align: left;
}

.table-container tr:nth-child(even) td {
    background-color: var(--bgAlt);
}

/*

Simulation controls

*/
.simulation-container {
    display: flex;
    margin: 16px 0;
}

.plots>div {
    max-height: 220px !important;
}

.controls .dg {
    font-size: 16px !important;
    color: #666 !important;
    text-shadow: -1px -1px 0 #ffffff !important;
}

.controls .dg.main .close-button {
    display: none !important;
}

.controls .dg li:not(.folder) {
    background: #f3f3f3 !important;
    border-bottom: 1px solid #d9d9d9 !important;
}

.controls .dg ul li input {
    font-size: 16px !important;
}

.controls .dg .c input[type=text] {
    background: #e9e9e9 !important;
}

.controls .dg .cr.number input[type=text] {
    color: #126891 !important;
}

.controls .dg .c .slider {
    background: #d5d2d2 !important;
}

/*

Cards

*/
.card {
    position: relative;
}

.card .card-body {
    border-radius: 8px;
    background-color: #ccc;
    cursor: pointer;
    opacity: 0.9;
}

.card .card-body.highlighted {
    background-color: #74a16e;
}

.card .card-body:hover {
    background-color: #dfc7c7;
    opacity: 1;
}

.card .card-body.faded {
    pointer-events: none;
    opacity: 0.1;
}

.card .card-body .about {
    position: absolute;
    width: 100%;
    top: 45%;
}

.card .card-body .name {
    font-size: 22px;
    font-weight: bold;
    text-align: center;
    text-shadow: -1px -1px 1px #d8d8d8;
}

.card .card-body .short-desc {
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #ffffff4e;
    font-size: 16px;
    text-align: center;
}

.card .card-body .image-container {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    overflow: hidden;
}

.card .card-body .image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.card .card-body .top {
    position: absolute;
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 0 0 4px 4px;
    background-color: #ffffff5d;
    font-size: 18px;
    text-align: center;
}

.card .card-body .bottom {
    position: absolute;
    width: 100%;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 0px 4px 0 0;
    background-color: #ffffff5b;
    font-size: 18px;
    text-align: center;
}

.card .place-rt,
.card .place-rb,
.card .place-lt,
.card .place-lb {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    padding: 8px;
    border-radius: 50%;
    background-color: #ffffff4f;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

.card .place-rb {
    top: auto;
    bottom: 0;
}

.card .place-lt {
    left: 0;
}

.card .place-lb {
    top: auto;
    bottom: 0;
    left: 0;
}

.tooltip {
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    max-width: 640px;
    padding: 8px;
    border-radius: 8px 0 0 0;
    background-color: var(--bgAlt2);
    border: 1px solid var(--borderLogo);
    box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    pointer-events: none;
    z-index: 1000;
}

ul.arising-parents-tree {
    font-size: 11px;
    margin: 0px;
    padding: 0px;
}

ul.arising-parents-tree ul {
    padding: 0px 0px 0px 2px;
}

.arising-parents-tree li {
    margin: -6px 0px 0px 0px;
    padding: 0px 4px;
}

/*

Spider

*/

.spiderweb-container {
    position: relative;
    border: 8px solid #9db59e;
    box-shadow: inset 2px 2px 1px #90a591,
        1px 1px 1px 0px #90a591,
        inset -2px -2px 32px 6px #0000006e,
        0px 0px 13px 0px #00000078;
}

.spiderweb-container canvas {
    position: relative;
    pointer-events: none;
}

.spider {
    position: fixed;
    width: 42px;
    top: -70px;
    right: 20px;
    z-index: 99999;
}

.body {
    position: relative;
    width: 41px;
    height: 46px;
    background-image: url('../img/em-spider-sprite-64.png');
}

.eye {
    position: absolute;
    width: 14px;
    height: 18px;
    top: 12px;
}

.eye.left {
    left: 6px;
}

.eye.right {
    right: 6px;
}

.pupil {
    position: absolute;
    width: 7px;
    height: 8px;
    top: 5px;
    left: 7px;
    background-image: url('../img/em-spider-sprite-64.png');
    background-position: 23px 0px;
}

.eye.right .pupil {
    left: 1px;
}

.leg {
    position: absolute;
    background-image: url('../img/em-spider-sprite-64.png');
}

.leg.leg-1 {
    width: 16px;
    height: 10px;
    top: 16px;
    left: 37px;
    background-position: -48px 0px;
    transform-origin: left top;
}

.leg.leg-2 {
    width: 13px;
    height: 16px;
    top: 24px;
    left: 36px;
    background-position: -48px -21px;
    transform-origin: left top;
}

.leg.leg-3 {
    width: 10px;
    height: 17px;
    top: 31px;
    left: 34px;
    background-position: -52px 17px;
    transform-origin: left top;
}

.leg.leg-4 {
    width: 7px;
    height: 17px;
    top: 35px;
    left: 29px;
    background-position: -43px 17px;
    transform-origin: center top;
}

.leg.leg-5 {
    width: 7px;
    height: 15px;
    top: 36px;
    left: 7px;
    background-position: -29px 16px;
    transform-origin: center top;
}

.leg.leg-6 {
    width: 9px;
    height: 17px;
    top: 31px;
    left: -1px;
    background-position: -18px 17px;
    transform-origin: right top;
}

.leg.leg-7 {
    width: 10px;
    height: 17px;
    top: 23px;
    left: -5px;
    background-position: -6px 17px;
    transform-origin: right top;
}

.leg.leg-8 {
    width: 15px;
    height: 8px;
    top: 16px;
    left: -11px;
    background-position: -48px -10px;
    transform-origin: right top;
}

.spider .body {
    animation: respiration 2s infinite alternate ease-in-out;
}

.leg.leg-1 {
    animation: wiggle 2s infinite alternate ease-in-out;
    animation-delay: 0s;
}

.leg.leg-2 {
    animation: wiggle 2s infinite alternate ease-in-out;
    animation-delay: 0.1s;
}

.leg.leg-3 {
    animation: wiggle 2s infinite alternate ease-in-out;
    animation-delay: 0.2s;
}

.leg.leg-4 {
    animation: wiggle 2s infinite alternate ease-in-out;
    animation-delay: 0.3s;
}

.leg.leg-5 {
    animation: wiggle 2s infinite alternate-reverse ease-in-out;
    animation-delay: 0.3s;
}

.leg.leg-6 {
    animation: wiggle 2s infinite alternate-reverse ease-in-out;
    animation-delay: 0.2s;
}

.leg.leg-7 {
    animation: wiggle 2s infinite alternate-reverse ease-in-out;
    animation-delay: 0.1s;
}

.leg.leg-8 {
    animation: wiggle 2s infinite alternate-reverse ease-in-out;
    animation-delay: 0s;
}

.thread {
    position: absolute;
    top: -100px;
    left: 20px;
    width: 2px;
    height: 110px;
    background: #555;
}

@keyframes swing {
    0% {
        animation-duration: 1s;
        transform: translateX(-50%) rotate(2deg);
    }

    50% {
        transform: translateX(-50%) rotate(-2deg);
    }

    100% {
        transform: translateX(-50%) rotate(2deg);
    }
}

@keyframes respiration {
    0% {
        transform: scale(1.0);
    }

    100% {
        transform: scale(1.05);
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(7deg);
    }

    100% {
        transform: rotate(-7deg);
    }
}