/* --- START OF FILE style.css (Complete and Corrected) --- */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;700&display=swap');

:root {
    --bg-gradient: linear-gradient(135deg, #ffd7f1, #fde5f4);
    --text-color: #333;
    --nav-text-color: #555;
    --nav-hover-bg: #fca5f1;
    --nav-hover-text: white;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --danger-color: #e74c3c;
    --danger-hover-color: #c0392b;
    --card-bg: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 1.0);
    --title-pill-bg: rgba(255, 255, 255, 0.8);
    --title-pill-text: #c74da8;
    --shoutout-highlight: rgba(255, 255, 255, 0.7);
    --shoutout-lowlight: rgba(50, 50, 50, 0.25);
    --completed-color: #008844;
}

body.dark-mode {
    --bg-gradient: linear-gradient(135deg, #1b0e27, #20092b);
    --text-color: #e6ddeb;
    --nav-text-color: #c9bacc;
    --nav-hover-bg: #9146FF;
    --nav-hover-text: #fff;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --danger-color: #ff6b6b;
    --danger-hover-color: #e43d3d;
    --card-bg: rgba(40, 20, 60, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --title-pill-bg: rgba(0, 0, 0, 0.2);
    --title-pill-text: #e6ddeb;
    --shoutout-highlight: rgba(0, 0, 0, 0.25);
    --shoutout-lowlight: rgba(255, 255, 255, 0.15);
    --completed-color: #00ff80;
}

body.obs-mode {
    background: transparent !important;
    margin: 0;
    padding: 0;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.obs-mode #obsCanvas {
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 100%;
    max-height: 100%;
}

.admin-only {
    display: none;
}

#app-wrapper {
    width: 100%;
    overflow-x: clip;
    min-width: 360px;
}

body {
    font-family: 'Nunito', sans-serif;
    text-align: center;
    margin: 0;
    padding: 20px 0;
    background: var(--bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    box-sizing: border-box;
    transition: background 0.3s ease, color 0.3s ease;
}

#nav-placeholder {
    width: 100%;
    margin: 0 auto 30px;
    padding: 0 20px;
    box-sizing: border-box;
    max-width: 1400px;
}

header {
    width: 100%; 
    max-width: 1400px;
    background: var(--card-bg);
    padding: 10px 20px; 
    border-radius: 50px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    transition: background 0.3s ease;
    flex-shrink: 0;
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.nav-right-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    background: none;
    border: 2px solid var(--nav-text-color);
    color: var(--nav-text-color);
    padding: 0.5em 1.1em;
    font-size: 1em;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
}

.dropdown-button:hover {
    background-color: var(--nav-text-color);
    color: var(--header-bg);
}

.dropdown-menu {
    display: none;
    position: fixed;
    background: var(--bg-gradient);
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px var(--shadow-color);
    border-radius: 15px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    color: var(--nav-text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 700;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-text);
}

.dropdown-menu a.active {
    background-color: var(--nav-hover-bg);
    color: var(--nav-hover-text);
    font-weight: bold;
}

.dropdown-menu a.admin-only {
    display: none;
}

.nav-cta-button {
    background-color: #9146FF;
    color: white !important;
    font-size: 1em;
    padding: 0.5em 1.1em;
    border-radius: 30px;
    transition: transform 0.2s ease, background-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    text-decoration: none;
}

.nav-cta-button.secondary {
    background-color: #7289da;
}

.nav-cta-button.discord-button {
    background-color: #5865f2;
}

.nav-cta-button:hover {
    transform: scale(1.05);
}

.nav-cta-button.secondary:hover {
    background-color: #5f73bc;
}

.nav-cta-button.discord-button:hover {
    background-color: #4752c4;
}

.nav-cta-button.pink-button {
    background-color: #ff8dd1;
}

.nav-cta-button.pink-button:hover {
    background-color: #f872c3;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--nav-text-color);
    color: var(--nav-text-color);
    padding: 0.5em 1.1em;
    font-size: 1em;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.theme-toggle:hover {
    background-color: var(--nav-text-color);
    color: var(--header-bg);
}

.nav-right-group .twitch-button {
    background-color: #9146FF;
    color: white;
}

.nav-right-group .twitch-button:hover {
    background-color: #772ce8;
}

.nav-button-text {
    display: inline;
}

.icon-only {
    display: none;
}

.theme-toggle .icon-only img,
.twitch-button .icon-only img,
.submission-container .nav-cta-button .icon-only img {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin: -4px;
}

.light-icon {
    display: block;
}

.dark-icon {
    display: none;
}

body.dark-mode .light-icon {
    display: none;
}

body.dark-mode .dark-icon {
    display: block;
}

.login-icon {
    display: block;
}

.logout-icon {
    display: none;
}

body.logged-in .login-icon {
    display: none;
}

body.logged-in .logout-icon {
    display: block;
}

.disk-usage-display {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--nav-text-color);
    background-color: rgba(0, 0, 0, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.dark-mode .disk-usage-display {
    background-color: rgba(255, 255, 255, 0.1);
}

.disk-usage-full {
    display: inline;
}

.disk-usage-percentage {
    display: none;
}

/* This is the default, mobile-first layout */
.homepage-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.sticky-profile-container {
    position: static;
}

.scrollable-content {
    display: grid;
    gap: 30px;
    justify-items: stretch;
}

.profile-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow-color), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}

.profile-avatar {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    border: 5px solid var(--border-color);
    object-fit: cover;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.profile-content {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    text-align: center;
}

.profile-content h1 {
    margin: 0 0 5px 0;
    font-size: clamp(1.8em, 8vw, 2.8em);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    word-break: break-word;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 5px 0;
}

.social-links a {
    color: var(--nav-text-color);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.social-links a:hover {
    color: var(--nav-hover-bg);
    transform: scale(1.15) translateY(-2px);
}

.social-links img {
    width: 28px;
    height: 28px;
}

.profile-content .bio {
    font-size: 1.1em;
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 20px;
    white-space: pre-wrap;
    line-height: 1.6em;
    opacity: 0.9;
}

.bio-editor {
    display: none;
    width: 100%;
    margin-top: 10px;
}

.bio-editor textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: 'Nunito', sans-serif;
    font-size: 1.1em;
    box-sizing: border-box;
    resize: vertical;
}

.bio-edit-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.admin-edit-button {
    display: none;
    background: none;
    border: 1px solid var(--nav-text-color);
    color: var(--nav-text-color);
    padding: 5px 10px;
    font-size: 0.8em;
    border-radius: 5px;
    cursor: pointer;
    margin-left: auto;
    margin-bottom: 10px;
}

.admin-edit-button:hover {
    background-color: var(--nav-text-color);
    color: var(--card-bg);
}

body.modal-open {
    overflow: hidden;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 0;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
    cursor: default;
    display: inline-block;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-content img {
    display: block;
    border-radius: 10px;
    max-width: 85vw;
    max-height: 90vh;
    min-width: 50vmin;
    min-height: 75vmin;
    object-fit: contain;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.modal-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 40px;
    height: 40px;
    background-color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.modal-close-btn:hover {
    transform: scale(1.1);
}

/* --- HOMEPAGE SIDE PANEL STYLES --- */
.youtube-card {
    position: relative;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 55px 20px 20px 20px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 
        0 8px 30px var(--shadow-color),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;

    /* --- THIS IS THE CRITICAL FIX --- */
    /* This forces the card to contain its content (like iframes) and allows it to shrink. */
    overflow: hidden;
}

.youtube-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 12px 40px var(--shadow-color),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.scrollable-content>.youtube-card:first-child {
    margin-top: 0;
}

.scrollable-content h2 {
    position: absolute;
    top: 15px; 
    left: 20px;
    margin: 0;
    font-size: 0.9em;
    font-weight: 700;
    padding: 6px 15px;
    color: var(--title-pill-text);
    background-color: var(--title-pill-bg);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 2;
}

/* --- END REFINED STYLES --- */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.tiktok-card {
    display: block;
    position: relative;
    max-width: 350px;
    margin: 0 auto;
    border-radius: 10px;
    overflow: hidden;
    background-color: #000;
    text-decoration: none;
    color: white;
    max-height: 85vh;
}

.tiktok-thumbnail {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tiktok-card:hover .tiktok-thumbnail {
    transform: scale(1.05);
    filter: brightness(0.7);
}

.tiktok-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* --- MODIFIED: Make the background transparent by default --- */
    background-color: transparent;
    /* --- REMOVED: opacity: 0; --- */
    transition: background-color 0.3s ease; /* Transition the background color instead of opacity */
    pointer-events: none;
}

.tiktok-card:hover .tiktok-overlay {
    /* --- MODIFIED: Fade in the dark background on hover --- */
    background-color: rgba(0, 0, 0, 0.4);
    /* --- REMOVED: opacity: 1; --- */
}

.tiktok-overlay .play-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
    /* The icon is now always visible by default */
}

.tiktok-overlay span {
    margin-top: 10px;
    font-weight: bold;
    font-size: 1.1em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.6);
    /* --- NEW: Make text invisible by default --- */
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* --- NEW: Fade in the text on hover --- */
.tiktok-card:hover .tiktok-overlay span {
    opacity: 1;
}

.tiktok-author-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    font-size: 0.9em;
    font-weight: bold;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 3px 8px;
    border-radius: 5px;
}

#mini-stream-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 400px;
    box-shadow: 0 8px 30px var(--shadow-color);
    z-index: 100;
    border-radius: 15px;
}

#mini-stream-embed {
    width: 100%;
    height: 225px;
    border-radius: 15px;
    overflow: hidden;
}

#mini-stream-close-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    color: var(--text-color);
    font-size: 20px;
    font-weight: bold;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    z-index: 101;
}

#mini-stream-close-btn:hover {
    background-color: #ff8dd1;
    color: white;
    transform: scale(1.1);
}

.game-and-chat-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    max-width: 1640px;
    padding: 0 20px;
    box-sizing: border-box;
}

#gameContainer {
    position: relative;
    flex: 1;
    aspect-ratio: 16 / 9;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-color);
    overflow: hidden;
}

#chatContainer {
    width: 340px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-color);
    overflow: hidden;
}

#chatContainer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

#twitch-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

canvas {
    background-color: transparent;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    pointer-events: none;
    width: 100%;
    height: 100%;
}

body.clicko-mode-active canvas {
    pointer-events: auto;
    cursor: url('finger_point.png') 32 32, auto;
}

.movement-controls {
    position: relative;
    z-index: 3;
    margin: 20px 0;
}

.movement-controls button {
    background-color: #4CAF50;
    border: none;
    padding: 10px 20px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.movement-controls button:hover {
    background-color: #45a049;
}

.movement-controls .spawn-toggle {
    background-color: #ff8dd1;
    margin-right: 20px;
}

.movement-controls .spawn-toggle:hover {
    background-color: #f872c3;
}

.movement-controls .spawn-toggle[disabled] {
    background-color: #ccc;
    cursor: not-allowed;
}

.movement-controls .clicko-toggle {
    background-color: #3498db;
    margin-left: 20px;
}

.movement-controls .clicko-toggle:hover {
    background-color: #2980b9;
}

#admin-panel {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--card-bg);
    border: 2px solid var(--nav-hover-bg);
    border-radius: 15px;
    max-width: 500px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

#admin-panel h3 {
    margin-top: 0;
    color: var(--nav-hover-bg);
}

#admin-panel button {
    background-color: var(--nav-hover-bg);
    border: none;
    color: var(--nav-hover-text);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

#checkthis-page {
    width: 100%;
    max-width: 1400px;
    padding: 0 20px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 30px var(--shadow-color), inset 0 1px 2px rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    box-sizing: border-box;
}

.submission-container {
    display: flex;
    align-items: center;
    position: relative;
    padding: 15px 30px;
    justify-content: center;
}

.lounge-header-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lounge-header-icon {
    max-height: 40px;
    width: auto;
}

.view-toggle {
    background: none;
    border: 2px solid var(--nav-text-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.view-toggle img {
    width: 100%;
    height: 100%;
    filter: brightness(1);
    transition: filter 0.2s ease;
}

.view-toggle.active img {
    filter: brightness(0.6);
}

.view-toggle:hover {
    background-color: var(--nav-text-color);
}

.submission-container h2 {
    margin: 0;
}

.submission-container .nav-cta-button {
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
}

.link-post {
    position: relative;
    padding-bottom: 70px;
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.image-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    width: 100%;
}

.image-gallery-grid .link-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
}

.post-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 30px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 2;
}

.discord-source-link img {
    width: 24px;
    height: 24px;
    display: block;
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.discord-source-link:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.submitted-by {
    font-size: 0.9em;
    color: var(--nav-text-color);
    margin: 0;
}

.post-timestamp {
    font-size: 0.8em;
    color: var(--nav-text-color);
    margin: 0;
    opacity: 0.8;
    text-align: center;
}

.post-info-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.channel-name {
    font-size: 0.8em;
    color: var(--nav-text-color);
    margin: 0;
    opacity: 0.8;
}

.link-post .link-image {
    max-width: 100%;
    border-radius: 10px;
    max-height: 85vh;
    display: block;
    /*margin: 0 auto;*/
}

.link-post .link-image:hover {
    cursor: pointer;
    opacity: 0.9;
}

.delete-button {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    font-weight: bold;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.7;
    z-index: 5;
}

.delete-button:hover {
    background-color: var(--danger-hover-color);
    transform: scale(1.1);
    opacity: 1;
}

#messages-page {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    #messages-page {
        max-width: 600px;
    }
}

#message-form-container,
#message-login-prompt {
    text-align: left;
}

#message-login-prompt h2,
#message-form h2 {
    text-align: center;
    margin-top: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

#message-input {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border-radius: 10px;
    border: 2px solid var(--border-color);
    background-color: transparent;
    color: var(--text-color);
    font-family: 'Nunito', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    resize: vertical;
    transition: border-color 0.2s, padding-left 0.2s;
    position: relative;
    z-index: 2;
    line-height: 1.4;
}

#message-input:focus {
    outline: none;
    border-color: var(--nav-hover-bg);
}

.char-counter {
    text-align: right;
    font-size: 0.8em;
    color: var(--nav-text-color);
    opacity: 0.7;
    margin-top: 5px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group label {
    font-weight: normal;
    cursor: pointer;
}

#message-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
}

#status-message {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    display: none;
}

#status-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#status-message.error {
    display: block;
    background-color: #f8d7da;
    color: var(--danger-color);
    border: 1px solid #f5c6cb;
}

.dark-mode #status-message.success {
    background-color: #1a3824;
    color: #a7d7b8;
    border-color: #2a583e;
}

.dark-mode #status-message.error {
    background-color: #4a2c2f;
    color: #ff8a8a;
    border-color: #7c3e44;
}

#category-description {
    font-size: 0.9em;
    color: var(--nav-text-color);
    opacity: 0.8;
    margin-top: 10px;
    padding: 6px 10px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.dark-mode #category-description {
    background-color: rgba(255, 255, 255, 0.05);
}

.textarea-wrapper {
    position: relative;
    background-color: var(--card-bg);
    border-radius: 10px;
}

.shoutout-prefix {
    position: absolute;
    top: 12px;
    left: 10px;
    z-index: 1;
    color: var(--text-color);
    opacity: 0.5;
    pointer-events: none;
    font-family: 'Nunito', sans-serif;
    font-size: 1em;
    display: none;
    line-height: 1.4;
}

.textarea-wrapper.shoutout-active .shoutout-prefix {
    display: block;
}

.textarea-wrapper.shoutout-active #message-input {
    padding-left: 105px;
}

#suggestions-page,
#shoutouts-page,
#smileys-page {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 840px) {

    #suggestions-page,
    #shoutouts-page,
    #smileys-page {
        max-width: 800px;
    }
}

.suggestions-feed {
    display: grid;
    gap: 20px;
}

.suggestion-post {
    position: relative;
    padding: 30px;
    padding-bottom: 50px;
    text-align: left;
}

.suggestion-message {
    font-size: 1.1em;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.suggestion-author {
    position: absolute;
    bottom: 20px;
    right: 30px;
    text-align: right;
    font-size: 0.9em;
    color: var(--nav-text-color);
    margin: 0;
    opacity: 0.8;
}

.shoutouts-feed {
    display: grid;
    gap: 20px;
}

.shoutout-post {
    position: relative;
    padding: 10px 15px; /* Adds space for the title pill */
}

.shoutout-message {
    font-size: 1.0em;
    font-weight: 700;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: center;
    text-shadow: -1px -1px 2px var(--shoutout-highlight), 1px 1px 2px var(--shoutout-lowlight);
}

.shoutout-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* --- NEW: Add a border on top to separate it from the header --- */
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 15px;
}

.shoutout-footer p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9em;
    color: var(--nav-text-color);
    flex-basis: 33.33%;
}

.shoutout-footer .shoutout-author {
    text-align: left;
}

.shoutout-footer .shoutout-created-on {
    text-align: center;
}

.shoutout-footer .shoutout-completed-on {
    color: var(--completed-color);
    opacity: 1;
    font-weight: 700;
    text-align: right; /* Re-adding this for good measure */
}

.smileys-feed {
    display: grid;
    gap: 20px;
}

.smiley-post {
    position: relative;
    padding: 30px;
    padding-bottom: 50px;
    text-align: left;
}

.smiley-post .post-controls {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.smiley-message {
    font-size: 1.1em;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.smiley-author {
    position: absolute;
    bottom: 20px;
    right: 30px;
    text-align: right;
    font-size: 0.9em;
    color: var(--nav-text-color);
    margin: 0;
    opacity: 0.8;
}

.smiley-post.unapproved {
    border-left: 5px solid var(--danger-color);
}

.approve-button {
    background-color: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 12px;
    font-size: 0.9em;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.approve-button:hover {
    background-color: #27ae60;
}

.post-controls .delete-button {
    position: static;
    opacity: 1;
}

#cloud-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.cloud-wrapper {
    position: absolute;
    animation-name: moveCloud;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.background-cloud-image {
    width: 100%;
    height: 100%;
}

.cloud-text {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    color: #4c3a5b;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
    text-align: center;
    font-size: calc(var(--cloud-size-vw, 10) * 0.072vw);
    line-height: 1.2;
    word-break: break-word;
    user-select: none;
}

@keyframes moveCloud {
    from {
        transform: translateX(110vw);
    }

    to {
        transform: translateX(calc(-100vw - 100%));
    }
}

main {
    margin-left: auto;
    margin-right: auto;
}

#links-feed {
    margin-bottom: 40px;
}

.post-background-filler {
    position: relative; 
    z-index: 1;
    border-radius: 10px;
    overflow: hidden; 
    /*background: var(--card-bg);*/
    padding: 0;
}

.post-background-filler::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.4);
    transform: scale(1.1);
    transition: opacity 0.3s ease;
    z-index: 1;
    opacity: 0;
}

.link-post-content {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center; /* This horizontally centers the image */
    align-items: center;    /* This vertically centers it (good for consistency) */
}

.post-background-filler[style*="background-image: url"] {
    padding: 15px;
}

.post-background-filler[style*="background-image: url"]::before {
    opacity: 1;
}

.link-post .link-image,
.link-post .video-container,
.link-post .tiktok-card {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.link-post .tiktok-card {
    border-radius: 10px;
}

.link-post .image-gallery-grid .link-image {
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.shoutout-header {
    display: flex;
    align-items: center; /* Vertically align everything on the line */
    gap: 15px; /* Adds spacing between the elements */
    margin-bottom: 15px; /* Creates space between the header and the footer */
}

/* Style for the title pill (no longer needs absolute positioning) */
.shoutout-header h2 {
    margin: 0;
    font-size: 0.9em;
    font-weight: 700;
    padding: 6px 15px;
    color: var(--title-pill-text);
    background-color: var(--title-pill-bg);
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.shoutout-header .shoutout-message {
    font-size: 1.0em;
    font-weight: 700;
    margin: 0;
    text-align: center;
    text-shadow: -1px -1px 2px var(--shoutout-highlight), 1px 1px 2px var(--shoutout-lowlight);
    flex-grow: 1;
}

/* The admin controls container (no longer needs absolute positioning) */
.shoutout-header .post-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Shoutout "Completed" Styles */
.shoutout-post.completed {
    border-left: 5px solid #2ecc71;
    background: linear-gradient(135deg, #f0fff8, #e6fff2);
}

.dark-mode .shoutout-post.completed {
    background: linear-gradient(135deg, #1b2727, #092b2b);
}

.shoutout-complete-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.9em;
    color: var(--nav-text-color);
    cursor: pointer;
    user-select: none;
}

.shoutout-complete-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Latest Shoutout Panel Styles */
#latest-shoutout-card {
    padding-top: 20px;
    padding-bottom: 0px;
    border-left: 5px solid #2ecc71;
    background: linear-gradient(135deg, #f0fff8, #e6fff2);
}

.dark-mode #latest-shoutout-card {
    background: linear-gradient(135deg, #1b2727, #092b2b);
}


#latest-shoutout-card h2 {
    /*display: none;*/
}

#latest-shoutout-card .shoutout-message {
    text-align: center;
    margin-bottom: 0;
    padding-left: 40px;
}

.latest-shoutout-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
}

.latest-shoutout-footer .shoutout-author {
    opacity: 0.8;
    color: var(--nav-text-color);
    text-align: left;
}

.latest-shoutout-footer .shoutout-completed-on {
    color: var(--completed-color);
    font-weight: 700;
    text-align: right;
}

/* Modal Navigation Styles */
.modal-nav-btn {
    display: none;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: background-color 0.2s ease;
    user-select: none;
}

.modal-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

#modal-prev-btn {
    left: 20px;
}

#modal-next-btn {
    right: 20px;
}

#jbucks-display img {
    width: 18px; /* You can change this value */
    height: 18px; /* You can change this value */
}

/* Media Queries for Responsive Design */
@media (max-width: 900px) {
    .nav-button-text {
        display: none;
    }

    .icon-only {
        display: inline;
    }

    .dropdown-button,
    .theme-toggle,
    .twitch-button {
        padding: 8px 12px;
    }

    .disk-usage-full {
        display: none;
    }

    .disk-usage-percentage {
        display: inline;
    }

    #nav-placeholder {
        display: block;
        padding-left: 10px;
        padding-right: 10px;
    }

    header {
        padding-left: 15px;
        padding-right: 15px;
    }
}

@media (min-width: 901px) {
    .homepage-layout {
        grid-template-columns: 400px 1fr;
        align-items: start; /* This is essential for the sticky profile card */
        gap: 30px;
        padding: 0 30px;
    }

    .sticky-profile-container {
        grid-column: 1 / 2;
        position: sticky;
        top: 20px;
    }

    .scrollable-content {
        grid-column: 2 / 3;
        min-width: 0; /* This is still good practice for flexible grid items */
    }

    .profile-card {
        display: flex;
        flex-direction: column;
        height: calc(100vh - 40px);
        padding: 0;
        overflow: hidden;
    }
    
    .profile-avatar {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        height: 100%; 
        object-fit: cover;
        border-radius: 0;
        border: none;
        margin-bottom: 0;
    }

    .profile-content {
        flex-shrink: 0;
        padding: 20px 30px 30px;
        text-align: center;
    }

    .profile-content .social-links {
        justify-content: center; 
    }
}

@media (min-width: 768px) {
    #links-feed.multi-column-active {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        align-items: start;
        gap: 20px;
        grid-auto-rows: 20px;
    }

    #links-feed.multi-column-active .link-post {
        margin-bottom: 0;
    }
}

@media (max-width: 940px) {
    #view-toggle-button {
        display: none;
    }
}

@media (min-width: 941px) {

    .single-column-view .submission-container,
    .single-column-view #links-feed {
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }
}

#latest-post-container .link-image {
    width: 100%;       /* Force the image to be the same width as its container */
    max-width: 100%;   /* Ensure it never exceeds the container's width */
    height: auto;      /* Allow the height to adjust automatically to maintain aspect ratio */
    display: block;    /* Prevents extra space below the image */
}

#latest-shoutout-card {
    /* to prevent it from being hidden if browser resized while it is not in view*/
    backdrop-filter: none;
}

#latest-post-card .post-background-filler {
    margin-bottom: 60px;
}

/* --- Polls Page Styles --- */
#polls-page {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 840px) {
    #polls-page {
        max-width: 800px;
    }
}

.polls-feed {
    display: grid;
    gap: 20px;
}

.poll-post {
    text-align: left;
}

.poll-post.inactive {
    opacity: 0.6;
    background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(0,0,0,0.02) 10px,
      rgba(0,0,0,0.02) 20px
    );
}

.dark-mode .poll-post.inactive {
     background: repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255,255,255,0.02) 10px,
      rgba(255,255,255,0.02) 20px
    );
}

.poll-post.not-public {
    border-left: 5px solid #e67e22;
}

.poll-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.poll-question {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0;
    flex-grow: 1;
}

.poll-admin-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.poll-option {
    position: relative;
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s, border-color 0.2s;
}

.poll-post.inactive .poll-option {
    cursor: not-allowed;
}

.poll-option:not(.voted):hover {
    background-color: rgba(0,0,0,0.05);
    border-color: var(--nav-hover-bg);
}

.dark-mode .poll-option:not(.voted):hover {
    background-color: rgba(255,255,255,0.05);
}

.poll-option.voted {
    border-color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.1);
}

.poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--nav-hover-bg);
    opacity: 0.2;
    z-index: 1;
    transition: width 0.5s ease-in-out;
}

.poll-option-placeholder-text {
    display: none;
    font-style: italic;
    color: var(--nav-text-color);
    opacity: 0.8;
}

/* Change the placeholder text for creator-hidden polls */
.poll-post.results-hidden .poll-option-placeholder-text:before {
    content: "Results are hidden";
}


.poll-option-text, .poll-option-votes {
    position: relative;
    z-index: 2;
}

.poll-option-votes {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--nav-text-color);
}

.poll-footer {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8em;
    color: var(--nav-text-color);
    opacity: 0.8;
}

#admin-poll-creator {
    text-align: left;
}
#admin-poll-creator input[type="text"],
#admin-poll-creator input[type="number"] {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
}
#poll-options-container {
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.admin-show-results-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

/* By default, on a poll with hidden results, hide the bars and votes */
.poll-post.results-hidden .poll-option-bar {
    width: 0 !important; /* Use !important to override inline style */
}
.poll-post.results-hidden .poll-option-votes {
    display: none;
}
.poll-post.results-hidden .poll-footer .poll-total-votes {
    display: none;
}

/* When an admin clicks "Show Results", this class is added */
/* It overrides the hiding rules above */
.poll-post.admin-override-show .poll-option-bar {
    width: var(--poll-percent, 0%) !important;
}
.poll-post.admin-override-show .poll-option-votes {
    display: inline;
}
.poll-post.admin-override-show .poll-footer .poll-total-votes {
    display: inline;
}
.poll-post.admin-override-show .poll-option-placeholder-text {
    display: none;
}

/* Disable interaction if poll is inactive or user has already voted */
.poll-post.inactive .poll-option,
.poll-post.user-has-voted .poll-option {
    cursor: default;
}

.poll-post.inactive .poll-option:hover,
.poll-post.user-has-voted .poll-option:hover {
    background-color: transparent;
    border-color: var(--border-color);
}

/* Override absolute positioning for delete buttons inside specific containers */
.poll-admin-controls .delete-button,
.post-controls .delete-button {
    position: static;
    opacity: 1; /* Ensure it's fully visible */
}