/* General Body and Layout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    color: #fff;
    /* The single, tall composite background image */
    background-image: url('../images/background-composite.jpg'); /* Placeholder for your final art */
    background-color: #111; /* Fallback color */
    background-attachment: fixed; /* This is the key to the parallax effect */
    background-position: top center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-wrapper {
    position: relative;
    z-index: 2;
    padding-top: 120px; /* Add padding to push content down */
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: transparent; /* Allow body background to show through */
}

/* Styles for the new content sections */
.content-section {
    background-color: rgba(10, 10, 10, 0.75); /* Semi-transparent dark background */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    -webkit-backdrop-filter: blur(8px);
    padding: 3rem 2rem;
    margin: 35vh auto; /* Creates vertical space to reveal the background art */
    max-width: 800px;
    width: 90%;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.content-section:first-of-type {
    margin-top: 25vh; /* Less margin at the top */
}

.content-section:last-of-type {
    margin-bottom: 25vh; /* Less margin at the bottom */
}
.content-section h2 {
    font-size: 3rem;
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0);
    color: #28a745; /* Green theme */
    padding: 0.5rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed; /* Changed from sticky to fixed */
    top: 0;
    width: 90%; /* Adjusted for padding */
    z-index: 10;
    transition: top 0.5s ease-in-out; /* Smooth transition for appearing/disappearing */
}

.header-hidden {
    top: -150px; /* Moves the header off-screen */
}

.header-left {
    display: flex;
    align-items: center;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    display: inline-block;
    position: relative; /* Added for positioning the underline */
    background-color: transparent;
    color: #fff;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: color 0.3s;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between menu icon and sign-in button */
}

.logo-link {
    display: inline-block; /* Needed for transform and transition */
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    filter: drop-shadow(0 0 10px #2ecc71); /* Add the green glow */
}

.logo {
    height: 70px; /* Adjusted for better proportions */
    width: auto; /* Prevents stretching by maintaining aspect ratio */
    display: block; /* Good practice for images inside links */
}

.signin-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.signin-btn:hover {
    transform: scale(1.05); /* Slightly enlarge on hover */
    filter: drop-shadow(0 0 10px #2ecc71); /* Add the green glow */
}

.signin-btn img {
    display: block;
    height: 50px; /* Adjust height as needed */
    width: auto;
}

/* Content Containers */
.container {
    flex: 1;
    width: 80%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(255,255,255,0.2);
    border-radius: 8px;
}

.discord-button {
    display: inline-block;
    background-color: #5865F2; /* Discord purple */
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    transition: background-color 0.2s;
}
.discord-button:hover {
    background-color: #4752C4;
}

/* Sections */
.about-section, .game-demo, .download-section, .auth-section {
    padding: 2rem 0;
    text-align: center;
}

.about-section {
    text-align: left;
}

.game-demo, .download-section {
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.auth-form input {
    padding: 0.8rem;
    border-radius: 5px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.15); /* Slightly more opaque */
    color: #fff;
    border: none; /* Removed the border */
}

.auth-form input::placeholder {
    color: #e0e0e0; /* Lighter placeholder text */
}

.auth-btn {
    display: inline-block;
    background-color: #28a745; /* Green theme */
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.auth-btn:hover {
    background-color: #218838; /* Darker green on hover */
}

.auth-switch {
    margin-top: 2rem;
}

.auth-switch a {
    color: #28a745; /* Green theme */
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-error {
    color: #ff6b6b; /* A noticeable but not jarring red */
    text-align: center;
    margin-top: 1rem;
    display: none; /* Hidden by default */
    font-size: 0.9rem;
    font-weight: bold;
}

.auth-error.visible {
    display: block; /* Make it visible when the class is added */
}

.form-extra-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #ccc;
    margin-top: -0.5rem; /* Pull it closer to the input above */
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-section h2 {
    text-align: center;
}

/* --- Store Page --- */
.store-section h2 {
    text-align: center;
}

.store-section p {
    text-align: center;
    margin-bottom: 3rem;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.game-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.game-card-img-placeholder {
    width: 100%;
    height: 180px;
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #28a745; /* Green theme */
}

.game-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-card-body h3 {
    margin-top: 0;
    color: #fff;
}

.game-card-description {
    font-size: 1rem !important;
    line-height: 1.5 !important;
    flex-grow: 1;
    color: #ccc;
}

.game-card-footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.game-card-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

.game-card-button {
    display: inline-block;
    background-color: #28a745; /* Green theme */
    color: #fff;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.game-card-button:hover {
    background-color: #218838; /* Darker green on hover */
}

.game-card-button.disabled {
    background-color: #555;
    cursor: not-allowed;
}

.game-card.coming-soon .game-card-img-placeholder {
    color: #777;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.team-member-img-container {
    width: 120px;
    height: 120px;
    border-radius: 50%; /* This makes the container round */
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0 auto 1rem auto;
    overflow: hidden; /* This clips the image to the container's shape */
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-member-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the circle without distortion */
}

.team-member-card h3 {
    margin: 0.5rem 0;
    color: #28a745; /* Green theme */
}

.team-member-card h4 {
    margin: 0 0 1rem 0;
    font-weight: normal;
    font-style: italic;
    color: #ccc;
}

p, .about-section p {
    font-size: 1.2rem;
    line-height: 1.6;
}

.game-demo p, .download-section p {
    margin-bottom: 2rem;
}

/* Buttons and Inputs */
.download-btn {
    display: inline-block;
    background-color: #28a745; /* Green theme */
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s;
}

.download-btn:hover {
    background-color: #218838; /* Darker green on hover */
}

#code-input {
    padding: 0.8rem;
    width: 300px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 1rem;
    margin-bottom: 1rem;
}

#download-btn {
    display: inline-block;
    background-color: #28a745; /* Green theme */
    color: #fff;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.2rem;
    transition: background-color 0.3s, opacity 0.3s;
    cursor: not-allowed;
    opacity: 0.5;
}

#download-btn.enabled {
    cursor: pointer;
    opacity: 1;
}

#download-btn.enabled:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Slideshow */
.swiper-section {
    width: 80%;
    margin: 2rem auto;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

:root {
    --swiper-navigation-color: #28a745; /* Green theme */
    --swiper-pagination-color: #28a745; /* Green theme */
}

/* Footer */
footer {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.socials {
    margin-bottom: 1rem;
}

.socials a {
    color: #fff;
    margin: 0 1rem;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.socials a:hover {
    color: #28a745; /* Green theme */
}

.email a {
    color: #fff;
    text-decoration: none;
}

.email a:hover {
    text-decoration: underline;
}

/* Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .container, .swiper-section, .spacer-container {
        width: 95%;
        padding: 1.5rem;
    }

    .custom-text-box {
        width: 90%;
    }

    h2 {
        font-size: 1.8rem;
    }

    p, .about-section p {
        font-size: 1rem;
    }

    #code-input {
        width: 90%;
    }

    .socials a {
        margin: 0 0.5rem;
        font-size: 1.2rem;
    }
}

/* === NEW: Modern Idea Board Styles === */
.ideaboard-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    width: 90%;
    max-width: 1600px;
    margin: 2rem auto;
    align-items: flex-start;
}

.ideaboard-column {
    flex: 1;
}

.submit-column {
    min-width: 320px;
    flex-basis: 400px;
}

.ideas-column {
    flex-basis: 60%;
}

.ideas-column h2 {
    display: flex;
    justify-content: center; /* Center the icon */
    color: #28a745;
    font-size: 2.5rem; /* Make the icon larger */
    margin-bottom: 1.5rem;
    text-shadow: 0 0 15px rgba(40, 167, 69, 0.5); /* Add a subtle glow */
}

.idea-form-container {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.idea-form-container .form-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.idea-form-container .form-header .fa-lightbulb {
    font-size: 2rem;
    color: #ffd54f;
}

.idea-form-container h2 {
    margin: 0;
    font-size: 1.8rem;
}

.idea-form-container .form-intro {
    font-size: 1rem;
    color: #ccc;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #fff;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    font-size: 1rem;
    box-sizing: border-box; /* Important for width */
}

.submit-idea-btn {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    background-image: linear-gradient(90deg, #28a745, #218838);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-idea-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.approved-ideas-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column by default */
    gap: 1.5rem;
}

/* The .idea-card styles from admin page will be reused here, but we can add specifics */
.approved-ideas-grid .idea-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
    .ideaboard-wrapper {
        flex-direction: column;
    }
}

/* Admin Page Styles */
.admin-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    color: #fff;
}

.admin-table th, .admin-table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}

/* search highlight for matched tokens */
.search-highlight {
  background: #ffd54f;
  color: #000;
  padding: 0 2px;
  border-radius: 2px;
}

/* results count style (small, muted) */
#idea-search-count {
    color: #bdbdbd;
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-table thead th {
    background-color: rgba(40, 167, 69, 0.3); /* Green tint */
    color: #fff;
    font-weight: bold;
}

.admin-table tbody tr {
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s ease-in-out;
}

.admin-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.admin-table td:nth-child(2) { /* The 'Idea' column */
    max-width: 400px; /* Prevent very long text from breaking layout */
    word-wrap: break-word;
}

/* Admin Sub-navigation (Tabs) */
.admin-subnav {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
}

.admin-tab {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.admin-tab.active {
    background-image: linear-gradient(90deg, #28a745, #218838); /* Green theme */
    border-color: #28a745;
    box-shadow: 0 6px 18px rgba(33, 136, 56, 0.12);
}

.admin-canvas-link .signin-btn {
    padding: 0.6rem 1.2rem;
    background-image: linear-gradient(45deg, #218838 0%, #28a745 50%, #218838 100%); /* Green theme */
    font-weight: 600;
}

/* Approve / Reject Buttons in Admin Table */
.idea-action {
    padding: 0.35rem 0.6rem;
    margin-right: 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.idea-actions button:disabled {
    opacity: 0.6;
    cursor: default;
}

.user-role-select {
    background-color: #3a3a3a;
    color: inherit;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 8px;
    border-radius: 4px;
}

.user-delete-btn {
    background-color: #c82333;
    color: white;
}

/* === Admin Canvas Page Styles === */
.admin-canvas-page {
    background-color: #1a1a1a;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.canvas-toolbar .btn.primary {
    background-color: #28a745; /* Green theme */
    border-color: #28a745;
    font-weight: bold;
}

/* === Sidenav / Hamburger Menu Styles === */
.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow-x: hidden;
  transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  padding-top: 60px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidenav a {
  padding: 12px 15px 12px 32px;
  text-decoration: none;
  font-size: 1.25em;
  color: #a0a0a0;
  display: block;
  transition: 0.3s;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidenav a:last-of-type {
    border-bottom: none;
}

.sidenav-logout {
    margin-top: auto; /* Pushes it to the bottom */
    color: #ff6b6b !important; /* A distinct but not jarring red */
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-bottom: none !important;
}

.sidenav-logout:hover {
    background-color: rgba(255, 107, 107, 0.1) !important;
    color: #ff8f8f !important;
}

.sidenav a:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.sidenav .closebtn {
  position: absolute;
  top: 10px;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
  border-bottom: none;
  padding: 0 15px;
}

/* Hamburger Icon Animation */
.menu-icon {
  display: inline-block;
  transition: all 0.3s ease-in-out;
  position: relative;
  width: 30px;
  height: 24px;
  transform: rotate(0deg);
  cursor: pointer;
}

.menu-icon span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #fff;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.menu-icon span:nth-child(1) {
  top: 0px;
}

.menu-icon span:nth-child(2) {
  top: 10px;
}

.menu-icon span:nth-child(3) {
  top: 20px;
}

.menu-icon.open span:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.menu-icon.open span:nth-child(2) {
  transform: translateX(-10px);
  opacity: 0;
}

.menu-icon.open span:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Overlay for dimming effect */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Adjust content-wrapper for dimming */
.content-wrapper.dimmed {
  filter: brightness(0.5);
  transition: filter 0.4s ease-in-out;
}

/* === Lightbox Modal Styles === */
.lightbox-modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    padding-top: 60px; /* Location of the box */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.lightbox-modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1200px;
    animation-name: zoom;
    animation-duration: 0.4s;
}

@keyframes zoom {
    from {transform:scale(0)}
    to {transform:scale(1)}
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
}
