:root {
    --bg-main: #fff6fa;
    --bg-dark: #ffe6f0;
    --surface-hgt: #ffa2c5;
    --surface-hgt-shadow: #ff86b6;
    --surface-text: #ff5f9e;
    --surface: #ffdce8;
    --surface-shadow: #ffb4cc;
    --surface-dsb: #ffeef4;
    --highlight: #ffffffcc;
    --shading: #80164015;
    --text-main: #c22b67;
    --border-solid: #ffc1d9;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    padding: 0;
    font-family: "Overlock", sans-serif;
    background: linear-gradient(180deg, var(--surface) 100px, var(--bg-main) 250px);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    animation: fadeInOnLoad 1s ease-out forwards;
}

.material-symbols-outlined {
    font-variation-settings:
        "FILL" 0,
        "wght" 400,
        "GRAD" 0,
        "opsz" 24;
}

header {
    width: 100%;
    max-width: 800px;
    padding: 40px 20px 20px;
    text-align: left;
}

h1 {
    font-size: 42px;
    margin: 0;
    color: var(--surface-text);
    display: inline-block;
}

.tagline {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 20px 0;
}

.layout-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
    padding: 0 20px 40px;
}

@media (min-width: 1120px) {
    .layout-container {
        max-width: 1100px;
    }
    header {
        max-width: 1100px;
    }
}

main {
    flex: 1;
    min-width: 0;
}

.card {
    background-color: var(--surface);
    color: var(--surface-text);
    border-bottom: 5px solid var(--surface-shadow);
    border-top: 1px solid var(--highlight);
    box-shadow: 5px 5px 0 var(--shading);
    padding: 25px;
    margin-bottom: 25px;
    transform: translateY(0);
    position: relative;
}

.download-link {
    text-decoration: none;
    display: flex;
    font-weight: 700;
    color: var(--text-main);
    background-color: var(--bg-main);
    padding: 3px 10px;
    width: 100%;
}
.download-link:hover {
    background-color: white;
}

h2 {
    font-size: 26px;
    margin: 0 0 8px 0;
    color: var(--surface-text);
    display: inline-block;
    box-shadow: inset 0 -12px 0 0 var(--border-solid);
}
H3 {
    margin: 0;
    margin-top: 20px;
}
a {
    color: var(--text-main);
}

p {
    color: var(--text-main);
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.popup-container {
    font-family: "Overlock", sans-serif;
    width: 250px;
    flex-shrink: 0;
    padding: 15px;
    background-color: var(--surface);
    color: var(--surface-text);
    border-bottom: 5px solid var(--surface-shadow);
    border-top: 1px solid var(--highlight);
    box-shadow: 0 0 5px #00000077;
    outline: solid 1px var(--text-main);
    transition: all 0.2s ease;
}

@media (max-width: 600px) {
    .layout-container {
        flex-direction: column;
        align-items: center;
    }
    .popup-container {
        order: -1;
        z-index: 999;
        margin-bottom: 100px;
    }

    main {
        width: 100%;
    }
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.header-row h2 {
    margin: 0;
    box-shadow: inset 0 -13px 0 0 var(--border-solid);
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    font-size: 15px;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.switch {
    appearance: none;
    width: 32px;
    height: 21px;
    border-top: 3px solid var(--surface-shadow);
    border-bottom: 1px solid var(--highlight);
    background: var(--surface-dsb);
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider:before {
    content: "";
    position: absolute;
    top: -5px;
    right: 12px;
    width: 20px;
    height: 16px;
    background: var(--surface-hgt);
    border-bottom: 5px solid var(--surface-hgt-shadow);
    border-top: 1px solid var(--highlight);
    box-shadow:
        3px 3px 0 var(--shading),
        2px 2px 0 var(--shading);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.3);
}

.slider:hover:before {
    border-bottom: 6px solid var(--surface-hgt-shadow);
    margin-top: -1px;
    box-shadow:
        4px 4px 0 var(--shading),
        2px 2px 0 var(--shading);
}

input:checked + .slider:before {
    transform: translateX(12px);
}

.listing {
    border-top: 2px dashed var(--border-solid);
    padding-top: 5px;
}
.bottom-listing {
    border-top: 2px dashed var(--border-solid);
    margin-top: 8px;
    padding-top: 5px;
}

.icon-btn {
    border: none;
    text-align: center;
    width: 22px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-hgt);
    border-bottom: 5px solid var(--surface-hgt-shadow);
    border-top: 1px solid var(--highlight);
    color: var(--surface-text);
    cursor: pointer;
    font-weight: bold;
    box-shadow:
        3px 3px 0 var(--shading),
        2px 2px 0 var(--shading);
    transition: all 0.2s ease;
}
.icon-btn .material-symbols-outlined {
    font-size: 1rem;
    color: var(--surface-dsb);
    text-shadow: 0 0 3px var(--surface-text);
}
.icon-btn:hover {
    border-bottom: 6px solid var(--surface-hgt-shadow);
    margin-top: -1px;
    box-shadow:
        4px 4px 0 var(--shading),
        2px 2px 0 var(--shading);
}
.icon-btn:active {
    border-bottom: 3px solid var(--surface-hgt-shadow);
    box-shadow: 1px 1px 0 var(--shading);
    margin-top: 2px;
}

.hidden-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        max-height 0.4s ease,
        opacity 0.6s ease,
        transform 0.1s ease 0.4s,
        padding 0.6s ease;
}

.hidden-panel:nth-child(2) {
    border-bottom: 2px dashed var(--border-solid);
}

.hidden-panel.active {
    opacity: 1;
    padding-top: 5px;
    padding-bottom: 20px;
    max-height: 500px;
    transform: translateY(0);
    transition:
        max-height 0.4s ease-in-out,
        opacity 0.6s ease,
        transform 1s ease,
        padding 0.6s cubic-bezier(0.34, 2, 0.64, 1);
}

.input-group {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
}
.input-group input {
    width: 40%;
    font-size: 12px;
    height: 23px;
    background: var(--bg-main);
    border: none;
    border-top: 3px solid var(--surface-shadow);
    padding: 3px;
    color: var(--text-main);
}
.input-group input:focus {
    outline: none;
    border-bottom: 1px solid var(--highlight);
}

.scroll-list {
    max-height: 100px;
    overflow-y: auto;
    margin-bottom: 5px;
    border-top: 3px solid var(--surface-shadow);
}

.scroll-list .material-symbols-outlined {
    font-size: 0.7rem;
    vertical-align: -3px;
}

.scroll-list::-webkit-scrollbar {
    width: 10px;
}
.scroll-list::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
.scroll-list::-webkit-scrollbar-thumb {
    background-color: var(--surface-hgt);
    border-bottom: solid 4px var(--surface-hgt-shadow);
    border-top: solid 1px var(--highlight);
    transition: border 0.1s ease;
}
.scroll-list::-webkit-scrollbar-thumb:hover {
    border-bottom: solid 2px var(--surface-hgt-shadow);
}

.rule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2px;
    padding-left: 8px;
    font-size: 12px;
    background: var(--bg-main);
}
.rule-row:hover {
    background: white;
}

.del-btn {
    cursor: pointer;
    font-weight: bold;
    border: none;
    background: none;
}
.del-btn .material-symbols-outlined {
    font-size: 16px;
    color: #ff5050;
    pointer-events: none;
}
.del-btn:hover .material-symbols-outlined {
    transform: translateY(1px);
}

.action-btn {
    width: 100%;
    padding: 0.3rem 0.5rem;
    border: none;
    background: var(--surface-hgt);
    border-bottom: 5px solid var(--surface-hgt-shadow);
    border-top: 1px solid var(--highlight);
    color: var(--surface-dsb);
    text-shadow: 0 0 3px var(--surface-text);
    cursor: pointer;
    font-weight: bold;
    box-shadow:
        3px 3px 0 var(--shading),
        2px 2px 0 var(--shading);
    transition: all 0.2s ease;
    font-family: "Overlock", sans-serif;
}
.action-btn .material-symbols-outlined {
    font-size: 0.8rem;
    color: var(--surface-dsb);
    text-shadow: 0 0 3px var(--surface-text);
}
.action-btn:hover {
    border-bottom: 6px solid var(--surface-hgt-shadow);
    margin-top: -1px;
    box-shadow:
        4px 4px 0 var(--shading),
        2px 2px 0 var(--shading);
}
.action-btn:active {
    border-bottom: 3px solid var(--surface-hgt-shadow);
    box-shadow: 1px 1px 0 var(--shading);
    margin-top: 2px;
}

.preset-link {
    width: 100%;
    background: transparent;
    color: var(--surface-text);
    border: none;
    cursor: pointer;
    font-family: "Overlock", sans-serif;
    text-align: right;
    font-size: 12px;
    padding: 0;
    margin-bottom: 5px;
    display: block;
}
.txtarea {
    padding: 0.5rem;
    width: 100%;
    border: none;
    border-top: 5px solid var(--surface-shadow);
    border-bottom: 1px solid var(--highlight);
    background: var(--surface-dsb);
    color: var(--text-main);
    font-family: inherit;
    outline: 0 solid var(--highlight);
    transition: outline 0.1s ease;
    resize: vertical;
}

.txtarea:focus {
    outline: 2px solid var(--highlight);
}

.addon-card {
    display: flex;
    flex-direction: column;
    background-color: #2b2a33;
    gap: 15px;
    font-family: "segoe UI", Tahoma, Geneva, sans-serif;
}
.addon-top-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.addon-content {
    flex: 1;
    min-width: 0;
}
.addon-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.addon-icon {
    width: 60px;
    height: 60px;
    box-shadow: 3px 3px 0 var(--shading);
    flex-shrink: 0;
}

.addon-info h2 {
    margin: 0;
    font-size: 24px;
    box-shadow: none;
    color: white;
}

.addon-author {
    margin: 2px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    color: #ffe6f0;
}

.addon-description {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: white;
}

.addon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: #0054e6;
    color: white;
    text-decoration: none;
}

.addon-btn:hover {
    background: #003eaa;
}
@media (max-width: 1199px) {
    .addon-card {
        display: flex;
        flex-direction: column;
    }

    .addon-top-row {
        display: contents;
    }

    .addon-header {
        order: 1;
    }

    .addon-description {
        order: 2;
    }

    .addon-btn {
        order: 3;
    }
}
@media (min-width: 1200px) {
    .addon-top-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .addon-btn {
        width: auto;
    }
}