.merik-playground {
  background: #0e0e10;
  color: #fff;
  padding: 40px 20px;
  border-radius: 20px;
  max-width: 1200px;
  margin: 60px auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.pg-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 10px;
  color: #00e6b8;
}

.pg-desc {
  text-align: center;
  margin-bottom: 30px;
  color: #ccc;
}

.pg-container {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.pg-editors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pg-box {
  display: flex;
  flex-direction: column;
}

.pg-box label {
  font-weight: bold;
  margin-bottom: 5px;
  color: #00e6b8;
}

.pg-box textarea {
  width: 100%;
  height: 200px;
  background: #1a1a1d;
  color: #f1f1f1;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  resize: vertical;
}

#pg-run {
  align-self: center;
  padding: 10px 30px;
  background: #00e6b8;
  color: #111;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
#pg-run:hover {
  background: #00c0a0;
}

.pg-preview iframe {
  width: 100%;
  height: 350px;
  background: #fff;
  border-radius: 10px;
  border: none;
}

@media (max-width: 900px) {
  .pg-editors {
    grid-template-columns: 1fr;
  }
  #pg-run {
    width: 100%;
  }
}

.pg-toolbar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.pg-toolbar select, 
.pg-toolbar button {
  padding: 8px 15px;
  border-radius: 20px;
  border: none;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.pg-toolbar select {
  background: #1a1a1d;
  color: #00e6b8;
  border: 1px solid #333;
}

.pg-toolbar button {
  background: #00e6b8;
  color: #111;
  transition: 0.3s;
}
.pg-toolbar button:hover {
  background: #00c0a0;
}




/* --- General Cleanup and Aesthetic --- */
body { 
    background-color: #f0f2f5; /* Light social media background */
    color: #1c1e21; 
    margin:0px;
    
}
.container {
    padding-top: 20px;
}
@media (min-width: 768px) {
    .container {
        max-width: 1000px; /* Wider container for the two-column grid */
    }
}

/* --- Post Card Styling (Like Facebook/Reddit) --- */
.post-card { 
    margin-bottom: 25px; 
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background: white;
    transition: transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* --- Post Header (Author, Message Button, and Time) --- */
.post-header { 
    display: flex; 
    align-items: center;
    justify-content: space-between;
    font-size: 0.85em; 
    color: #606770; 
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid #f0f2f5;
}

/* Responsive stacking for header elements */
@media (max-width: 767px) {
    .post-header {
        flex-direction: column; 
        align-items: flex-start;
    }
    .post-time {
        margin-top: 5px;
    }
}

/* --- Content Styling --- */
.project-title-link {
    font-weight: 600;
    color: #0a84ff; /* Primary blue link color */
    text-decoration: none;
}
.project-title-link:hover {
    text-decoration: underline;
}

/* --- Search Bar Styling --- */
.compact-search .input-group {
    max-width: 700px; /* Limit width on large screens */
    margin: 0 auto;
}

/* Reaction Button Styling (Optional but recommended) */
.reaction-btn {
    transition: all 0.2s;
    font-size: 0.85rem;
}

/* Comments Box */
.comment-box {
    max-height: 250px;
    overflow-y: auto;
}
.single-comment {
    border-bottom: 1px dotted #ccc;
    padding: 5px 0;
}
.single-comment:last-child {
    border-bottom: none;
}
.comment-author {
    font-weight: bold;
    font-size: 0.9em;
}
.comment-content {
    font-size: 0.85em;
    margin-left: 10px;
}

/* Red Notification Icon (for general use) */
.notification-dot {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    background-color: red;
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid white;
}

.suggestions-dropdown {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    padding: 5px;
    display: block;
}

/* .suggestion-item {
    padding: 6px;
    cursor: pointer;
} */

/* .suggestion-item:hover {
    background-color: #f0f0f0;
} */
/* #searchSuggestions {
    position: absolute;       
    top: 100%;                
    left: 0;
    width: 100%;
    background: #fff;
    border: 1px solid #ddd;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
} */

/* .suggestion-item {
    padding: 6px 10px;
    cursor: pointer;
} */

/* .suggestion-item:hover {
    background-color: #f0f0f0;
} */


#communitySearch {
    width: 100%;
    padding: 8px 12px;
    box-sizing: border-box;
}

#searchSuggestions {
    position: absolute;   /* overlay dropdown */
    top: 100%;            /* just below the input */
    left: 0;
    right: 0;
    background: #b5d294;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;    /* scroll if too tall */
    overflow-y: auto;
    z-index: 1000;        /* above other content */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
}

.no-suggestions {
    padding: 8px 12px;
    color: #888;
    font-style: italic;
}

/* --- FIXED HEADER STYLES --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10000;
  background: #5f5858; /* or your desired background */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 10px 0;
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.feed-title {
  font-size: clamp(18px, 1vw + 0.5rem, 35px);
  color: #333;
  margin: 0;
  text-align: center;
}

.header-link,
.btn-primary,
.code-btn,
.logout-btn,
.signin-btn {
  border-radius: 8px;
  font-size: clamp(14px, 1vw + 0.2rem, 20px);
  padding: 6px 14px;
  text-decoration: none;
}

.home-link {
  background: #4e17d8;
  color: white;
}

.logout-btn {
  background: #922aaf;
  color: white;
}

.signin-btn {
  background: #922aaf;
  color: white;
}

.code-btn {
  background: #333fc9;
  color: white;
}

.btn-primary {
  background: #007bff;
  color: white;
}

/* Push content below the fixed header */
body {
  padding-top: 120px; /* adjust if header is taller */
}
@media (min-width: 667px) {
body {
  padding-top: 100px; /* adjust if header is taller */
}
}