*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
}

body {
    --bg-body: radial-gradient(circle at top, #141414 0, #050505 45%, #000000 100%);
    --text-color: #ffffff;
    --surface-main: rgba(14, 14, 14, 0.9);
    --surface-border: rgba(255, 255, 255, 0.06);
    --muted-text: #f1f1f1;
    --footer-text: #d0d0d0;
    --row-bg: rgba(18, 18, 18, 0.96);
    --row-border: rgba(255, 255, 255, 0.08);
    --badge-nl: #4169e1;
    --badge-fat: #c21750;

    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-body);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    opacity: 0;
}

body[data-theme="light"] {
    --bg-body: radial-gradient(circle at top, #d0d0d0 0, #b5b5b5 40%, #868686 100%);
    --text-color: #050505;
    --surface-main: rgba(244, 244, 244, 0.96);
    --surface-border: transparent;
    --muted-text: #050505;
    --footer-text: #333333;
    --row-bg: rgba(246, 246, 246, 0.98);
    --row-border: rgba(0, 0, 0, 0.16);
}

body.loaded {
    opacity: 1;
    transition: opacity 0.7s ease, background 0.4s ease;
}

body.page-leave {
    opacity: 0;
    transition: opacity 0.35s ease, background 0.4s ease;
}

.page-wrapper {
    width: 100%;
    max-width: 820px;
    backdrop-filter: blur(22px);
    background: var(--surface-main);
    border-radius: 26px;
    padding: 30px 28px 20px;
    box-shadow:
        0 26px 70px rgba(0, 0, 0, 0.9),
        0 0 0 1px var(--surface-border);
    display: flex;
    flex-direction: column;
    gap: 26px;
    position: relative;
    transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

body[data-theme="light"] .page-wrapper {
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55);
}

.theme-toggle {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(0, 0, 0, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.2s ease;
}

body[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.15);
}

.theme-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.7);
    background: rgba(255, 255, 255, 0.12);
}

body[data-theme="light"] .theme-toggle:hover {
    background: rgba(255, 255, 255, 1);
}

.theme-toggle:active {
    transform: translateY(0);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.75);
}

.theme-icon {
    width: 18px;
    height: 18px;
    display: block;
}

.theme-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: #ffffff;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-moon svg {
    fill: #ffffff;
    stroke: none;
}

.icon-moon,
.icon-sun {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

body[data-theme="dark"] .icon-moon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

body[data-theme="dark"] .icon-sun {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

body[data-theme="light"] .icon-moon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

body[data-theme="light"] .icon-sun {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

body[data-theme="light"] .theme-icon svg {
    stroke: #111111;
}

.content {
    text-align: center;
}

.logo {
    width: 152px;
    height: 152px;
    object-fit: contain;
    margin: 0 auto 18px;
    display: block;
    transition: transform 0.2s ease;
}

.logo:hover {
    transform: translateY(-1px);
}

.title {
    font-size: clamp(22px, 2.9vw, 26px);
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.configs-section {
    margin-bottom: 10px;
    text-align: left;
}

.section-heading {
    font-size: 13px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.configs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 999px;
    background: var(--row-bg);
    border: 1px solid var(--row-border);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.85);
}

/* unified row shadow for both themes */

.config-main {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
    width: 88px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffffff;
    text-align: center;
}

.badge-neverlose {
    background-color: var(--badge-nl);
}

.badge-fatality {
    background-color: var(--badge-fat);
}

.config-name {
    font-size: 13px;
    font-weight: 500;
}

.config-button {
    padding: 8px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #d7d7d7);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #000000;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    box-shadow: none;
    transition:
        transform 0.16s ease,
        background 0.16s ease,
        opacity 0.16s ease,
        border-color 0.16s ease;
}

.config-button:hover {
    transform: translateY(-2px);
}

.config-button:active {
    transform: translateY(0);
    opacity: 0.9;
}

body[data-theme="light"] .config-button {
    background: linear-gradient(135deg, #fdfdfd, #e3e3e3);
}


.configs-back-btn {
    margin: 8px auto 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #d7d7d7);
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #000000;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.9);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.configs-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 52px rgba(0, 0, 0, 1);
    border-color: rgba(0, 0, 0, 0.24);
}

.configs-back-btn:active {
    transform: translateY(-1px);
    opacity: 0.96;
}

body[data-theme="light"] .configs-back-btn,
body[data-theme="light"] .configs-back-btn:hover,
body[data-theme="light"] .configs-back-btn:active {
    background: linear-gradient(135deg, #fdfdfd, #e3e3e3);
    box-shadow: none;
}

.footer {
    margin-top: 6px;
    text-align: center;
    font-size: 12px;
    color: var(--footer-text);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 6px;
}

body[data-theme="light"] .footer {
    border-top-color: rgba(0, 0, 0, 0.08);
}

.footer .heart {
    display: inline-block;
    animation: heartBeat 1.8s ease-in-out infinite;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    20% { transform: scale(1.12); }
    40% { transform: scale(0.96); }
    60% { transform: scale(1.08); }
    80% { transform: scale(0.98); }
}

@media (max-width: 640px) {
    .page-wrapper {
        padding: 22px 16px 16px;
        border-radius: 20px;
    }

    .logo {
        width: 120px;
        height: 120px;
    }

    /* Mobile: stack rows and center content */
    .config-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .config-main {
        width: 100%;
        justify-content: center;
    }

    .config-name {
        width: 100%;
        text-align: center;
    }

    .config-button {
        align-self: center;
    }
}


/* Extra spacing between Neverlose.cc and Fatality.win blocks */
.configs-section + .configs-section {
    margin-top: 20px;
}


/* Light theme: rows without drop shadow */
body[data-theme="light"] .config-row {
    box-shadow: none;
}


/* Лёгкая светлая обводка кнопки на тёмной теме */
body[data-theme="dark"] .config-button {
    border-color: rgba(255, 255, 255, 0.22);
}


/* Без тени у плашек на светлой теме */
body[data-theme="light"] .config-row {
    box-shadow: none;
}


/* Обводка основной плашки (контейнера) */
body[data-theme="dark"] .page-wrapper {
    border: 1px solid rgba(255, 255, 255, 0.10);
}

body[data-theme="light"] .page-wrapper {
    border: 1px solid rgba(0, 0, 0, 0.08);
}


@media (max-width: 480px) {
    body {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 32px 12px 24px;
    }

    .badge {
        display: none;
    }

    .page-wrapper {
        padding: 22px 14px 16px;
        border-radius: 18px;
    }

    .logo {
        width: 110px;
        height: 110px;
        margin-bottom: 10px;
    }

    .title {
        font-size: 22px;
        letter-spacing: 0.14em;
    }

    .config-row {
        padding: 10px 14px;
        gap: 10px;
        align-items: center; /* центрируем содержимое строки */
    }

    .config-main {
        width: 100%;
        justify-content: flex-start;
    }

    .config-link {
        font-size: 12px;
    }

    .config-get {
        padding: 8px 16px;
        font-size: 12px;
    }

    .config-button {
        align-self: center;      /* кнопка по центру */
        margin-top: 6px;
    }

    .footer {
        font-size: 11px;
    }
}

    .logo {
        width: 110px;
        height: 110px;
        margin-bottom: 10px;
    }

    .title {
        font-size: 22px;
        letter-spacing: 0.14em;
    }

    .config-row {
        padding: 10px 14px;
        gap: 10px;
    }

    .config-title {
        font-size: 13px;
    }

    .config-link {
        font-size: 12px;
    }

    .config-get {
        padding: 8px 16px;
        font-size: 12px;
    }

    .footer {
        font-size: 11px;
    }
}
