body {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 100%;
  background-color: white;
  width: 710px;
  margin: 1em auto;
  border: 1px solid black;
  border-radius: 1em;
  padding: 0 2em 2em 2em;
  min-height: 80vh;   /* ensures body fills full viewport */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
h1 {
  font-size: 150%;
  color: cornflowerblue;
  margin-bottom: 0.5em;
}
label {
  float: left;
  width: 10em;
}
input,
select {
  width: 10em;
  margin-right: 1em;
  margin-bottom: 1em;
}
input[type='checkbox'] {
  width: 2em;
}
header p {
  margin: 0 2em 1em 0;
}
#new_game,
#player,
#high_score,
#correct {
  float: left;
}
#cards img {
  height: 100px;
  width: 80px;
  padding-right: 5px;
  padding-bottom: 3px;
  float: left;
}
.clear {
  clear: both;
}
.hide {
  display: none;
}

.tabs {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
}

/* Style the buttons that are used to open the tab content */
.tabs button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

/* Change background color of buttons on hover */
.tabs button:hover {
  background-color: #ddd;
}

/* Create an active/current tablink class */
.tabs button.active {
  background-color: #ccc;
}

/* Style the tab content */
.tabcontent {
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}

/* Meet the designer */
.dark2{
    width: 50%;
    margin: 0 auto;
    color: cornflowerblue;
    height: 500px;
   
}
#food{
    text-align: left;
    margin-left: 5%;
	color: rgba(243, 100, 33);
    
}
#food1{
    text-align: left;
    margin-left: 5%;
    color:#00274C;
    margin-bottom: 30px;
}
.dark2 img{
    float: left;
    margin-right: 30px; 
    margin-bottom: 10px;    
}

.profile{
    margin-left: 5%;
    margin-top: 20px;
	text-align: left;
	
}

.profile h3{
    margin-top: 10px;
	text-align: center;
}


/* Footer Page  */
footer{
	padding-top: 25px;
	margin-top: auto;
	text-align: center;
}


/* =========================
   Mobile & Tablet (≤ 768px)
   ========================= */
@media (max-width: 768px) {
  /* Page shell */
  body {
    width: auto;            /* override fixed 710px */
    max-width: 100%;
    margin: 0;              /* use full screen width */
    border: none;
    border-radius: 0;
    padding: 12px;
  }

  h1 { font-size: 1.4rem; }

  /* Header: stop floating, allow wrapping */
  header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 10px;
  }
  header p { margin: 0; }
  #new_game, #player, #high_score, #correct { float: none; }

  /* Tabs: stack for easy tapping */
  .tabs { border-left: 0; border-right: 0; }
  .tabs button {
    float: none;            /* stop horizontal float row */
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
  }
  .tabcontent {
    padding: 10px 12px;
    border-left: 0;
    border-right: 0;
  }

  /* Forms: full-width controls */
  label { float: none; width: auto; display: block; margin: 8px 0 4px; }
  input, select {
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px 0;
  }
  input[type='checkbox'] { width: auto; }

  /* Cards: responsive grid, no right-side gap */
  #cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 fixed columns */
    grid-auto-flow: row;
    gap: 8px;
    width: 100%;
  }
 #cards img,
  #cards .card {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    float: none;
    padding: 0;
  }
  
  /* media query for meet your designer */
#food, #food1{
        text-align: center;
		display: flex;
		flex-wrap: wrap;
		padding-right: 20px;
    }
    
    .dark2 img{
        width: 300px;
        height: 300px;
		float: none;
        
    }
    
    .dark2{
		padding-right: 100px;
    }

	.profile h3{
		display: flex;
		flex-wrap: wrap;
		text-align: center;
	}
	
	
  footer {
    padding-top: 50px;
    padding-bottom: 30px;
  }
	
  #cards > .row { display: contents !important; } /* make row divs “vanish” to the grid */
  #cards > .clear { display: none !important; }  /* hide the trailing clear div */
  
  /* Utility */
  .clear { clear: both; }   /* keep for legacy, not needed with grid/flex */

/* Larger input boxes for mobile */
input[type="text"],
select,
input[type="button"] {
  font-size: 1rem;        /* increase text size */
  padding: 10px 12px;     /* taller boxes */
  height: 45px;           /* consistent height */
  border-radius: 6px;     /* smoother corners */
  box-sizing: border-box;
}

}

/* =========================
   Desktop safeguard (≥ 769px)
   Restore desktop behavior
   ========================= */
@media (min-width: 769px) {
  /* put rows back on desktop */
  #cards > .row { 
    display: block !important; 
  }
  /* show the legacy clear element again */
  #cards > .clear { 
    display: block !important; 
  }

  /* revert card sizing/floats for desktop */
  #cards {
    display: block !important;            /* cancel grid if any cached inline styles exist */
    width: auto;                           /* natural width */
  }
  #cards img {
    width: 80px !important;
    height: 100px !important;
    float: left !important;
    padding-right: 5px !important;
    padding-bottom: 3px !important;
  }
}
