html {
    scroll-behavior: smooth;
}

body {
    width: 100%;
    margin: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1a2744 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

.loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 20px;
}

.loader>* {
    margin: 0.4em 0;
}

main {
    padding: 20px;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.5px;
}

h1 {
    font-size: 1.8rem;
    margin: 0.2em 0 0.3em 0;
    color: #fff;
    font-weight: 700;
}

h1 b {
    background: linear-gradient(135deg, #5335CC 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section {
    text-align: center;
    margin-bottom: 1.5em;
    padding-bottom: 1em;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

h2 {
    font-size: 0.95rem;
    margin: 0.3em 0 0.5em 0;
    color: #cbd5e1;
    font-weight: 400;
    letter-spacing: 0;
}

h3 {
    font-size: 1rem;
    margin: 0 0 0.5em 0;
    color: #e2e8f0;
    font-weight: 600;
}

section {
    margin: 1em 0;
    padding: 1em 0;
    border-bottom: 1px solid rgba(100, 116, 139, 0.15);
}

section:last-of-type {
    border-bottom: none;
}

footer {
    margin-top: 1.5em;
    padding-top: 1em;
    padding-bottom: 1em;
    border-top: 1px solid rgba(100, 116, 139, 0.2);
    text-align: center;
}

footer nav {
    margin-top: 0.5em;
}

footer p {
    margin: 0.3em 0;
    font-size: 0.9em;
}

p {
    margin: 0.5em 0;
    color: #cbd5e1;
    line-height: 1.5;
    font-size: 0.9em;
}

code {
    background-color: rgba(51, 65, 85, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    color: #a8dadc;
    font-size: 0.9em;
}

.input-label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.95em;
}

.loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.loader>* {
    margin: 0.5em 0;
}

input[type='text'] {
    padding: 8px 12px;
    border: 1px solid rgba(100, 116, 139, 0.4);
    border-radius: 4px;
    font-size: 0.9em;
    background-color: rgba(51, 65, 85, 0.6);
    color: #f1f5f9;
    width: 100%;
    max-width: 250px;
    box-sizing: border-box;
    transition: all 0.15s ease;
    font-family: inherit;
}

input[type='text']:focus {
    outline: none;
    border-color: #5335CC;
    background-color: rgba(51, 65, 85, 0.8);
}

input[type='text']::placeholder {
    color: #94a3b8;
}

button {
    padding: 8px 16px;
    border: 1px solid #5335CC;
    border-radius: 4px;
    background: #5335CC;
    color: white;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
}

button:hover {
    background: #6842d6;
    border-color: #6842d6;
}

button:active {
    background: #4527b3;
}

button:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.css-inwm4l,
.css-13yk3gq,
#qr-modal-toggle-button,
a[target="_blank"] {
    display: none !important;
}

#gameInput {
    display: none !important;
}

#gameInput.active {
    display: block !important;
}

a {
    color: #a78bfa;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s ease;
}

a:hover {
    color: #d8b4fe;
    text-decoration: none;
}

a:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
    border-radius: 2px;
}

a[rel="noopener noreferrer"]:after {
    margin-left: 4px;
}

#recommendationsPopup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #334155;
    color: white;
    padding: 20px;
    border-radius: 0.5em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    width: 80%;
    max-width: 600px;
}

#recommendationsPopup h2 {
    margin-top: 0;
}

#recommendationsPopup ul {
    list-style-type: none;
    padding: 0;
}

#recommendationsPopup li {
    margin-bottom: 0.5em;
}

#recommendationsPopup a {
    color: #a993ff;
    text-decoration: none;
}

#recommendationsPopup a:hover {
    text-decoration: underline;
}

#recommendationsPopup.active {
    display: block;
}

.bookmarklet-button {
    display: inline-block;
    padding: 8px 16px;
    background: #5335CC;
    color: white;
    font-size: 0.95em;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    cursor: grab;
    transition: all 0.15s ease;
    user-select: none;
    border: 1px solid #5335CC;
    margin: 0.5em 0;
}

.bookmarklet-button:hover {
    background: #6842d6;
    border-color: #6842d6;
}

.bookmarklet-button:active {
    cursor: grabbing;
    background: #4527b3;
}

.bookmarklet-button:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

#cookieConsentBanner {
    display: none;
    /* Initially hidden by JavaScript if cookie exists */
    position: fixed;
    bottom: 15px;
    /* Elevate slightly from the absolute bottom */
    left: 50%;
    /* Center horizontally */
    width: 90%;
    /* Don't take full width on larger screens */
    max-width: 550px;
    /* Max width for the banner */
    background-color: #2d3748;
    /* Dark bluish-gray, or your preferred dark gray */
    color: #e2e8f0;
    /* Light gray text for readability */
    padding: 18px 25px;
    border-radius: 8px;
    /* Rounded corners */
    z-index: 100000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* Softer shadow */
    text-align: left;
    /* Align text to the left for a cleaner look in a smaller box */
    font-family: 'Arial', sans-serif;
    /* Or your site's font */
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
}

#cookieConsentBanner p {
    margin: 0 0 15px 0;
    /* Paragraph bottom margin */
    font-size: 13.5px;
    /* Slightly smaller text for the paragraph */
}

#cookieConsentBanner a {
    color: #a3bffa;
    /* A lighter, accessible blue for links on dark bg */
    text-decoration: underline;
    font-weight: normal;
    /* Normal weight for links in paragraph */
}

#cookieConsentBanner a:hover {
    color: #c3daff;
}

.cookie-buttons-container {
    /* Flex container for buttons */
    display: flex;
    justify-content: flex-end;
    /* Align buttons to the right */
    gap: 10px;
    /* Space between buttons */
    margin-top: 10px;
}

#cookieConsentBanner button {
    background-color: #5335CC;
    /* YOUR PRIMARY PURPLE */
    color: white;
    border: none;
    padding: 8px 16px;
    /* Smaller padding for smaller buttons */
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    /* Smaller font for buttons */
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 100px;
    /* Minimum width for buttons */
    text-align: center;
}

#cookieConsentBanner button:hover {
    background-color: #5737d9;
    /* Darker shade of purple on hover */
    transform: translateY(-1px);
    /* Slight lift on hover */
}

/* "Decline" or "Essentials" button - more subtle */
#cookieConsentBanner button#cookieDeclineButton {
    background-color: #4a5568;
    /* A medium gray */
    color: #e2e8f0;
    /* Light gray text */
}

#cookieConsentBanner button#cookieDeclineButton:hover {
    background-color: #718096;
    /* Lighter gray on hover */
}

/* Adjust body padding when banner is visible */
/* The height of this banner will be less, so padding can be smaller */
body.cookie-banner-visible {
    /* Calculate based on banner height + bottom offset + some leeway */
    /* Approx: 18+13.5 (font-size*line-height) + 15 + 10 + 35 (button height) + 18 + 15 = ~115px */
    padding-bottom: 120px;
    /* Adjust as needed */
}

/* Responsive adjustments for very small screens */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    main {
        padding: 30px 16px;
    }

    .loader {
        padding: 30px 16px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1rem;
    }

    h3 {
        font-size: 1rem;
    }

    section {
        padding: 1.5em 0;
        margin: 1.5em 0;
    }

    #cookieConsentBanner {
        width: 95%;
        bottom: 10px;
        padding: 15px;
    }

    #cookieConsentBanner p {
        font-size: 13px;
    }

    .cookie-buttons-container {
        flex-direction: column;
        align-items: stretch;
    }

    #cookieConsentBanner button {
        width: 100%;
        margin: 5px 0;
        font-size: 14px;
        padding: 10px 15px;
    }

    body.cookie-banner-visible {
        padding-bottom: 180px;
    }
}

palmframe-widget {
    color-scheme: dark;
    --pf-background: rgba(15, 23, 42, 0.96);
    --pf-foreground: #f1f5f9;
    --pf-primary: #5335cc;
    --pf-primary-foreground: #ffffff;
    --pf-primary-hover: #6842d6;
    --pf-muted: rgba(51, 65, 85, 0.92);
    --pf-muted-foreground: #cbd5e1;
    --pf-accent: rgba(83, 53, 204, 0.14);
    --pf-border: rgba(167, 139, 250, 0.24);
    --pf-input: rgba(100, 116, 139, 0.45);
    --pf-ring: #a78bfa;
    --pf-ring-shadow: rgba(167, 139, 250, 0.28);
    --pf-link: #a78bfa;
    --pf-link-hover: #d8b4fe;
    --pf-sentiment-hate: #60a5fa;
    --pf-sentiment-love: #fbbf24;
    --pf-backdrop: rgba(2, 6, 23, 0.72);
    --pf-shadow: 0 -24px 60px rgba(2, 6, 23, 0.5);
    --pf-radius: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

palmframe-widget,
palmframe-widget * {
    box-sizing: border-box;
}

palmframe-widget .pf-trigger {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2147483646;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pf-border);
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%);
    color: var(--pf-foreground);
    box-shadow: 0 16px 40px rgba(2, 6, 23, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

palmframe-widget[position="bottom-left"] .pf-trigger {
    right: auto;
    left: 20px;
}

palmframe-widget[position="top-right"] .pf-trigger {
    top: 20px;
    bottom: auto;
}

palmframe-widget[position="top-left"] .pf-trigger {
    top: 20px;
    bottom: auto;
    right: auto;
    left: 20px;
}

palmframe-widget .pf-trigger:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(83, 53, 204, 0.24) 0%, rgba(30, 41, 59, 0.98) 100%);
    border-color: rgba(167, 139, 250, 0.42);
}

palmframe-widget .pf-trigger:focus {
    outline: 2px solid var(--pf-ring);
    outline-offset: 2px;
}

palmframe-widget .pf-trigger-tooltip {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    padding: 6px 9px;
    border: 1px solid var(--pf-border);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.98);
    color: var(--pf-foreground);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

palmframe-widget[position="bottom-left"] .pf-trigger-tooltip,
palmframe-widget[position="top-left"] .pf-trigger-tooltip {
    right: auto;
    left: 0;
}

palmframe-widget[position="top-right"] .pf-trigger-tooltip,
palmframe-widget[position="top-left"] .pf-trigger-tooltip {
    top: calc(100% + 10px);
    bottom: auto;
}

palmframe-widget .pf-trigger:hover .pf-trigger-tooltip {
    opacity: 1;
    transform: translateY(0);
}

palmframe-widget .pf-menu-backdrop,
palmframe-widget .pf-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
}

palmframe-widget .pf-menu-backdrop {
    display: none;
}

palmframe-widget .pf-menu-backdrop.pf-menu-open {
    display: block;
}

palmframe-widget .pf-backdrop {
    background: var(--pf-backdrop);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

palmframe-widget .pf-backdrop.pf-open {
    opacity: 1;
    pointer-events: auto;
}

palmframe-widget .pf-menu,
palmframe-widget .pf-popover {
    background: var(--pf-background);
    border: 1px solid var(--pf-border);
    box-shadow: var(--pf-shadow);
}

palmframe-widget .pf-menu {
    position: fixed;
    right: 20px;
    bottom: 76px;
    z-index: 2147483647;
    min-width: 200px;
    padding: 6px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

palmframe-widget[position="bottom-left"] .pf-menu {
    right: auto;
    left: 20px;
}

palmframe-widget[position="top-right"] .pf-menu {
    top: 76px;
    bottom: auto;
}

palmframe-widget[position="top-left"] .pf-menu {
    top: 76px;
    bottom: auto;
    right: auto;
    left: 20px;
}

palmframe-widget .pf-menu.pf-menu-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

palmframe-widget .pf-menu-item,
palmframe-widget .pf-menu-item[target="_blank"] {
    display: flex !important;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--pf-foreground);
    font: inherit;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

palmframe-widget .pf-menu-item:hover {
    background: rgba(83, 53, 204, 0.12);
    border-color: rgba(167, 139, 250, 0.18);
}

palmframe-widget .pf-menu-item svg {
    flex-shrink: 0;
    color: var(--pf-muted-foreground);
}

palmframe-widget .pf-menu-separator {
    height: 1px;
    margin: 4px 6px;
    background: rgba(100, 116, 139, 0.2);
}

palmframe-widget .pf-popover {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2147483647;
    width: min(520px, calc(100vw - 24px));
    margin: 0 auto;
    overflow: hidden;
    border-bottom: none;
    border-radius: 14px 14px 0 0;
    transform: translateY(105%);
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    backdrop-filter: blur(12px);
}

palmframe-widget .pf-popover.pf-open {
    transform: translateY(0);
}

palmframe-widget .pf-handle {
    width: 42px;
    height: 4px;
    margin: 10px auto;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.55);
}

palmframe-widget .pf-body {
    padding: 0 16px 10px;
}

palmframe-widget .pf-textarea {
    width: 100%;
    min-height: 108px;
    padding: 10px 12px;
    border: 1px solid var(--pf-input);
    border-radius: 4px;
    background: rgba(30, 41, 59, 0.72);
    color: var(--pf-foreground);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: none;
}

palmframe-widget .pf-textarea::placeholder {
    color: #94a3b8;
}

palmframe-widget .pf-textarea:focus {
    outline: none;
    border-color: var(--pf-ring);
    box-shadow: 0 0 0 3px var(--pf-ring-shadow);
    background: rgba(30, 41, 59, 0.92);
}

palmframe-widget .pf-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 16px 16px;
}

palmframe-widget .pf-sentiments {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

palmframe-widget .pf-sentiment-btn {
    position: relative;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--pf-muted-foreground);
}

palmframe-widget .pf-sentiment-btn:hover {
    background: rgba(83, 53, 204, 0.12);
    border-color: rgba(167, 139, 250, 0.18);
    color: var(--pf-foreground);
}

palmframe-widget .pf-sentiment-btn.pf-selected {
    background: rgba(83, 53, 204, 0.2);
    border-color: rgba(167, 139, 250, 0.3);
    color: var(--pf-foreground);
}

palmframe-widget .pf-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    padding: 5px 7px;
    border: 1px solid var(--pf-border);
    border-radius: 4px;
    background: rgba(15, 23, 42, 0.98);
    color: var(--pf-foreground);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

palmframe-widget .pf-sentiment-btn:hover .pf-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

palmframe-widget .pf-send-btn {
    min-width: 88px;
    padding: 8px 16px;
    border: 1px solid #5335CC;
    border-radius: 4px;
    background: #5335CC;
    color: #ffffff;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

palmframe-widget .pf-send-btn:hover {
    background: #6842d6;
    border-color: #6842d6;
}

palmframe-widget .pf-send-btn:focus {
    outline: 2px solid #a78bfa;
    outline-offset: 2px;
}

palmframe-widget .pf-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

palmframe-widget .pf-success {
    padding: 36px 16px;
    color: var(--pf-foreground);
    text-align: center;
    font-size: 0.95rem;
}

palmframe-widget .pf-success-icon {
    margin-bottom: 10px;
    font-size: 24px;
    color: #a78bfa;
}

@media (max-width: 600px) {
    palmframe-widget .pf-trigger {
        right: 14px;
        bottom: 14px;
    }

    palmframe-widget[position="bottom-left"] .pf-trigger,
    palmframe-widget[position="top-left"] .pf-trigger {
        left: 14px;
    }

    palmframe-widget[position="top-right"] .pf-trigger,
    palmframe-widget[position="top-left"] .pf-trigger {
        top: 14px;
    }

    palmframe-widget .pf-menu {
        right: 14px;
        bottom: 70px;
        left: 14px;
        min-width: 0;
    }

    palmframe-widget[position="bottom-left"] .pf-menu,
    palmframe-widget[position="top-left"] .pf-menu,
    palmframe-widget[position="top-right"] .pf-menu {
        left: 14px;
        right: 14px;
    }

    palmframe-widget[position="top-right"] .pf-menu,
    palmframe-widget[position="top-left"] .pf-menu {
        top: 70px;
        bottom: auto;
    }

    palmframe-widget .pf-popover {
        width: calc(100vw - 12px);
    }

    palmframe-widget .pf-footer {
        align-items: stretch;
    }

    palmframe-widget .pf-send-btn {
        width: 100%;
    }
}