* {
  box-sizing: border-box;
}

.soft-sparkle {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.9);

  box-shadow:
    0 0 4px rgba(255, 255, 255, 0.8),
    0 0 10px rgba(255, 255, 255, 0.4);

  transform: translate(-50%, -50%);

  animation: floatSparkle 1.6s ease-out forwards;

  z-index: 9999;
}

@keyframes floatSparkle {

  0% {
    opacity: 0.9;

    transform:
      translate(-50%, -50%)
      scale(1);
  }

  100% {
    opacity: 0;

    transform:
      translate(
        calc(-50% + var(--driftX)),
        calc(-50% + var(--driftY))
      )
      scale(1.6);
  }

}

body {
  margin: 0;

  font-family: "Segoe UI", Arial, sans-serif;

  background-image: url("background.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  color: #222;

  text-transform: lowercase;
}

/* NAV */

.win7-nav {
  width: min(100% - 4rem, 1470px);

  margin: 1.2rem auto 1.8rem;

  padding: 0.5rem 0.9rem;

  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;

  background:
    linear-gradient(
      to bottom,
      #ddebf4 0%,
      #c7dcea 42%,
      #b9d0df 43%,
      #d8e9f3 100%
    );

  border: 1px solid #9aaab2;

  border-radius: 10px;

  box-shadow:
    0 0 0 1px rgba(88, 104, 112, 0.85),
    0 0 0 4px rgba(202, 221, 230, 0.72),
    0 0 0 5px rgba(241, 248, 251, 0.9),
    inset 0 1px 0 rgba(255,255,255,0.96),
    inset 0 0 0 1px rgba(167,190,200,0.65),
    0 4px 8px rgba(0,0,0,0.14);
}

.win7-nav a {
  color: #1d1d1d;

  text-decoration: none;

  font-size: 0.95rem;
  line-height: 1;

  padding: 0.45rem 0.8rem;

  border-radius: 5px;

  border: 1px solid transparent;
}

.win7-nav a:hover {
  background: rgba(255,255,255,0.45);

  border-color: rgba(140,165,178,0.7);
}

.win7-nav a.active {
  background:
    linear-gradient(
      to bottom,
      #ffffff 0%,
      #e7f1f6 48%,
      #d3e3eb 52%,
      #f0f6f9 100%
    );

  border: 1px solid #8d9da6;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.96),
    0 1px 0 rgba(255,255,255,0.35);
}

h1,
h2,
h3,
p,
li,
button,
span {
  font-weight: 400;

  text-transform: lowercase;
}

/* PAGE */

.recipes-shell {
  width: min(100% - 4rem, 1520px);

  margin: 0 auto 2rem;

  padding: 1rem 1.6rem 1.6rem;

  overflow: visible;
}

.recipe-grid {
  display: grid;

  grid-template-columns: repeat(5, 1fr);

  gap: 2.3rem;

  overflow: visible;
}

.recipe-card {
  position: relative;

  background: #efefef;

  border: 1px solid #9aaab2;

  border-radius: 10px;

  padding: 1.1rem;

  cursor: pointer;

  overflow: visible;

  transition: transform 0.18s ease;

  box-shadow:
    0 0 0 1px rgba(88,104,112,0.85),
    0 0 0 4px rgba(202,221,230,0.72),
    0 0 0 5px rgba(241,248,251,0.9),
    inset 0 1px 0 rgba(255,255,255,0.96),
    inset 0 0 0 1px rgba(167,190,200,0.65),
    0 4px 8px rgba(0,0,0,0.14);
}

.recipe-card:hover {
  transform: translateY(-2px);

  z-index: 10;
}

.card-text {
  padding: 0;
}

.card-text h2 {
  margin: 0 0 0.35rem;

  font-size: 0.98rem;
}

.card-text p {
  margin: 0;

  font-size: 0.9rem;

  color: #666;
}

.recipe-view {
  margin-top: 0;

  display: none;
}

.hidden {
  display: none;
}

body.recipe-open #recipe-view {
  display: block;
}

/* LOGIN SCREEN */

#login-overlay {
  position: fixed;

  inset: 0;

  width: 100vw;
  height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 999999;
}

.win7-login {
  width: 520px;

  display: flex;
  flex-direction: column;
  align-items: center;

  margin-top: -70px;
}

/* AVATAR */

.login-avatar {
  width: 170px;
  height: 170px;

  margin-bottom: 28px;

  border-radius: 18px;

  border: 2px solid rgba(255,255,255,0.95);

  box-shadow:
    0 0 0 1px rgba(71,108,129,0.95),
    0 0 0 5px rgba(202,228,241,0.72),
    inset 0 1px 0 rgba(255,255,255,0.95),
    inset 0 -10px 20px rgba(0,0,0,0.10),
    0 10px 20px rgba(0,0,0,0.22);

  overflow: hidden;

  position: relative;

  background: transparent;
}

.login-avatar img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: center;

  display: block;
}

/* USERNAME */

.login-username {
  margin-bottom: 28px;
  
  font-size: 42px;
  font-weight: 300;
  line-height: 1;

  color: white;

  text-shadow:
    0 1px 3px rgba(0,0,0,0.7);
}

/* FORM */

.login-fields {
  width: 100%;

  display: flex;
  flex-direction: column;
  align-items: center;
}

/* PASSWORD ROW */

.password-row {
  width: 350px;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  margin: 0 auto;

  transform: translateX(14px);
}

/* INPUT */

.login-fields input {
  width: 292px;
  height: 40px;

  padding: 0 12px;

  border: 2px solid #6f8ea3;
  border-radius: 4px;

  background: #ffffff;

  color: #222;

  font-size: 16px;
  font-family: "Segoe UI", Arial, sans-serif;

  appearance: none;
  -webkit-appearance: none;

  box-shadow:
    inset 0 1px 2px rgba(0,0,0,0.08),
    0 0 0 1px rgba(255,255,255,0.25);
}

.login-fields input:focus {
  outline: none;

  border-color: #5ca7d8;

  box-shadow:
    0 0 8px rgba(94,174,228,0.45),
    inset 0 1px 2px rgba(0,0,0,0.08);
}

/* BUTTON */

#login-btn {
  margin-left: 16px;

  width: 42px;
  height: 42px;

  flex-shrink: 0;

  padding: 0;

  border-radius: 50%;

  border: 1px solid #5b89a8;

  cursor: pointer;

  display: flex;
  justify-content: center;
  align-items: center;

  color: white;

  font-size: 22px;
  font-weight: bold;
  line-height: 1;

  background:
    linear-gradient(
      to bottom,
      #dff4ff 0%,
      #79c0ea 45%,
      #53a5d9 46%,
      #5eb2e2 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.92),
    0 2px 4px rgba(0,0,0,0.22);

  transition:
    filter 0.12s ease,
    transform 0.12s ease;
}

#login-btn:hover {
  filter: brightness(1.05);
}

#login-btn:active {
  transform: translateY(1px);
}

/* ERROR */

#login-error {
  min-height: 18px;

  margin-top: 14px;

  color: #7b0000;

  font-size: 13px;

  text-shadow:
    0 1px 0 rgba(255,255,255,0.4);
}

/* CANCEL */

.cancel-btn {
  margin-top: 7px;

  min-width: 120px;

  padding: 8px 22px;

  text-align: center;

  color: #222;

  text-decoration: none;

  font-size: 15px;
  font-family: "Segoe UI", Arial, sans-serif;

  border-radius: 8px;

  border: 1px solid #8b9aa3;

  background:
    linear-gradient(
      to bottom,
      #fefefe 0%,
      #edf3f7 45%,
      #d8e2e9 55%,
      #eef4f8 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 1px 2px rgba(0,0,0,0.16);

  transition:
    filter 0.12s ease,
    transform 0.12s ease;
}

.cancel-btn:hover {
  filter: brightness(1.03);
}

.cancel-btn:active {
  transform: translateY(1px);
}