:root {
    --primary-color: #004B9B;
    --youtube-color: #CD201F;
    --buy-color: #27AE60;
    --discord-color: #7289da;
    --telegram-color: #24A1DE;
    --wechat-color: #07c160;
    --github-color: #24292e;
    --background-color: #121212;
    --text-color: #ffffff;
    --border-color: #333333;
    --item-rounding: 20px;
    --section-rounding: 40px;
    --button-rounding: 10px;
    --section-padding: 20px;
    --brightness-hover: 1.25;
    --scale-hover: 1.025;
    --shadow-size: 0 5px 15px;
    --shadow-opacity: 0.3;
    --shadow-hover-size: 0 7px 20px;
    --shadow-hover-opacity: 0.5;
    --transition-time: 0.3s;
    --transition-function: ease;
    --animation-time-medium: 0.7s;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

a {
    color: var(--text-color);
}

.container {
    width: 80%;
    max-width: 1300px;
    margin: 0 auto;
    margin-bottom: 100px;
}

.container>div:last-child {
    margin-bottom: 0;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.header h1 {
    font-size: 2em;
    margin-left: 15px;
}

.header h1 a {
    color: inherit;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    margin-right: 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 1em;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.nav a:hover {
    transform: scale(1.1);
}

.section {
    border: 1px solid var(--border-color);
    border-radius: var(--section-rounding);
    padding: var(--section-padding);
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.5em;
    margin-bottom: 20px;
    margin-left: 10px;
    padding: 0;
    display: inline-block;
    margin-top: 0;
}

.success-section h2 {
    color: var(--buy-color);
}

.success-section {
    border-color: rgba(39, 174, 96, 0.3);
}

.error-section h2 {
    color: #dc3545;
}

.error-section {
    border-color: rgba(220, 53, 69, 0.3);
}

.section>p,
.section>h3,
.section>ul {
    margin-left: 10px;
}

.section .product {
    margin-bottom: 20px;
}

.section .product:last-child {
    margin-bottom: 0;
}

.product {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: var(--item-rounding);
    padding: 0;
    height: auto;
}

.product-content {
    display: flex;
    flex-grow: 1;
}

.product img {
    width: 255px;
    height: 100%;
    border-right: 1px solid var(--border-color);
    object-fit: cover;
    border-top-left-radius: var(--item-rounding);
    border-bottom-left-radius: var(--item-rounding);
    box-sizing: border-box;
}

.product img.rounded-bottom-right {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: var(--item-rounding);
    border-bottom: 1px solid var(--border-color);
}

h3 {
    font-size: 1.5em;
    margin: 0;
    margin-top: -5px;
    padding: 0;
}

p,
li {
    font-size: 1.25rem;
    font-weight: 300;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.product-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.product-details-no-header {
    margin-top: -20px;
}





.product-details-no-header p {
    font-size: 1.25rem;
    font-weight: 300;
    margin-top: 1em;
    margin-bottom: 1em;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 20px;
}

.buttons a {
    transition: filter 0.3s ease, transform 0.3s ease;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 6px 11px 8px 11px;
    border-radius: var(--button-rounding);
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-size) rgba(0, 0, 0, var(--shadow-opacity));
}


.buttons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--animation-time-medium) var(--transition-function);
    opacity: 0;
}

.buttons a:hover::before {
    left: 100%;
    opacity: 1;
}

.buttons a.youtube-button {
    background-color: var(--youtube-color);
}

.buttons a.buy-button {
    background-color: var(--buy-color);
}

.buttons a.discord-button {
    background-color: var(--discord-color);
}

.buttons a.telegram-button {
    background-color: var(--telegram-color);
}

.buttons a.github-button {
    background-color: var(--github-color);
}

.buttons a:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
    box-shadow: var(--shadow-hover-size) rgba(0, 0, 0, var(--shadow-hover-opacity));
}

.footer {
    color: var(--text-color);
    text-align: center;
    margin-bottom: 100px;
}

.footer p {
    margin: 0;
}

.footer a {
    color: white;
}

@media (max-width: 860px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        margin-bottom: 30px;
        margin-top: -10px;
        margin-left: 10px;
        width: 100%;
        display: flex;
        justify-content: flex-start;
    }

    .container {
        width: 90%;
    }

    .product-content {
        flex-direction: column;
    }

    .product img {
        width: 100%;
        height: auto;
        border-radius: var(--item-rounding) var(--item-rounding) 0 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .product img.rounded-mobile {
        border-top-left-radius: var(--item-rounding);
        border-top-right-radius: var(--item-rounding);
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
}

.changelog {
    margin-bottom: -20px;
    margin-top: 20px;
    position: relative;
}

.changelog ul {
    list-style-type: disc;
    padding-left: 20px;
}

.changelog p {
    margin-top: 0;
    margin-bottom: 0;
}

.hidden {
    display: none;
}

.changelog-entry {
    border: 1px solid var(--border-color);
    border-radius: var(--item-rounding);
    padding: 20px;
    margin-bottom: 20px;
}


.changelog-entry.v0 {
    border-color: #333333;
}

.changelog-entry.v1 {
    border-color: #333333;
}

.changelog-entry.v2 {
    border-color: #333333;
}

.buttons a.changelog-button {
    display: inline-flex;
}

.close-changelog {
    margin-left: 10px;
    cursor: pointer;
    color: var(--text-color);
}

.hidden {
    display: none;
}

.changelog-button .close-changelog {
    display: none;
}

.changelog-button.open .close-changelog {
    display: inline;
}

.buttons a.wechat-button {
    background-color: var(--wechat-color);
}


.wechat-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

.wechat-modal.shown {
    display: block;
}

.wechat-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}

.wechat-modal__content {
    position: relative;
    max-width: 340px;
    margin: 5% auto;
    background: #1b1b1b;
    border: 1px solid var(--border-color);
    border-radius: var(--item-rounding);
    padding: 15px 15px 15px 15px;
    text-align: center;
    color: var(--text-color);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.wechat-modal__close {
    position: absolute;
    right: 15px;
    top: 15px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.wechat-modal__content h3 {
    margin-top: 0;
    font-size: 1.2rem;
}

.wechat-modal__img {
    width: 90%;
    object-fit: contain;
}

.wechat-modal__hint {
    font-size: 0.9rem;
    color: #ccc;
    margin: 15px 0 0 0;
}

@media (max-width: 500px) {
    .wechat-modal__content {
        margin: 50px 16px;
        max-width: none;
    }
}

/* ========================================
   Result Panels (Success / Error)
   ======================================== */

.result-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--item-rounding);
    padding: 20px;
    background-color: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.result-panel .panel-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.result-panel .panel-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.result-panel .panel-title {
    flex: 1;
}

.result-panel .panel-title h2 {
    margin: 0 0 5px 0;
    font-size: 1.5em;
    font-weight: 700;
}

.result-panel .panel-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
    font-weight: 400;
}

.result-panel .panel-content {
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-panel .panel-content p {
    margin: 0 0 10px 0;
}

.result-panel .panel-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.result-panel .panel-actions .btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--button-rounding);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.result-panel .panel-actions .btn:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

.result-panel .panel-actions .btn-primary {
    background-color: var(--buy-color);
    color: white;
}

.result-panel .panel-actions .btn-secondary {
    background: var(--primary-color);
    color: white;
}

.result-panel .panel-actions .buy-button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--button-rounding);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: filter 0.3s ease, transform 0.3s ease;
    cursor: pointer;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: var(--buy-color);
    color: white;
}

.result-panel .panel-actions .buy-button:hover {
    filter: brightness(var(--brightness-hover));
    transform: scale(var(--scale-hover));
}

/* Success Panel */
.success-panel {
    border-color: rgba(39, 174, 96, 0.3);
}

.success-panel .panel-title h2 {
    color: var(--buy-color);
}

.success-panel .panel-icon.success-icon {
    background: linear-gradient(135deg, #10a37f, #1ec99a);
    color: white;
}

/* Error Panel */
.error-panel {
    border-color: rgba(220, 53, 69, 0.3);
}

.error-panel .panel-title h2 {
    color: #dc3545;
}

.error-panel .panel-icon.error-icon {
    background: linear-gradient(135deg, #dc3545, #ff6b6b);
    color: white;
}

/* ========================================
   Receipt Card (for Stripe success page)
   ======================================== */

.receipt-card {
    border: 1px solid var(--border-color);
    border-radius: var(--item-rounding);
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

/* Відступи у панелях */
.result-panel> :first-child {
    margin-top: -5px;
}

.result-panel .buttons {
    margin-bottom: 0px;
}

.receipt-card .receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.receipt-card .receipt-header-left h3 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 400;
    color: #888;
}

.receipt-card .receipt-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 5px 0;
}

.receipt-card .receipt-date {
    color: #888;
    font-size: 0.9rem;
    margin: 0;
}

.receipt-card .receipt-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #888;
}

.receipt-card .receipt-actions {
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.receipt-card .receipt-actions a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.receipt-card .receipt-actions a:hover {
    opacity: 0.7;
}

.receipt-card .receipt-actions .download-icon {
    font-size: 1.1em;
}

.receipt-card .receipt-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.receipt-card .receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.receipt-card .receipt-label {
    color: #888;
    font-size: 0.95rem;
}

.receipt-card .receipt-value {
    font-weight: 500;
    font-size: 0.95rem;
}

.receipt-card .receipt-value .payment-brand {
    font-weight: 700;
    margin-right: 5px;
}