* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --accent: #e74c3c;
    /* Arrow defaults; can be overridden by settings via JS */
    --arrow-angle-deg: 5;
    --arrow-length: 33vw;
    --arrow-slope: 0.087; /* ~tan(5deg) */
    /* Widget placement defaults (overridden from settings) */
    --widget-margin: 18px;
    --widget-height: 58px;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    /* Fallback gradient; JS augments with background image on top */
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 800px;
    width: 100%;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.right-links {
    text-align: right;
}

.language-switcher {
    margin-bottom: 40px;
}

.lang-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    margin: 0 10px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.lang-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.lang-btn.active {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    transform: translateY(-2px);
}

.content {
    margin-bottom: 30px;
}

.main-text {
    margin-bottom: 30px;
    color: #444;
    text-align: left;
}

.main-text p {
    margin-bottom: 20px;
}

.body-text {
    font-size: 20px;
    line-height: 1.2;
    color: #444;
    white-space: pre-line;
    margin-top: 20px;
}

.body-text::before {
    content: "";
    display: block;
    margin-bottom: 10px;
}

.coffee-link {
    color: var(--accent);
    font-weight: bold;
    text-decoration: underline;
    position: relative;
}

/* Simple straight arrow pointing left */
.coffee-link::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: var(--arrow-length, 33vw);
    height: 3px;
    background: var(--accent);
    margin-top: 5px;
    transform: rotate(calc(-1 * var(--arrow-angle-deg, 5) * 1deg));
    transform-origin: right center;
    z-index: 1000;
}

/* Arrow tip on the left */
.coffee-link::before {
    content: '';
    position: absolute;
    top: 100%;
    right: calc(var(--arrow-length, 33vw) - 10px);
    width: 0;
    height: 0;
    border-right: 12px solid var(--accent);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-top: calc(-2px + var(--arrow-length, 33vw) * var(--arrow-slope, 0.087)); /* vertical offset for current angle */
    z-index: 1001;
}

.first-paragraph {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.intro-text {
    font-size: 24px;
    line-height: 1.3;
    color: #444;
    flex: 1;
    min-width: 250px;
    font-weight: 600;
}

.kofi-button {
    flex-shrink: 0;
}

.main-text p:first-child {
    margin-bottom: 30px;
}

.static-image {
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.static-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    display: block;
    background: white;
}

.social-links {
    margin-bottom: 40px;
}

.social-btn {
    display: inline-block;
    width: 60px;
    height: 60px;
    margin: 0 10px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    line-height: 60px;
    font-size: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.social-btn.facebook { background: #3b5998; color: white; }
.social-btn.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
.social-btn.linkedin { background: #0077b5; color: white; }
.social-btn.twitter { background: #1da1f2; color: white; }
.social-btn.github { background: #333; color: white; }
.social-btn.proz { background: #0066cc; color: white; }

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    .lang-btn {
        padding: 12px 20px;
        font-size: 16px;
        margin: 5px;
    }
    
    .intro-text {
        font-size: 20px;
    }
    
    .body-text {
        font-size: 18px;
    }
    
    .first-paragraph {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .social-btn {
        width: 50px;
        height: 50px;
        line-height: 50px;
        font-size: 20px;
        margin: 5px;
    }
}

/* Small version badge */
.version-badge {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -26px; /* sits just below the container */
    z-index: 2;
    font-size: 12px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.3px;
    pointer-events: none;
    user-select: none;
}

/* CSS-only second arrow attached to inner span */
.coffee-link .link-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: var(--arrow-length, 33vw);
    height: 3px;
    background: var(--accent);
    margin-top: 5px;
    transform: rotate(calc(var(--arrow-angle-deg, 5) * 1deg));
    transform-origin: left center;
    z-index: 1000;
}

.coffee-link .link-text::before {
    content: '';
    position: absolute;
    top: calc(100% + var(--arrow-length, 33vw) * var(--arrow-slope, 0.087) - 2px);
    left: calc(var(--arrow-length, 33vw) - 10px);
    width: 0;
    height: 0;
    border-left: 12px solid var(--accent);
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    z-index: 1001;
}

/* PayPal button fixed near bottom-left, offset to the right of Ko-fi bubble */
.paypal-btn {
    position: fixed;
    left: var(--widget-margin, 18px);
    /* place above floating bubbles on bottom edge */
    bottom: calc(var(--widget-margin, 18px) + var(--widget-height, 58px) + 10px);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #0070ba;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    opacity: 0.9;
    transition: all 0.25s ease;
    /* Ensure above third-party floating widgets */
    z-index: 2147483647;
}

.paypal-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.paypal-logo {
    width: 22px;
    height: auto;
}

/* Crypto container and buttons (bottom-right, above right-side widget) */
#crypto-container {
    position: fixed;
    right: var(--widget-margin, 18px);
    bottom: calc(var(--widget-margin, 18px) + var(--widget-height, 58px) + 10px);
    display: flex;
    gap: 10px;
    z-index: 2147483646; /* slightly under PayPal to avoid overlap concerns */
}

.crypto-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #333;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: all 0.25s ease;
    opacity: 0.9;
    cursor: pointer;
}

.crypto-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.crypto-logo {
    width: 20px;
    height: 20px;
}

.tooltip {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    text-align: center;
    width: 150px;
}

.crypto-btn:hover .tooltip {
    display: block;
}

.tooltip img {
    width: 120px;
    height: 120px;
    border-radius: 6px;
}

.address {
    display: block;
    font-size: 12px;
    color: #555;
    margin-top: 6px;
    word-break: break-all;
}

.copy-text {
    font-size: 11px;
    color: #c00;
    margin-top: 4px;
    user-select: none;
}