:root {
    --main-color: #FF8C00;
    --secondary-color: #ff5100;
    --accent-color: #FFD700;
    --bright-red: #ff0000;
    --grey: #666666;
    --brown: #3e1f16;
    --dark-color: rgba(0, 0, 0, 0.8);
    --active-bg: #332d00; /* A dark gold tint for the highlighted background */
    --comic-font: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
}

body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: white;
    background-color: #ff5100;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)),
        radial-gradient(at 100% 100%, #FFD700 0px, transparent 70%),
        radial-gradient(at 0% 0%, #FF8C00 0px, transparent 70%),
        radial-gradient(at 100% 0%, #ff0000 0px, transparent 70%),
        radial-gradient(at 0% 100%, #ff5100 0px, transparent 70%);
    background-attachment: fixed;
    overflow-x: hidden;
}

.loading-locked {
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

.main-content {
    padding: 0 20px;
}

/* Navbar Base Styles */
.top-bar {
    background: linear-gradient(to bottom,
            rgba(180, 50, 0, 0.9) 0%,
            rgba(150, 40, 0, 0.6) 100%,
            rgba(0, 0, 0, 0) 100%
        );

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* For Safari support */

    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
}

.creator-group {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-self: start;

    height: 40px;
    padding: 0 16px;

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.creator-group span {
    font-family: var(--comic-font);
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
}

.social-btn:hover {
    transform: scale(1.2) translateY(-2px);
    background: var(--accent-color);
    box-shadow: 0 0 12px var(--accent-color);
}

.icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.social-btn:hover .icon {
    filter: brightness(0) sepia(1) hue-rotate(-20deg) saturate(5);
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 20px;
    white-space: nowrap;
    text-decoration: none;

    font-family: var(--comic-font);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);

    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;

    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.home-button:hover {
    transform: translateY(-2px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.home-button:active {
    transform: scale(0.95);
}

.top-bar-btn {
    font-family: var(--comic-font);
    display: inline-flex;
    align-items: center;
    justify-content: center;

    height: 40px;
    padding: 0 20px;

    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;

    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;

    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.top-bar-btn:hover {
    background: var(--accent-color);
    color: var(--brown);
    transform: translateY(-3px) scale(1.05);
    border-color: transparent;
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.top-bar-btn:active {
    transform: scale(0.95);
}

.top-bar-btn-group {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    /* Ensure it's above everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    /* Deeper blur for focus */
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Modal Box */
.modal-content {
    background: linear-gradient(135deg,
            rgba(30, 30, 30, 0.9) 0%,
            rgba(15, 15, 15, 0.95) 100%);
    margin: 10% auto;
    padding: 30px;
    /* Soft glowing border instead of solid line */
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 24px;
    width: 90%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.2s;
}

.close-modal:hover {
    color: var(--bright-red);
}

.twitter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #1DA1F2;;
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 50px;
    margin: 25px 0;
    font-weight: 500;
    font-family: var(--comic-font);
    transition: transform 0.2s, box-shadow 0.2s;
}

.twitter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
}

/* Link Box */
.link-container {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#shareLinkInput {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: #fff;
    padding: 0 20px;
    font-family: monospace;
    font-size: 0.9rem;
    outline: none;
    width: 100%;
}

#modalCopyBtn {
    background: var(--accent-color);
    color: var(--brown);
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--comic-font);
    transition: all 0.2s;
}

#modalCopyBtn:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}

.share-btn {
    position: relative;
    z-index: 10;

    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;

    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 50px;

    color: var(--accent-color);
    font-family: var(--comic-font);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;

    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.share-btn:hover {
    background: var(--accent-color);
    color: var(--brown);
    transform: translateY(-2px) scale(1.05);

    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
    border-color: transparent;
}

.share-btn:active {
    transform: scale(0.95);
}

#scroll-sentinel {
    height: 20px;
}

#loading-spinner {
    display: none;
    color: var(--accent-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    text-align: center;
    font-family: var(--comic-font);
}

#page-end {
    color: white;
    font-size: 1.6rem;
    margin: 0;
    padding: 20px;
}

.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    margin: 0 auto 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}