@import url('https://fonts.googleapis.com/css?family=Work+Sans:900');

/* Base reset for margin and padding */
body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* Align elements at the top */
  background-color: #f2f2f2;
}

#fridge-area {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90%;
  width: 90%;
}

#fridge {
  background: linear-gradient(135deg, #e0e0e0, #c0c0c0);
  width: 22%;
  height: 100%;
  border-radius: 10px;
  position: relative;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  margin-right: 200px; /* Space between fridge and storage */
}

#fridge .door {
  flex: 1;
  background: linear-gradient(135deg, #d9d9d9, #b3b3b3);
  margin: 5px;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

#fridge .door:first-child {
  margin-bottom: 0;
}

#fridge .door-handle {
  width: 10px;
  height: 40px;
  background: #666;
  border-radius: 5px;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

#storage {
  width: 30%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}


#storage h3 {
  width: 100%;
  text-align: center;
  margin: 0;
  padding: 5px;
  font-size: 1.2rem;
  color: #333;
}

#dropdown-container {
  width: 100%;
  margin-bottom: 10px;
  text-align: center;
}

#category-dropdown {
  margin-top: 10px;
  padding: 5px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
  width: 80%;
}

#magnet-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
}


.magnet {
  font-size: 2rem; /* Base font size for all magnets */
  cursor: grab;
  margin: 5px;
}

.magnet img {
  pointer-events: none; /* Disable pointer events for images */
}

/* Styling for Countries (if needed) */
.countries-style {
  font-size: 1.8rem;
  color: #333; /* Darker color for countries */
}

#reset-button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 1rem;
  background-color: #021319;
  color: #ffffff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s;
}

#reset-button:hover {
  background-color: #4966ff;
}

#category-dropdown {
  margin: 10px 0;
  padding: 5px;
  font-size: 1rem;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.hidden {
  display: none;
}

.country-image {
  width: 50px; /* Adjust size as needed */
  height: auto;
  object-fit: cover;
  cursor: grab;
}



/* Define colors for the letters */
:root {
  --color-1: #44af69;
  --color-2: #f8333c;
  --color-3: #fcab10;
  --color-4: #2b9eb3;
}

/* Base styles for letters */
.letters-style {
  font-family: 'Work Sans', sans-serif;
  font-weight: 900;
  font-size: 2rem;
  margin: 10px;
  cursor: grab;
  text-transform: uppercase;
  display: inline-block;
}

/* Apply colors and random rotation */
/*Idea taken from https://codepen.io/cassie-codes/pen/vWgzoK */

.letters-style:nth-child(4n+1) {
  color: var(--color-1);
  transform: rotate(-10deg);
}

.letters-style:nth-child(4n+2) {
  color: var(--color-2);
  transform: rotate(10deg);
}

.letters-style:nth-child(4n+3) {
  color: var(--color-3);
  transform: rotate(-5deg);
}

.letters-style:nth-child(4n+4) {
  color: var(--color-4);
  transform: rotate(5deg);
}


.category {
  display: none; /* All categories are hidden by default */
}

.category.active {
  display: flex; /* Only active category is displayed */
  flex-wrap: wrap;
  gap: 10px;
}


@media (max-width: 1024px) {
  
  #fridge-area {
    flex-direction: column; /* Stack fridge and storage vertically */
    align-items: center;
    height: auto;
    padding: 20px;
  }

  #fridge {
    width: 0%; /* Fridge takes more space */
    height: 400px; /* Increase height for emphasis */
    margin-right: 0;
    margin-bottom: 20px; /* Spacing between fridge and storage */
  }

  #fridge .door {
    margin: 5px; /* Maintain aesthetic spacing for doors */
  }

  #fridge .door-handle {
    width: 10px;
    height: 40px; /* Keep the handle proportional */
    right: 10px;
  }

  #storage {
    width: 70%; /* Storage takes less space */
    height: auto;
    padding: 10px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  #storage h3 {
    font-size: 1rem; /* Adjust heading size */
  }
}

@media (max-width: 768px) {
  #fridge {
    width: 5%; /* Fridge dominates on smaller screens */
    height: 350px;
  }

  #fridge .door-handle {
    width: 8px; /* Adjust handle size */
    height: 35px;
  }

  #storage {
    width: 65%; /* Storage reduced further */
    padding: 8px;
  }
}

@media (max-width: 480px) {
  #fridge {
    width: 90%; /* Nearly full screen for fridge */
    height: 600px; /* Compact height */
  }

  #fridge .door-handle {
    width: 6px;
    height: 30px; /* Adjust handle for compact layout */
  }

  #storage {
    width: 100%; /* Minimized storage */
    padding: 6px;
  }

  #storage h3 {
    font-size: 0.9rem; /* Smaller heading for small screens */
  }
}
