/* Mobile-first styles */

@font-face {
    font-family: 'nunitomedium';
    src: url('nunito-medium.eot');
    src: url('nunito-medium.eot?#iefix') format('embedded-opentype'),
         url('nunito-medium.woff2') format('woff2'),
         url('nunito-medium.woff') format('woff'),
         url('nunito-medium.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  font-family: 'Nunito', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 0.75rem;
  background-color: #fff;
  transition: border 0.3s, box-shadow 0.3s;
  width: 100%;
  box-sizing: border-box;
  outline: none;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4CAF50; /* or use a brand-accent color */
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2); /* green glow */
}

select:disabled {
    opacity: 1;
    color: #444;
}


/* input:focus, 
select:focus,
textarea:focus {
  border-image: linear-gradient(45deg, red, orange, yellow, green, cyan, blue, violet) 1;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 0 10px rgba(255, 0, 150, 0.3);
  border-radius: 0.75rem;
} */

label {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.4rem;
  display: block;
}

body {
  margin: 0;
  font-family: 'nunitomedium';
  overflow-x: hidden;
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  z-index: 9999; /* on top of everything */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

#splash-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1; /* behind logo */
  filter: brightness(0.7); /* darken video for contrast */
}

#splash-logo img {
  max-width: 200px;
  max-height: 200px;
  z-index: 10;
}

#flocklogo {
  background-image: url('../img/feathert.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  height: 40px;
  width: 80px;
}

.bgi {
  position: absolute;
  top: 50px;
  right:0px;
  bottom:0px;
  left:0px;
  background-image: url('../img/back.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.3;
}

.topbar {
  display: flex;
  align-items: center;
  background: #4CAF50;
  color: white;
  height:50px;
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.topbar {
  background: linear-gradient(
    270deg,
    #4CAF50, #E53935, #1E88E5, #FFEB3B, #FB8C00, #4CAF50
  );
  background-size: 1200% 1200%;
  animation: rainbowShift 35s ease infinite;
  color: white;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

#toggleSidebar {
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  margin-right: 1rem;
}

.sidebar {
  position: fixed;
  top: 3.1rem; /* height of topbar */
  left: 0;
  width: 120px;
  height: calc(100% - 3.5rem);
  background: #333;
  color: white;
  padding: 1rem;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 2;
}

.sidebar.open {
  transform: translateX(0);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 1rem 0;
}

.sidebar a {
  color: white;
  text-decoration: none;
}

.main-content {
  padding: 1rem;
  /* width: calc(100vw - 0px); */
  height: calc(100vh - 60px);
  position: absolute;
  top: 50px;
  left:0px;
  right:0px;
  box-sizing: border-box;
  overflow-y:auto;
}

button {
  background: linear-gradient(
    270deg,
    #4CAF50, #E53935, #1E88E5, #FFEB3B, #FB8C00, #4CAF50
  );
  background-size: 1200% 1200%;
  animation: rainbowShift 35s ease infinite;
  color: white;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  min-width: 80px;
  width: 80px;
}

button:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

button:active {
  transform: translateY(1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2) inset;
}

button#installBtn {
  background: unset !important;  /* Remove rainbow background */
  padding: 0;
  color: #4CAF50;
  box-shadow: none;
  animation: none !important;
  cursor: pointer;
  border: none;
}

/* Tablet & up */
@media (min-width: 768px) {
  .sidebar {
    transform: translateX(0);
    position: static;
    height: calc(100vh - 82px);
    width: 120px;
  }

  .topbar {
    justify-content: space-between;
  }

  #toggleSidebar {
    display: none;
  }

  body {
    display: flex;
    flex-direction: column;
  }

  main.main-content {
    left: 150px;
    margin-top: 0;
    width:calc(100% - 150px);
  }

  header.topbar > h1 {
    margin-left: 20px;
  }
}

/* Add to css/style.css */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.card {
  background: rgba(119, 117, 117, 0.5);
  padding: 0.5rem 0.5rem;
  flex: 1 1 90px;
  min-width: 150px;
  text-align: center;
  background: rgba(255, 255, 255, 0.25); /* Modern glassy white */
  backdrop-filter: blur(3px); /* Subtle glass effect */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;

   border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card img {
  width:100%;
  height:auto;
}

.card-inner > div {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

@media (max-width: 600px) {
  .card-container {
    flex-direction: column;
  }

  .dashboard .card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2%;
    justify-content: center;
  }

  .dashboard .card-container .card {
    width: 100%;
    min-width: 140px;
    margin-bottom: 1rem;
  }
}

@media (max-width: 600px) {
  table {
    width: 100%;
    border-collapse: collapse;
  }

  table tr {
    display: block;
    margin-bottom: 1rem; /* space between rows */
  }

  table th,
  table td {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.25rem 0;
  }

  table th {
    font-weight: bold;
    margin-bottom: 0.25rem;
  }

  table td input,
  table td select {
    width: 100%;
    box-sizing: border-box;
  }
}

/*bird cards*/

/* Only affect cards in birds.html */
.bird-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.bird-cards .card {
  flex: 0 1 calc(50% - 1rem);
  box-sizing: border-box;

  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(3px);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 1rem;
  padding: 1.5rem;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bird-cards .card-inner {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Distribute space evenly */
  gap: 1.5rem; /* Add space between image and text */
  width: 100%;
  position:relative;
  
}

.bird-cards .card-img {
  flex: 0 0 150px; /* Increase image area */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  width: 150px;
  overflow: hidden;
  background: #f5f5f5;
  border-radius: 8px;
}

.bird-cards .card-img img {
  width: 140px;
  height: 140px;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor:pointer;
}

.bird-cards .card-info {
  flex: 1;
  padding: 0; /* Remove left padding for better centering */
  text-align: left;
}

@media (max-width: 950px) and (min-width: 700px) {
  .bird-cards {
    flex-direction: column;
    align-items: center;
  }
  .bird-cards .card {
    width: 100%;
    min-width: 0;
    max-width: 350px;
  }
}

@media (max-width: 700px) {
  .bird-cards {
    flex-direction: column;
    align-items: center;
  }

  .bird-cards .card {
    flex: 0 1 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .bird-cards .card-inner {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .bird-cards .card-img {
    width: 60vw;      /* Make image container 60% of viewport width */
    height: 60vw;     /* Keep it square */
    max-width: 350px; /* Optional: limit max size */
    max-height: 350px;
    margin-bottom: 0.5rem;
  }
  .bird-cards .card-img img {
    width: 50vw;      /* At least 50% of viewport width */
    height: 50vw;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }
  .bird-cards .card-info {
    padding: 0;
    text-align: center;
  }
  
  .card-inner button {
    width: 100%;
    min-width: 0;
  }

  .card-inner p {
    width:100%;
  }
}

#birdwrap .card-inner .card-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.25rem;
  }
#birdwrap .card-inner .card-info h3 {
  order: 1;
  margin-bottom: 0.2em;
}
#birdwrap .card-inner .card-info p:nth-child(2) {
  order: 2; /* Species */
  margin-bottom: 0.2em;
}
#birdwrap .card-inner .card-info p:nth-child(3) {
  order: 3; /* Gender */
}



/* Bird detail layout: image and info columns */
.bird-detail-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.bird-detail-img {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  align-items: center;
  justify-content: left;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("../img/feather.png");
  position: relative;
}

#editpic {
  width:30px;
  height:30px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("../img/edit_square.png");
  position: absolute;
  bottom: 0px;
  display:none;
}

#AddbirdBtn {
 margin-top: 9px;
}

.bird-detail-info {
  flex: 1 1 0;
  min-width: 220px;
}

.bird-detail-info > table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.bird-detail-info th,
.bird-detail-info td {
  vertical-align: top;
  padding: 0.25rem 0.5rem;
}

.bird-detail-info th {
  width: 40%;
  text-align: left;
  font-weight: 600;
  color: #333;
  vertical-align: middle;
}

.bird-detail-info td {
  /* width: 70%; */
  text-align: left;
  color: #444;
}

.bird-detail-info td input,
.bird-detail-info td select {
  /* width: 70%; */
  text-align: left;
  color: #444;
}

#birdImgInput {
  visibility: hidden;
}

/* Responsive: stack columns on mobile */
/* @media (max-width: 700px) {

  .bird-detail-container {
    flex-direction: column;
    align-items: center;
  }
  .bird-detail-img,
  .bird-detail-info {
    max-width: 50%;
    width: 50%;
    flex: none;
  }

  .bird-detail-info > table {
    width: 100%;
  }
  .bird-detail-info th,
  .bird-detail-info td {
    width: 100%;
    display: block;
    text-align: left;
    padding-left: 0;
    padding-right: 0;
  }
  .bird-detail-info tr {
    display: block;
    margin-bottom: 1rem;
  }
  
} */

@media (max-width: 1450px) {
  .bird-detail-container {
    flex-direction: column;
    align-items: center;
  }
  .bird-detail-img,
  .bird-detail-info {
    max-width: 50%;
    width: 50%;
    flex: none;
    height: 300px;
  }
}