/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
  scrollbar-width: none; /* Firefox */
}

body::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #111;
    color: #eee;
    line-height: 1.6;
    -ms-overflow-style: none; /* IE and Edge */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

/* Header styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem 1rem;
    background-color: #0a0a0a;
    border-bottom: 1px solid #333;
    box-shadow: 0 0 10px rgba(51, 51, 51, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000; /* Increased z-index for header */
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo a {
    text-decoration: none;
}

.logo h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: #fff;
    text-shadow: 0 0 5px #0066ff, 0 0 10px #0066ff;
}

.platform-buttons, .nav-buttons {
    display: flex;
    gap: 1rem;
}

.platform-btn, .nav-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #222;
    color: #fff;
    text-decoration: none;
    border: 1px solid #0f0;
    border-radius: 3px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 0 8px var(--button-color, rgba(0, 255, 0, 0.7));
}

/* Standardized button sizing for platform buttons */
.platform-btn {
    min-width: 104px; /* Precisely calculated width to match gaps with the title */
    text-align: center;
}

/* Make the Submit button wider to accommodate dropdown content */
.nav-buttons .dropdown:nth-child(2) .nav-btn {
    min-width: 100px; /* Adjust as needed to fit "Request" */
    text-align: center;
}

/* Standard padding for all nav buttons */
.nav-buttons .nav-btn {
    padding: 0.5rem 1.2rem;
    text-align: center;
}

/* Custom hover effect for buttons */
.platform-btn:hover, .nav-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
    border-color: var(--border-color, #0f0);
}

/* Ensure buttons stay in hover state when dropdown is being interacted with */
.dropdown:hover .platform-btn, 
.dropdown:hover .nav-btn {
    background-color: #333;
    transform: translateY(-2px);
    border-color: var(--border-color, #0f0);
}

/* Add glow effect to the entire dropdown container on hover */
.dropdown:hover {
    z-index: 1001; /* Ensure the dropdown with glow appears above others */
}

/* Platform button dropdown container glow effects */
.platform-buttons .dropdown:nth-child(1):hover {
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

.platform-buttons .dropdown:nth-child(2):hover {
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.8));
}

.platform-buttons .dropdown:nth-child(3):hover {
    filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.8));
}

.platform-buttons .dropdown:nth-child(4):hover {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

/* Nav button dropdown container glow effects */
.nav-buttons .dropdown:nth-child(1):hover {
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.8));
}

.nav-buttons .dropdown:nth-child(2):hover {
    filter: drop-shadow(0 0 10px rgba(0, 191, 255, 0.8));
}

.nav-buttons .dropdown:nth-child(3):hover {
    filter: drop-shadow(0 0 10px rgba(0, 255, 0, 0.8));
}

.nav-buttons .dropdown:nth-child(4):hover {
    filter: drop-shadow(0 0 10px rgba(255, 0, 0, 0.8));
}

.nav-buttons > a:nth-of-type(1):hover {
    box-shadow: 0 0 20px rgba(0, 255, 0, 1);
}

.nav-buttons > a:nth-of-type(2):hover {
    box-shadow: 0 0 20px rgba(255, 0, 0, 1);
}

/* Specific colors for each button */
.platform-buttons .dropdown:nth-child(1) .platform-btn {
    --button-color: rgba(255, 0, 0, 0.7);
    --border-color: red;
    border-color: red;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

.platform-buttons .dropdown:nth-child(2) .platform-btn {
    --button-color: rgba(0, 255, 0, 0.7);
    --border-color: #00FF00;
    border-color: #00FF00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

.platform-buttons .dropdown:nth-child(3) .platform-btn {
    --button-color: rgba(0, 191, 255, 0.7);
    --border-color: #00BFFF;
    border-color: #00BFFF;
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.7);
}

.platform-buttons .dropdown:nth-child(4) .platform-btn {
    --button-color: rgba(255, 215, 0, 0.7);
    --border-color: gold;
    border-color: gold;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

.nav-buttons .dropdown:nth-child(1) .nav-btn {
    --button-color: rgba(255, 215, 0, 0.7);
    --border-color: gold;
    border-color: gold;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

.nav-buttons .dropdown:nth-child(2) .nav-btn {
    --button-color: rgba(0, 191, 255, 0.7);
    --border-color: #00BFFF;
    border-color: #00BFFF;
    box-shadow: 0 0 8px rgba(0, 191, 255, 0.7);
}

/* Make Account button red */
.nav-buttons .dropdown:nth-child(4) .nav-btn {
    --button-color: rgba(255, 0, 0, 0.7);
    --border-color: red;
    border-color: red;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

.nav-buttons > a:nth-of-type(1) {
    --button-color: rgba(0, 255, 0, 0.7);
    --border-color: #00FF00;
    border-color: #00FF00;
    box-shadow: 0 0 8px rgba(0, 255, 0, 0.7);
}

.nav-buttons > a:nth-of-type(2) {
    --button-color: rgba(255, 0, 0, 0.7);
    --border-color: red;
    border-color: red;
    box-shadow: 0 0 8px rgba(255, 0, 0, 0.7);
}

/* Enhanced hover effect for platform buttons */

/* Main Container */
main {
    flex: 1;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 100; /* Lower z-index than header */
}

/* Neon Feeds Layout */
.content-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 20px;
    width: 90%;
    margin: 12px auto 0;
    max-width: none;
}

.posts-feed, .livestreams-feed {
    flex: 1;
    border-radius: 10px;
    padding: 20px;
    max-height: 580px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    -webkit-mask-image: linear-gradient(to bottom, black 75%, #111 100%);
    mask-image: linear-gradient(to bottom, black 75%, #111 100%);
    /* Hide scrollbars but keep functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.posts-feed::-webkit-scrollbar, .livestreams-feed::-webkit-scrollbar {
    display: none;
}

/* Neon Blue Effect for Posts */
.neon-blue {
    background-color: rgba(0, 10, 40, 0.8);
    border: 2px solid #00f;
    box-shadow: 0 0 15px #0066ff, inset 0 0 15px #0066ff;
}

.neon-blue h2 {
    color: #fff;
    text-shadow: 0 0 10px #0066ff, 0 0 20px #0066ff, 0 0 30px #0066ff;
    text-align: center;
    margin-bottom: 10px;
    position: relative;
    border-bottom: none;
}

/* Neon Red Effect for Livestreams */
.neon-red {
    background-color: rgba(40, 0, 10, 0.8);
    border: 2px solid #f00;
    box-shadow: 0 0 15px #ff0066, inset 0 0 15px #ff0066;
}

.neon-red h2 {
    color: #fff;
    text-shadow: 0 0 10px #ff0066, 0 0 20px #ff0066, 0 0 30px #ff0066;
    text-align: center;
    margin-bottom: 10px;
    border-bottom: none;
}

/* Feed Items Styling */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feed-item {
    position: relative;
    display: flex;
    flex-direction: column;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
    height: auto;
}

/* Position for date and viewers count */
.feed-info .user-date {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
    font-size: 0.9rem;
    color: #ccc;
}

.feed-info .viewers {
    position: absolute;
    top: 15px;
    right: 15px;
    font-weight: bold;
    color: #ff9999 !important;
    margin: 0;
}

/* Fix glow on hover without displacement */
.neon-blue .feed-item:hover {
    border: 2px solid #0066ff;
    box-shadow: 0 0 10px #0066ff;
    transform: none;
}

.neon-red .feed-item:hover {
    border: 2px solid #ff0066;
    box-shadow: 0 0 10px #ff0066;
    transform: none;
}

.feed-info h3 {
    margin-top: 0;
    margin-bottom: 6px;
    font-size: 1.1rem;
    color: #fff;
    padding-right: 100px; /* Make room for date/viewers */
}

/* Always have borders on feed items */
.neon-blue .feed-item {
    border: 2px solid rgba(0, 102, 255, 0.5);
    box-shadow: 0 0 5px rgba(0, 102, 255, 0.3);
}

.neon-red .feed-item {
    border: 2px solid rgba(255, 0, 102, 0.5);
    box-shadow: 0 0 5px rgba(255, 0, 102, 0.3);
}

.feed-info .description {
    color: #fff;
    line-height: 1.4;
    margin: 0;
    margin-top: 5px;
}

/* Adjust username positioning */
.feed-info .username {
    color: #ccc;
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Footer Styling */
footer {
    background-color: #0a0a0a;
    color: #555;
    text-align: center;
    padding: 10px 0;
    margin-top: 0;
    width: 100%;
    border-top: 1px solid #222;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    position: absolute;
    background-color: #1a1a1a;
    width: 100%;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    border-width: 1px;
    border-style: solid;
    z-index: 1001; /* Higher than header */
    left: 0;
    border-radius: 3px;
    transform-origin: top center;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

/* Specific colors for dropdown content borders that match their buttons */
.platform-buttons .dropdown:nth-child(1) .dropdown-content {
    --border-color: red;
    border: 1px solid red;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

.platform-buttons .dropdown:nth-child(2) .dropdown-content {
    --border-color: #00FF00;
    border: 1px solid #00FF00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
}

.platform-buttons .dropdown:nth-child(3) .dropdown-content {
    --border-color: #00BFFF;
    border: 1px solid #00BFFF;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.7);
}

.platform-buttons .dropdown:nth-child(4) .dropdown-content {
    --border-color: gold;
    border: 1px solid gold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.nav-buttons .dropdown:nth-child(1) .dropdown-content {
    --border-color: gold;
    border: 1px solid gold;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.7);
}

.nav-buttons .dropdown:nth-child(2) .dropdown-content {
    --border-color: #00BFFF;
    border: 1px solid #00BFFF;
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.7);
}

/* Make Account dropdown border match button color */
.nav-buttons .dropdown:nth-child(4) .dropdown-content {
    --border-color: red;
    border: 1px solid red;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

/* Fix Bounties dropdown border color to match its green button */
.nav-buttons .dropdown:nth-child(3) .dropdown-content {
    --border-color: #00FF00;
    border: 1px solid #00FF00;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7);
}

/* Fix for Mario button glow */
.platform-buttons .dropdown:first-child .platform-btn:hover {
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.7);
}

/* Dropdown menu item styling with color transition */
.dropdown-content a {
    color: #eee;
    padding: 0.7rem 1rem;
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-align: center;
}

.dropdown-content a:hover {
    background-color: #333;
    color: var(--border-color, #0066ff);
}

/* Create a color fade effect for menu items when dropdown is closing */
.dropdown .dropdown-content a {
    transition: color 0.1s ease;
}

.dropdown:not(:hover) .dropdown-content a {
    color: #555;
    transition: color 0.1s ease;
}

.dropdown:hover .dropdown-content {
    transform: scaleY(1);
    opacity: 1;
}

/* Critical CSS to prevent white text flash */
body {
    color: #eee;
    background-color: #111;
}

/* Media queries for responsiveness */
@media (max-width: 900px) {
    .content-container {
        flex-direction: column;
    }
    
    .posts-feed, .livestreams-feed {
        max-height: 500px;
    }
}