/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');


/* ===== General Body Styling ===== */
body {
    font-family: 'Press Start 2P', cursive;
    line-height: 1.6;
    background: linear-gradient(45deg, #1f1f1f, #2a2a2a, #3f3f3f, #1f1f1f);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: white;
    margin: 0;
    padding: 0;
    padding-top: 100px; /* Avoid overlap */
    padding-bottom: 80px; /* Space for footer */
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    box-sizing: border-box;
    overflow: hidden; /* Prevents scrolling while loading */
}

@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== Header Styling ===== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
    position: fixed;
    top: 0;
    left: 0; /* Ensure it starts from the left */
    width: 100%;
    z-index: 1000;
}

.logo {
    height: 100px;
    margin: 10px;
}

nav {
    flex: 1;
    text-align: center;
}

nav a {
    color: #87cefa;
    text-decoration: none;
    margin: 0 10px;
    font-size: 12px;
}

nav a:hover {
    color: #ff6347;
}

/* ===== Main Container Styling ===== */
.container {
    flex: 1;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    margin: 100px auto 20px auto;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 100%;
    box-sizing: border-box;
}

.snakecontainer {
    flex: 1;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    margin: 100px auto 20px auto;
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    width: 80%;
    max-width: 100%;
    box-sizing: border-box;
}

#content {
    min-height: 100vh; /* Makes sure content is scrollable */
}

/* ===== Footer Styling ===== */
footer {
    padding: 0px 0;
    background-color: rgba(0, 0, 0, 0.8);
    text-align: center;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
}

/* ===== Forum Layout ===== */
.forum-layout {
    display: grid;
    grid-template-columns: 30% 45% 20%;
    gap: 10px;
    padding: 10px;
    padding-top: 100px;
    padding-bottom: 80px;
    height: 80vh;
}

/* ===== Left Panel: Topic List ===== */
.left-panel {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
}

/* ===== Center Panel: Topic Posts ===== */
.center-panel {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
}

/* ===== Right Panel: Create Post Form ===== */
.right-panel {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
    display: none;
}

/* ===== Topic Item Styling ===== */
/* Make each topic item smaller */
.topic-item {
    padding: 5px 8px; /* Reduce padding */
    font-size: 14px;  /* Reduce font size */
    line-height: 1.2; /* Decrease line height */
    border-bottom: 1px solid #87cefa;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 5px;
    transition: background-color 0.3s;
}

.topic-item h3 {
    font-size: 16px; /* Reduce topic title size */
    margin: 3px 0; /* Decrease space between elements */
}

.topic-item p {
    font-size: 12px; /* Reduce creator text size */
    margin: 2px 0; /* Reduce spacing between elements */
}


.topic-item:hover {
    background-color: #ff6347;
}

/* ===== Sticky Topic Highlight ===== */
.sticky-topic {
    background-color: #ffa07a;
    border-left: 5px solid #ff4500;
}

/* ===== Post Item Styling ===== */
.post {
    margin: 10px 0;
    padding: 10px;
    border-left: 3px solid #87cefa;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 5px;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.5);
}

/* ===== Post Metadata ===== */
.post-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 5px;
}

#post-form {
    display: none;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    margin-top: 10px;
}


/* ===== User Role Colors ===== */
.user-role-admin { color: red; }
.user-role-moderator { color: purple; }
.user-role-supporter { color: blue; }
.user-role-user { color: white; }

/* ===== Emoji Picker Styling ===== */
.emoji-picker {
    margin-left: 10px;
    cursor: pointer;
}

/* ===== Scrollable Sections ===== */
.left-panel, .center-panel, .right-panel {
    overflow-y: auto;
    max-height: calc(100vh - 180px);
}

/* ===== Modal Styling ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    padding-top: 60px;
}

.modal-content {
    background-color: #222;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 60%;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.7);
}

/* Responsive Flexbox adjustments for mobile */
@media (max-width: 768px) {
    body {
        font-size: 16px;  /* Ensure text is not too small */
    }

    /* Forum Layout adjustments */
    .forum-layout {
        grid-template-columns: 100%; /* Stack the columns on mobile */
        height: auto;
    }

    /* Profile Layout adjustments */
    .profile-layout {
        flex-wrap: wrap; /* Allow panels to wrap on smaller screens */
        gap: 20px;
    }

    .left-profile, .center-profile, .right-profile {
        flex: 1 1 100%; /* Make each panel take full width */
    }

    /* Contest layout adjustments */
    .contest-container {
        grid-template-columns: 1fr; /* Stack contest items on mobile */
    }

    .feature-box {
        flex-direction: column; /* Stack images and text vertically */
    }

    .feature-box img {
        max-width: 100%; /* Ensure images scale properly */
    }

    .feature-text {
        max-width: 100%;
    }
}


/* Contests Styling */
.contest-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 20px; /* Space between images */
    width: 100%; /* Full width */
    max-width: 85%; /* Adjust as needed */
    margin: auto; /* Centering */
    margin-top: 50px;
}

/* Each navigation item */
.contest-item {
    position: relative;
    display: block;
    height: 350px;
    overflow: hidden;
    text-align: center;
}

/* Image styling */
.contest-item img {
    width: 100%;
    height: auto;
    max-height: 400px; /* control vertical size */
    object-fit: cover;
    border-radius: 10px; /* optional, for nice rounded images */
    transition: opacity 0.3s ease-in-out;
}

/* Description (hidden by default) */
.contest-description {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    color: white;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    opacity: 0; /* Hidden initially */
    transition: opacity 0.3s ease-in-out;
}

/* Hover effect: Hide image and show description */
.contest-item:hover img {
    opacity: 0;
}
.contest-item:hover .contest-description {
    opacity: 1;
}

.head-container {
    display: inline-block; /* Shrinks to fit content */
    width: fit-content; /* Shrinks to content */
    max-width: 100%; /* Prevents overflow on small screens */
    padding: 25px; /* Keeps spacing around content */
    margin: 0 auto; /* Centers horizontally */
    margin-top: 100px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    box-sizing: border-box;
    text-align: center; /* Centers text inside */
    white-space: nowrap; /* Ensures it only grows with content (optional) */
}
.contest-title-box {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 5px;
}


/* Ensure Fullscreen Coverage */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    min-height: 100vh; /* Use min-height instead of height to prevent shrinking */
    background: #000;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 22px;
    z-index: 10000; /* Ensure it stays above everything */
}

/* Temporarily remove body's flex effect */
body.loading {
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
    height: 100vh !important;
}
/* Logo Styling */
.loading-logo {
    width: 250px; /* Adjust size as needed */
    height: auto;
    margin-bottom: 15px;
}

.hidden {
    display: none !important; /* Ensures it's hidden initially */
}


/* Restore body's normal layout after loading */
body.loaded {
    overflow: visible !important;
    height: auto;
}
.profile-layout {
    display: flex; /* Enables Flexbox */
    width: 100vw; /* Ensure it takes the full viewport width */
    max-width: 100%; /* Prevent unintended shrinking */
    height: auto; /* 🚀 Auto height based on content */
    padding: 10px;
    padding-top: 100px;
    padding-bottom: 80px;
    gap: 10px; /* Space between columns */
    align-items: stretch; /* Ensures all panels stay the same height */
    box-sizing: border-box; /* Prevents padding from affecting size */
    flex-wrap: nowrap !important; /* 🚀 Force Flexbox to prevent wrapping */
    overflow: hidden; /* Prevents unexpected layout issues */
}

/* ===== Left Panel: Topic List ===== */
.left-profile {
    flex: 0 0 30%; /* Fixed width at 30% */
    max-width: 30%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
}

/* ===== Center Panel: Topic Posts ===== */
.center-profile {
    flex: 0 0 35%; /* Fixed width at 35% */
    max-width: 35%;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
}

/* ===== Right Panel: Create Post Form ===== */
.right-profile {
    flex: 0 0 35%; /* Fixed width at 35% */
    max-width: 30%;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    border-radius: 8px;
    overflow-y: auto;
    height: 100%;
    display: none; /* Initially hidden */
}

.left-profile, .center-profile, .right-profile {
    display: flex; /* Enables Flexbox */
    flex-direction: column; /* Ensures vertical stacking */
    justify-content: center; /* Centers content vertically */
    align-items: center; /* Centers content horizontally */
    text-align: center; /* Ensures text stays centered */
    height: 100%; /* Matches parent height */
    min-width: 0;
}

.left-profile input[type="file"] {
    display: block;
    margin: 0 auto; /* Centers it inside the parent */
    text-align: center;
}


/* If the screen is too small, adjust the layout */
@media (max-width: 1200px) {
    .profile-layout {
        flex-wrap: wrap; /* Allows wrapping for smaller screens */
    }
    .right-profile {
        flex: 1 1 100%; /* Moves to full width when wrapped */
    }
}


.contact-layout {
    display: flex;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    margin: 100px auto 20px auto;
}

.contact-form {
    flex: 2;
    background: #000000;
    padding: 20px;
    border-radius: 10px;
}

.contact-info {
    flex: 1;
    background: #000000;
    padding: 20px;
    border-radius: 10px;
}

.contact-info a {
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.contact-info a:hover {
    text-decoration: underline;
}


.subscribe-container {
    margin-top: 0px;
    text-align: center;
    background-color: #000000;
    padding: 0px;
    border-radius: 0px;
    color: white;
}

.subscribe-form {
    display: flex;
    justify-content: center;
    gap: 0px;
    margin-top: 0px;
    flex-wrap: wrap;
}

.subscribe-form input[type="email"] {
    padding: 10px;
    border-radius: 5px;
    border: none;
    width: 250px;
}

.subscribe-form button {
    padding: 10px 20px;
    background-color: #444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.subscribe-form button:hover {
    background-color: #666;
}

.subscribe-confirmation {
    color: lightgreen;
    margin-top: 10px;
}

.feature-section {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    margin: 60px 0;
}

.feature-section.visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    max-width: 1100px;
    margin: auto;
    flex-wrap: wrap;
    color: white;
}

.feature-box.left {
    flex-direction: row;
}

.feature-box.right {
    flex-direction: row;
}

.feature-box img {
    max-width: 45%;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.4);
}

.feature-text {
    max-width: 45%;
}

.feature-text h2 {
    font-size: 22px;
    margin-bottom: 10px;
}

.feature-text p {
    font-size: 14px;
    line-height: 1.6;
}
.subscriptions-status {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.subscription-box {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.subscription-box h3 {
    margin-top: 0;
}

.subscribe-button {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background-color: #444;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}

.subscribe-button:hover {
    background-color: #222;
}

.prize-info {
    color: #0f0;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: bold;
    border-radius: 5px;
    margin-bottom: 15px;
}
.error {
    color: red;
    font-weight: bold;
}

.captcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
  }
  