/* GRIDTEST */
/* 
Colors
#b5b2b5 - bg grey
#6b8ec6 - primary blue

#450e45 - Kickstart background color 
#f2a788 - Kickstart text and floppy drive color

#f72000 - Guru meditation error Red
#f7ae00 - Guru Orange
#f7ee00 - Guru Yellow
#5cfc0d - Guru Green
* 
* https://github.com/justinzero/amiga.css/
* 
* Basic CSS Components for Kickstarting your web site into Amiga Workbench 3.1 

Author: https://github.com/justinzero
*/

html, body {
   width: 100%;
   height: 100%;
}

/* Base reset & box-sizing */
html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------- */
/* Body */
body {
  display: flex;             /* enable flex layout */
  flex-wrap: wrap;           /* allow windows to move to next row */
  justify-content: center;   /* center horizontally */
  align-items: flex-start;   /* align to top */
  gap: 10px;                 /* spacing between windows (both rows & columns) */
  
  font-family: 'Press Start 2P', monospace;
  font-size: 1.25em;
  line-height: 1.5;
  color: #000;
  background-color: #b5b2b5;
  cursor: url('./assets/amiga-cursor.png'), auto;
  margin: 0;
  padding: 20px;             /* optional padding from edges */
}

  /* When sidebar is hidden */
body.sidebar-hidden .content {
  margin-left: 20px;
}


/* ---------------------------------------------------------- */
/* Content container */
.content {
  margin-left: 270px;    /* leave space for sidebar + some gap */
  padding: 20px;
  display: flex;          /* flex layout for windows */
  flex-wrap: wrap;        /* allow windows to wrap to new rows */
  justify-content: flex-start; /* align to left */
  gap: 40px;              /* spacing between windows (rows & columns) */
}


/* ---------------------------------------------------------- */
/* Windows */
/* --- Windows --- */
.window {
  box-sizing: border-box;
  background-color: #aaa;
  border: 6px solid transparent;
  border-color: #fff #000 #000 #fff;
  min-width: 1400px;   /* increased from 300px */
  max-width: 1550px;   /* increased from 450px */
  min-height: 200px;
  height: auto;
  padding: 1rem;
  resize: both;
  overflow: hidden;
}

/* Optional: wider window variant */
.window-wider {
  min-width: 1700px;  /* increased from 500px */
  max-width: 1900px;  /* increased from 700px */
}

/* Optional: shorter window variant */
.window-less-height {
  min-width: 1300px;
  max-width: 1450px;
  min-height: 100px;
  height: auto;
}

/* ---------------------------------------------------------- */
/* Grid layout (downloads, music, etc.) */
.download-grid,
.music-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px; /* spacing between rows and columns */
  width: 100%;
  margin-top: 20px;
}

/* Individual grid items */
.download-item,
.music-item {
  padding: 15px;
  border-radius: 8px;
  background-color: #f9f9f9;
}

/* ---------------------------------------------------------- */
/* Sidebar adjustments */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background-color: #222;
  padding-top: 20px;
  box-sizing: border-box;
  z-index: 1000;
  transition: left 0.3s ease;
}

.sidebar.hidden {
  left: -220px;
}

.sidebar ul li {
  margin: 15px 0;
}

.sidebar ul li a {
  color: #eee;
  text-decoration: none;
  font-weight: bold;
  padding: 10px 20px;
  display: block;
}

.sidebar ul li a:hover,
.sidebar ul li a:focus {
  background-color: #444;
  color: #fff;
}

/* Sidebar toggle button */
#sidebar-toggle {
  position: fixed;
  top: 15px;
  left: 15px;
  background: #222;
  color: #eee;
  border: none;
  padding: 10px 15px;
  font-size: 20px;
  cursor: pointer;
  z-index: 1100;
  border-radius: 4px;
}

/* ---------------------------------------------------------- */
/* Helper classes */
.spacer {
  height: 40px; /* add extra spacing if needed */
}


a, button {
   cursor: inherit; /* replace with wb crosshair later */
   outline: none;
}

a {
   text-decoration: none;
   color: #450e45;
}

a:hover {
   color: #fff;
   background-color: #6b8ec6;
}

button {
   font: inherit;
   background-color: inherit;
   position: relative;
   display: inline-block;
   padding: 1rem 1rem;
   margin: 4px;
   text-align: center;
   vertical-align: middle;
   border-style: solid;
   border-width: 4px 6px 4px 6px;
   border-color: #fff #000 #000 #fff;
   transition: background-color 0.3s ease, border-color 0.3s ease;
}


button:hover {
  background-color: #6b8ec6; /* Primary blue */
  border-color: #fff #450e45 #450e45 #fff;
  color: #fff;
}


button:active {
   background-color: #999;
   border-color: #000 #fff #fff #000;
}

/* Fixed: Changed 'window resizer' to '.window-resizer' and 'window wrap' to '.window-wrap' */
.window {
   box-sizing: border-box;
   background-color: #aaa;
   margin: 40px auto;   
   min-height: 200px;
   max-width: 1200px; 
   width: 80%;
   height: 50%;
   border-style: solid;
   border-width: 6px 3px 6px 3px;
   border-color: #fff #000 #000 #fff;
   overflow: hidden;
   resize: both;
}

.window:active {
   background-color: #999;
   border-color: #000 #fff #fff #000;
   height: 100px;
}

/* Corrected selector .window-resizer */
.window-resizer {
  width: 100px;
  height: 100px;
  background: white;
  overflow: hidden;
  resize: both;
}

/* Corrected selector .window-wrap */
.window-wrap {
  width: min-content;
  position: relative;
}

.window-wider {
   box-sizing: border-box;
   background-color: #aaa;
   margin: 50px auto;   
   min-height: 200px;
   width: 80%;
   height: 200%;
   border-style: solid;
   border-width: 6px 3px 6px 3px;
   border-color: #fff #000 #000 #fff;
   overflow: hidden;
   resize: both;
}

.window-wider:active {
   background-color: #999;
   border-color: #000 #fff #fff #000;
}

.window-less-height {
   box-sizing: border-box;
   background-color: #aaa;
   margin: 50px auto;   
   min-height: 200px;
   width: 60%;
   height: 30%;
   border-style: solid;
   border-width: 6px 3px 6px 3px;
   border-color: #fff #000 #000 #fff;
   overflow: hidden;
   resize: both;
}

.window-less-height:active {
   background-color: #999;
   border-color: #000 #fff #fff #000;
}

.title-bar {
   padding: 0.6rem;
   padding-left: 2rem;
   background-color: #6b8ec6;
   color: #000000;
   border-bottom: 2px solid #000000; 
   overflow: hidden;
   white-space: nowrap;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.title-bar .btn:hover {
  box-shadow: 0 0 8px #6b8ec6;
  transform: scale(1.1);
}

/* Disabled drag functionality on title bar using pointer-events */
.window-title {
   display: inline-block;
   vertical-align: center;
   pointer-events: none; /* Disables drag functionality on the title bar */
}

.window p {
   padding: 2rem;
   display: inline-block;
   line-height: 1.6;
}

.center-buttons {
   text-align: center;
   padding: 2em;
}

.right-buttons {
   text-align: right;
   padding: 2em;
}

.left-buttons {
   text-align: left;
   padding: 2em;
}

#crashModal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 1.0);
  color: #f72000;
  font: inherit;
}

.gurubox {
   width: 100%;
   box-sizing: border-box;
   border: 12px solid #f72000;
   text-align: center;
   padding: 1em;
   animation: failBlink 2s infinite;
}

@keyframes failBlink {
   0% {border-color: #f72000;}
   49% {border-color: #f72000;}
   50% {border-color: transparent;}
   99% {border-color: transparent;}
   100% {border-color: #f72000;}
}

@media (max-width: 800px) {

  /* Sidebar collapses offscreen */
  .sidebar {
    left: -220px;
  }

  .sidebar.active {
    left: 0;
  }

  #sidebar-toggle {
    display: block;
  }

  .content {
    margin-left: 20px;
    padding: 20px 15px;
  }

  .window,
  .window-wider,
  .window-less-height {
    width: 95%;
    min-width: unset;
  }

  .download-grid,
  .music-grid {
    grid-template-columns: 1fr; /* single column on small screens */
  }
}

/* Title Bar for Windows (with Minimize and Close buttons) */
.title-bar {
   padding: 0.6rem;
   padding-left: 2rem;
   background-color: #6b8ec6;
   
   color: #000000;
   border-bottom: 2px solid #000000; 
   overflow: hidden;
   white-space: nowrap;
   position: relative; /* Ensure buttons are aligned */
}

.title-bar .btn {
   position: absolute;
   pointer-events: all; /* Ensures buttons are clickable */
   top: 50%;
   transform: translateY(-50%);
   width: 20px;
   height: 20px;
   background-color: #fff;
   color: #000;
   border: 2px solid #000;
   border-radius: 50%;
   cursor: pointer;
}

.title-bar .minimize-btn {
   right: 30px;
}

.title-bar .close-btn {
   right: 10px;
}

/* Window Hidden When Minimized */
.window.minimized {
   display: none;
}

/* Add some hover effects to the buttons */
.title-bar .btn:hover {
   background-color: #6b8ec6;
   color: #fff;
}

.icon {
   width: 60px;
   height: 80px;
   text-align: center;
   margin: 10px;
   cursor: pointer;
   background-color: #f7f7f7;
   border: 2px solid #6b8ec6;
   border-radius: 10px;
   box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
     transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon:hover {
  transform: scale(1.1);
  box-shadow: 0 0 12px #6b8ec6;
  border-color: #6b8ec6;
  cursor: pointer;
}

.icon img {
   width: 40px;
   height: 40px;
   margin-bottom: 5px;
}

.icon p {
   font-size: 0.8em;
   color: #450e45;
}

/* Make FontAwesome icons larger or styled */
.fas {
    font-size: 1.5em;  /* Increase icon size */
    color: #450e45;    /* Change icon color */
}

.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
}

.popup-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh; /* Limit height to 80% of the viewport */
    overflow-y: auto; /* Enable vertical scrolling */
    text-align: center;
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 24px;
}

.close:hover {
  color: #f72000;
  transform: scale(1.2);
  transition: color 0.3s ease, transform 0.3s ease;
}

.donation-section, .organizations-section {
    margin: 20px 0;
}

.org-logo, .qr-code {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.donate-link {
    display: inline-block;
    margin: 10px 0;
    color: #007BFF;
    text-decoration: none;
}

.disclaimer {
    font-size: 0.9em;
    color: #666;
}

/* Style for the scrollable list */
.scrollable-list {
    display: flex;
    overflow-x: auto;
    padding: 0;
    margin: 10px 0;
}

.scrollable-list li {
    list-style: none;
    margin-right: 10px;
}

.scrollable-list li a {
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.scrollable-list li a:hover {
    background-color: #007BFF;
    color: white;
}

/* Buttons to switch between platforms */
.platform-btn {
    padding: 10px;
    margin: 5px;
    background-color: #ddd;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

.platform-btn:hover {
    background-color: #007BFF;
    color: white;
     transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.platform-btn:hover {
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
  transform: translateY(-2px);
}

.download-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.download-table a:hover {
  color: #f7a500; /* Guru Orange */
  text-decoration: underline;
}

.download-table th,
.download-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.download-table th {
    background-color: #f2f2f2;
}

.download-table a {
    text-decoration: none;
    color: #007bff;
}

.download-table a:hover {
    text-decoration: underline;
}



.platform-selector {
    margin-bottom: 10px;
}

.platform-btn {
    margin-right: 10px;
    padding: 5px 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

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

.package-options ul {
    list-style-type: none;
    padding: 0;
}

.package-options li {
    margin: 5px 0;
}

.package-options a {
    text-decoration: none;
    color: #007bff;
}

.package-options a:hover {
    text-decoration: underline;
}

.screenshot-container {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.game-screenshot {
    max-width: 80%;  /* Max width relative to the container */
  max-height: 60vh; /* Max height relative to viewport height */
  height: auto;    /* Keep aspect ratio */
  margin: 0 auto;  /* Center horizontally */
  display: block;  /* So margin auto works */
  border-radius: 8px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.game-screenshot:hover {
  transform: scale(1.05);
}


.filter-menu {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-options label {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Modal Styles */
.game-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent background */
}

.game-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Adjust width as needed */
}

.close-btn {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 25px;
    font-family: Arial, sans-serif;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-screenshot-container img {
    width: 100%;
    margin: 10px 0;
    max-width: 100%;
}

/* Modal Carousel Styles */
#modal-screenshots {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

#modal-screenshots .carousel-slide {
    display: none; /* Hide all slides by default */
}

#modal-screenshots .carousel-slide.active {
    display: block; /* Show only the active slide */
}

#modal-screenshots img {
    width: 100%;
    max-width: 100%;
    margin: 10px 0;
}

/* Style the "Click here to access more info" text */
.info-text {
    font-size: 14px;
    color: #007bff;
    cursor: pointer;
    text-decoration: underline;
    margin-bottom: 10px;
}

.info-text:hover {
    color: #0056b3;
}

.carousel-container {
    position: relative;
    width: 80%;
    overflow: hidden;
    text-align: center;
}

.carousel-inner {
    display: flex;
    transition: transform 0.3s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    display: none; /* Hide all slides by default */
    text-align: center;
}

.carousel-slide.active {
    display: block; /* Show only the active slide */
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    font-size: 18px;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.manual-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    padding: 1rem;
    max-height: 80vh;
    overflow: hidden;
}

.manual-image-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.manual-text-area {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
    font-family: 'Georgia', serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    border-left: 2px solid #ccc;
    padding-left: 1rem;
}

.manual-description {
    margin-top: 0;
}

.organization {
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-family: Arial, sans-serif;
}

/* Unique backgrounds for each organization */

/* logo color: #2185d0 (bright blue) 
   → Best with a soft neutral/light contrast to avoid "blue on blue" */
.organization.codeberg {
    background-color: #f0f4f9; /* very light grey-blue */
    color: #000; /* black text for contrast */
}

/* logo color: #51152e (deep burgundy) 
   → Works best with muted teal/green tones (complementary) */
.organization.disroot {
    background-color: #15514a; /* dark teal */
    color: #fff; /* white text */
}

/* logo color: #704233 (earthy brown) 
   → Needs a soft cream/beige to bring warmth + readability */
.organization.tavern {
    background-color: #f5f0eb; /* warm beige */
    color: #000; /* dark text */
}

/* logo color: #5e42a6 (purple) 
   → Works beautifully with a soft contrasting lavender or dark neutral */
.organization.verdanditeam {
    background-color: #2e1a47; /* deep indigo-purple */
    color: #fff; /* white text */
}


.organization a {
    color: #ffd700; /* gold/yellow links */
    text-decoration: none;
}

.organization a:hover {
    text-decoration: underline;
}

.music-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.music-item {
    background-color: #2e1a47;
    color: white;
    padding: 10px;
    border-radius: 8px;
}

/* Make embedded videos responsive */
.music-item iframe {
    width: 100%;   /* Fill the parent width */
    height: auto;  /* Maintain aspect ratio */
    aspect-ratio: 16 / 9; /* Keeps 16:9 ratio */
     border: none;
    border-radius: 5px; /* Optional rounding */
}


.music-item a {
    color: #ffd700;
    text-decoration: none;
}

.music-item a:hover {
    text-decoration: underline;
}

.filter-options label {
    display: block;
    margin-bottom: 5px;
}

.platform-icons {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.platform-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.external-players {
    margin: 10px 0 15px;
    font-size: 0.9em;
}

.external-players a {
    margin-right: 15px;
    text-decoration: none;
    color: #009800;
}

.external-players a:hover {
    text-decoration: underline;
}
