/* Font import from original menu.css */
@import url('https://fonts.googleapis.com/css?family=Fira+Sans:300i');

/* Global page styles */

html {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh; /* Ensure body can grow with content */
    background: #000000;
    color: #ffffff;
    font-family: 'Fira Sans', Helvetica, sans-serif;
    font-style: italic;
    margin: 0; /* Ensure no default margin causes overflow */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.menu-wrapper {
    position: fixed;        /* MODIFIED: Fixed positioning */
    top: 0;                 /* MODIFIED: Stick to the top */
    left: 0;                /* MODIFIED: Stick to the left */
    width: 100%;            /* MODIFIED: Full width */
    height: 17vh;           /* MODIFIED: Define its height explicitly */
    z-index: 1000;          /* MODIFIED: Ensure it's on top of other content */
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Keeps .frame at the bottom of this 15vh space */
    /* NEW: Add transition for height change */
    transition: height 0.3s ease-in-out;
}

/* NEW: When menu is open, adjust wrapper height */
.menu-wrapper.open {
    height: 100vh; /* Full height when open on mobile */
    align-items: flex-start; /* Align items to top for vertical list */
}

#main-content {
    padding-top: 17vh; /* This MUST match the height of .menu-wrapper */
    box-sizing: border-box;
	display: flex;
    justify-content: center;
    /* NEW: Add transition for padding-top */
    transition: padding-top 0.3s ease-in-out;
}

/* NEW: Adjust main-content padding when menu is open */
#main-content.menu-open {
    padding-top: 100vh; /* Push content down when menu is full height */
}

#content-inner-wrapper {
    width: 1100px;
    max-width: 90%;
    padding-bottom: 40px;
    box-sizing: border-box;
}

.frame {
  width: 900px;
  height: 100px;
  border-radius: 2px;
  overflow: hidden;
  background: #000000;
  color: #333;
  /* NEW: Add transition for width and height */
  transition: all 0.3s ease-in-out;
}

/* NEW: Frame adjustments when menu is open (mobile) */
.menu-wrapper.open .frame {
    width: 100%; /* Take full width on mobile */
    height: auto; /* Allow height to expand based on content */
    border-radius: 0;
}


.center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
}

.boxes {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: 100%;
  /* NEW: Add transition for flex-direction changes */
  transition: all 0.3s ease-in-out;
}

/* NEW: Mobile menu (when .menu-wrapper is open) */
.menu-wrapper.open .boxes {
    flex-direction: column; /* Stack items vertically */
    height: auto; /* Allow height to grow */
    padding-top: 50px; /* Space for burger icon and top content */
}

.boxes .box {
  position: relative;
  flex: 1 1 auto;
  width: 20%;
  transition: all .5s ease-in-out;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* NEW: Adjust box styles for mobile menu */
.menu-wrapper.open .boxes .box {
    width: 100%; /* Full width */
    height: 70px; /* Consistent height for each item */
    border-bottom: 1px solid #1a1a1a; /* Separator */
    justify-content: flex-start; /* Align text to left */
    flex: none; /* Do not flex grow */
}

.boxes .box .text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  font-size: 1rem;
  color: transparent;
  transition: all .5s ease-in-out;
  white-space: nowrap;
}

/* NEW: Text and icon adjustments for mobile menu */
.menu-wrapper.open .boxes .box .text {
    position: static; /* Remove absolute positioning */
    transform: none; /* Remove transform */
    color: white; /* Always visible */
    font-size: 1.2rem;
    margin-left: 2rem; /* Indent text */
    opacity: 1;
    white-space: nowrap;
}

.menu-wrapper.open .boxes .box .icon {
    display: none; /* Hide slash icon on mobile */
}


.boxes .box.one .text {
  margin-left: 1rem;
}

.boxes .box.two .text {
  margin-left: 1rem;
}

.boxes .box.six {
  width: 80%;
}
.boxes .box.six .text {
  transform: translate(-50%, -50%) scale(1);
  color: white;
  margin-left: 1rem;
}

/* NEW: Default state of boxes on desktop, and for mobile when menu is closed */
.boxes .box:hover {
  width: 100%;
}
.boxes .box:hover .text {
  color: #fff;
  transform: translate(-50%, -50%) scale(1);
}

/* NEW: Override hover for mobile menu (when open) */
.menu-wrapper.open .boxes .box:hover {
    width: 100%; /* No width change on hover */
    background-color: #333; /* Highlight on hover */
}
.menu-wrapper.open .boxes .box:hover .text {
    color: #fff;
    transform: none; /* Keep text normal */
}


.box .icon {
  color: white;
  font-size: 1rem;
  padding-left: 1.3rem;
}

.static-end-slash {
    background-color: black;
    color: white;
    padding: 0em 0em;
    border-radius: 0px;
    margin-left: 0px;
    display: inline-flex;
    align-items: center;
    font-size: 1rem;
    align-self: center;
    padding-left: 1.3rem;
}

/* NEW: Hide static-end-slash in mobile menu */
.menu-wrapper.open .static-end-slash {
    display: none;
}


.logo-container {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo-container img {
    max-width: 100%;
    height: auto;
}

.page-content {
    box-sizing: border-box;
    width: 100%;
}

.code-project-page header {
    text-align: center;
    margin-bottom: 30px;
	box-sizing: border-box;
}

.code-project-page .tagline {
    font-size: 1.2em;
    font-style: italic;
    color: #ccc;
}

.page-content section,
.code-project-page section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #1a1a1a;
    border-radius: 5px;
	box-sizing: border-box;
}

.code-project-page h3 {
    margin-top: 0;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.download-section .download-links {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
	box-sizing: border-box;
}

.download-section .download-item {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    border: 1px solid #333;
    border-radius: 4px;
	box-sizing: border-box;
}

.download-section .download-item h4 {
    margin-top: 0;
}

.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #757575;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    text-align: center;
	box-sizing: border-box;
}

.button:hover {
    background-color: #0056b3;
}

.donate-button img {
    border: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.screenshot-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
	box-sizing: border-box;
}

.screenshot-item {
    flex-basis: calc(50% - 15px);
    max-width: calc(50% - 15px);
    text-align: center;
}

.screenshot-item img {
    max-width: 100%;
    height: auto;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #333;
}

.screenshot-item figcaption {
    margin-top: 5px;
    font-size: 0.9em;
    color: #aaa;
}

.important-disclaimer {
    border-left: 5px solid #ffc107;
    background-color: #29251a;
}


/* Burger Menu Styles */
.burger-menu {
    position: absolute;
    top: 20px; /* Adjust as needed */
    right: 20px; /* Adjust as needed */
    width: 30px;
    height: 20px;
    display: none; /* Hidden by default, shown on mobile */
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001; /* Ensure it's above menu items */
}

.burger-menu .bar {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease-in-out;
}

/* Animation for burger to close icon */
.burger-menu.open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu.open .bar:nth-child(2) {
    opacity: 0;
}

.burger-menu.open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Media Queries for Mobile */
@media (max-width: 768px) {
    /* Show burger menu on mobile */
    .burger-menu {
        display: flex;
    }

    /* Hide the default desktop menu on mobile */
    .frame, .boxes {
        display: none;
        flex-direction: column; /* Ensure items stack when menu is open */
        height: 100%; /* Ensure boxes take full height when shown */
        justify-content: flex-start; /* Align content to top */
    }

    /* When menu is open, show and re-style .frame and .boxes */
    .menu-wrapper.open .frame {
        display: block; /* Show frame */
        width: 100%;
        height: 100%; /* Occupy full height of wrapper */
        overflow-y: auto; /* Allow scrolling if menu items exceed height */
        padding-top: 60px; /* Space for burger icon */
    }

    .menu-wrapper.open .boxes {
        display: flex; /* Show boxes */
        width: 100%;
        height: auto; /* Allow content to dictate height */
        align-items: flex-start;
		flex-direction: column-reverse;
    }

    .menu-wrapper.open .static-end-slash {
        display: none; /* Hide static slash in mobile menu */
    }

    /* Adjust main content padding when menu is active on mobile */
    #main-content {
        padding-top: 17vh; /* Default when menu is closed */
    }

    /* Keep original responsive adjustments for content */
    .download-section .download-links {
        flex-direction: column;
    }

    .screenshot-item {
        flex-basis: 100%;
        max-width: 100%;
    }
}

.play-store-badge img {
    height: 100px; /* Adjust height as needed */
    width: auto;
}