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;
    }
}