/* removes underline from link*/
a {
    text-decoration: none;
}

/*buttons in general on all pages*/
.button {
  padding: 12px 24px;
  min-height: 48px;
  border-radius: 20px;
  border: 2px solid #25aafc;
  font-weight: 600;
  font-size: 16px;
  font-family: "Poppins", "Segoe UI", Arial, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  width: 100px;
  white-space: nowrap;
  background-color: #e2dee8;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* Sign in (primary) */
.btn-login {
  background: rgba(255,255,255,0.25);
  color: rgb(140, 140, 140,0.9);
  box-shadow:
      0 4px 12px rgba(0,0,0,0.2);
 
}
.btn-login:hover {
  background: rgba(120,180,255,0.4);

  border-color: rgba(120,180,255,0.8);

  transform: scale(1.04);

  transition: all 0.25s ease;
}

.btn-login:focus-visible {
  outline: 3px solid rgba(37,170,252,0.45);
  outline-offset: 3px;
}

.input-group {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: #555;
  border: #2575fc;
}
.input-field {
  width: 280px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  background: #f9fafb;
  font-size: 14px;
  outline: none;
  margin-bottom: 16px;
  transition: all 0.2s ease;
}
.input-field:focus {
  border-color: #2575fc;
  background:rgb(255, 255, 255);
  box-shadow: 0 0 0 3px rgba(37,117,252,0.15);
}
label {
  display: block;
  margin-bottom: 6px;
  font-size: 25px;
  color: #555;
  text-align: center;
}
.input-group {
  margin-bottom: 18px;
}
.input-field::placeholder {
  color: #9ca3af;
  
}
body {
  position: relative;
  background: linear-gradient(
    135deg,
    #dbeafe 0%,   /* slightly darker blue (top-left) */
    #f5f7ff 50%,  /* light center */
    #e9d5ff 100%  /* slightly darker purple (bottom-right) */
  );
  min-height: 100vh;
}

body > :not(#penrose) {
  position: relative;
  z-index: 1;
}
.page {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  justify-content: center;   /* horizontal center */
  height: 100vh;  
}
.cards {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background: rgb(255, 255, 255);
  border-radius: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.top-bar {
  display: flex;
  justify-content: flex-end;
}
.Rpage{
  display: flex;
  justify-content: center;   /* horizontal center */
  align-items: center;       /* vertical center */
  height: 100vh;
  max-width: 400px;
  margin: 50px auto;
  margin-top: 40px;
  padding: 30px;
  padding-top: 0px;
  background: rgb(255, 255, 255);
  border-radius: 25px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  flex-direction: column;

}

.register-page {
  display: grid;
  min-height: 100vh;
  padding: 40px 20px;
  place-items: center;
  box-sizing: border-box;
}

.register-card {
  position: relative;
  overflow: hidden;
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 28px;
  background:
    linear-gradient(155deg, rgba(255,255,255,0.84), rgba(247,241,229,0.7) 48%, rgba(232,242,247,0.66)),
    rgba(255,255,255,0.58);
  box-shadow:
    0 28px 70px rgba(38, 48, 78, 0.24),
    0 0 0 1px rgba(214, 170, 74, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.92),
    inset 0 -1px 0 rgba(13, 51, 82, 0.05);
  box-sizing: border-box;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.register-badge {
  display: grid;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #8b6ee8);
  box-shadow: 0 10px 24px rgba(71, 116, 220, 0.28);
  font-size: 24px;
}

.register-card h1 {
  margin: 0;
  color: #2f3547;
  font: 700 30px/1.15 "Poppins", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.03em;
  text-align: center;
}

.register-intro {
  max-width: 320px;
  margin: 10px auto 26px;
  color: #71798c;
  font: 400 14px/1.5 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.register-form {
  display: grid;
  gap: 17px;
}

.auth-message {
  display: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  font: 600 13px/1.4 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.auth-message:not(:empty) {
  display: block;
}

.auth-message.error {
  color: #9a3445;
  background: #fff0f3;
}

.auth-message.success {
  color: #257451;
  background: #eafaf2;
}

.register-field label {
  display: block;
  margin: 0 0 7px;
  color: #42495a;
  font: 600 13px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: left;
}

.register-input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid #dfe3ec;
  border-radius: 13px;
  color: #303747;
  background: rgba(250,251,255,0.92);
  box-sizing: border-box;
  font: 400 15px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.register-input::placeholder {
  color: #a4aaba;
}

.register-input:focus {
  border-color: #4baafa;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(37,170,252,0.13);
}

.register-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 5px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #6f79e8);
  box-shadow: 0 10px 22px rgba(50, 125, 222, 0.25);
}

.register-submit:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #159de9, #626ade);
}

.register-login {
  margin: 22px 0 0;
  color: #7a8191;
  font: 400 13px/1.4 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.register-login a {
  color: #277fd1;
  font-weight: 700;
}

.register-login a:hover {
  text-decoration: underline;
}

.auth-home-button {
  width: 100%;
  min-height: 50px;
  margin-top: 22px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #6f79e8);
  box-shadow: 0 10px 22px rgba(50, 125, 222, 0.25);
}

.auth-home-button:hover {
  border-color: transparent;
  background: linear-gradient(135deg, #159de9, #626ade);
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(390px, calc(100% - 32px));
  padding: 34px;
  border: 1px solid rgba(255,255,255,0.82);
  background:
    linear-gradient(155deg, rgba(255,255,255,0.84), rgba(247,241,229,0.7) 48%, rgba(232,242,247,0.66)),
    rgba(255,255,255,0.58);
  box-shadow:
    0 28px 70px rgba(38, 48, 78, 0.24),
    0 0 0 1px rgba(214, 170, 74, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.92),
    inset 0 -1px 0 rgba(13, 51, 82, 0.05);
  box-sizing: border-box;
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.login-card::before,
.register-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 0%, rgba(214, 170, 74, 0.2), transparent 31%),
    radial-gradient(circle at 90% 14%, rgba(37, 170, 252, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.22), transparent 44%);
  pointer-events: none;
}

.login-card > *,
.register-card > * {
  position: relative;
  z-index: 1;
}

.login-logo-badge {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(12, 48, 82, 0.12);
  border-radius: 18px;
  background: #fbf4e9;
  box-shadow: 0 12px 26px rgba(12, 48, 82, 0.18);
}

.login-logo-badge img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  transform: none;
}

.login-card h1 {
  margin: 0;
  color: #2f3547;
  font: 700 30px/1.15 "Poppins", "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.03em;
  text-align: center;
}

.login-intro {
  margin: 9px 0 25px;
  color: #71798c;
  font: 400 14px/1.5 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 16px;
  width: 100%;
}

.login-card .input-group {
  width: 100%;
  margin: 0;
}

.login-card .input-group label {
  margin: 0 0 7px;
  color: #42495a;
  font: 600 13px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: left;
}

.login-card .input-field {
  width: 100%;
  min-height: 48px;
  margin: 0;
  box-sizing: border-box;
}

.login-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #6f79e8);
}

.profile-top-bar {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 5vw, 64px);
}

.profile-logout {
  width: auto;
  min-width: 96px;
}

.profile-page {
  display: grid;
  min-height: calc(100vh - 100px);
  padding: 20px 20px 70px;
  place-items: center;
  box-sizing: border-box;
}

.profile-card {
  width: min(520px, 100%);
  padding: 38px;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 28px;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 24px 60px rgba(61,72,110,0.2);
  box-sizing: border-box;
  text-align: center;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.profile-avatar {
  display: grid;
  width: 84px;
  height: 84px;
  margin: 0 auto 18px;
  place-items: center;
  border: 4px solid rgba(255,255,255,0.85);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #806ee8);
  box-shadow: 0 12px 28px rgba(65,106,205,0.28);
  font: 700 36px/1 "Poppins", "Segoe UI", Arial, sans-serif;
}

.profile-welcome {
  margin: 0 0 5px;
  color: #4680bd;
  font: 700 12px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.profile-card h1 {
  margin: 0;
  color: #2f3547;
  font: 750 34px/1.15 "Poppins", "Segoe UI", Arial, sans-serif;
}

.profile-handle {
  margin: 5px 0 27px;
  color: #8a91a1;
  font: 500 14px/1.3 "Poppins", "Segoe UI", Arial, sans-serif;
}

.profile-details {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  text-align: left;
}

.profile-details div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border-radius: 13px;
  background: rgba(241,244,250,0.9);
}

.profile-details span {
  color: #7b8394;
  font: 500 13px/1.3 "Poppins", "Segoe UI", Arial, sans-serif;
}

.profile-details strong {
  overflow-wrap: anywhere;
  color: #3b4354;
  font: 650 13px/1.3 "Poppins", "Segoe UI", Arial, sans-serif;
  text-align: right;
}

.profile-details .access-active {
  color: #25805b;
}

.profile-games-link {
  display: block;
  padding: 14px 18px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #25aafc, #6f79e8);
  box-shadow: 0 10px 22px rgba(50,125,222,0.22);
  font: 700 14px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.profile-games-link:hover {
  box-shadow: 0 14px 28px rgba(50,125,222,0.3);
  transform: scale(1.02);
}

@media (max-width: 520px) {
  .register-page {
    padding: 20px 14px;
  }

  .register-card {
    padding: 28px 22px;
    border-radius: 22px;
  }

  .register-card h1 {
    font-size: 26px;
  }
}

.home-hero {
    position: relative;
    top: -20px;
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.hero-kicker {
    margin: 0 0 10px;
    color: rgba(255,255,255,0.86);
    font: 700 clamp(17px, 2.5vw, 26px)/1.1 "Trebuchet MS", "Poppins", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow:
        0 0 10px rgba(255,255,255,0.46),
        0 0 18px rgba(100,150,255,0.52);
    opacity: 0;
    animation: fadeIn 2s forwards;
}

#title {
  
    margin: 0;
    opacity: 0;
    animation: fadeIn 2s forwards;
    font-size: 5rem;
    color: white;
    text-shadow:
        0 0 10px rgba(255,255,255,0.8),
        0 0 20px rgba(100,150,255,0.8),
        0 0 40px rgba(100,150,255,0.6);
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
#penrose {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}
nav {
    display: flex;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.home-top-bar {
    display: flex;
    width: min(1120px, calc(100% - 36px));
    margin: 22px auto 0;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: relative;
    z-index: 2;
}

.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #092f56;
    font: 800 20px/1.05 Georgia, "Times New Roman", serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.home-brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(12, 48, 82, 0.12);
    border-radius: 14px 14px 17px 17px;
    background: #fbf4e9;
    box-shadow: 0 8px 18px rgba(12, 48, 82, 0.16);
}

.home-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.home-top-line {
    flex: 1;
    height: 1px;
    min-width: 60px;
    background: linear-gradient(90deg, rgba(197,138,37,0.5), rgba(9,47,86,0.22), rgba(37,170,252,0.34));
    pointer-events: none;
}

#account-navigation {
    align-items: stretch;
}

.home-auth-button {
    display: inline-flex;
    width: 154px;
    min-width: 154px;
    max-width: 154px;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    padding: 9px 18px;
    align-items: center;
    justify-content: center;
    flex: 0 0 154px;
    appearance: none;
    -webkit-appearance: none;
    box-sizing: border-box;
    border: 1.5px solid rgba(9,47,86,0.26);
    border-radius: 999px;
    background:
        radial-gradient(circle at 18% 12%, rgba(244,199,93,0.22), transparent 34%),
        linear-gradient(135deg, rgba(255,253,247,0.9), rgba(229,242,250,0.72));
    color: #092f56;
    font-weight: 700;
    font-size: 16px;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    box-shadow:
        0 8px 18px rgba(5,33,62,0.11),
        inset 0 1px 0 rgba(255,255,255,0.92),
        inset 0 -1px 0 rgba(9,47,86,0.05);
    transition:
        color 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.home-auth-button:hover,
.home-auth-button:focus-visible {
    border-color: rgba(161,62,62,0.5);
    color: #9a3445;
    background:
        radial-gradient(circle at 18% 12%, rgba(244,199,93,0.26), transparent 34%),
        linear-gradient(135deg, rgba(255,250,250,0.94), rgba(255,238,242,0.82));
    box-shadow:
        0 10px 22px rgba(106,38,54,0.14),
        inset 0 1px 0 rgba(255,255,255,0.92);
    transform: translateY(-1px);
}

.category-gateway {
    display: flex;
    width: min(1080px, calc(100% - 40px));
    margin: 0 auto;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 0 60px;
    box-sizing: border-box;
}

.category-button {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr) 32px;
    gap: 34px;
    align-items: center;
    width: min(500px, 100%);
    flex: 1 1 420px;
    min-height: 112px;
    padding: 18px 22px;
    border: 2px solid #25aafc;
    border-radius: 22px;
    color: #31394d;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.34), rgba(255,255,255,0.14)),
      rgba(255,255,255,0.22);
    box-shadow:
      0 8px 20px rgba(0,0,0,0.12),
      inset 0 1px 0 rgba(255,255,255,0.56);
    box-sizing: border-box;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.category-button:hover {
    border-color: rgba(120,180,255,0.8);
    background:
      linear-gradient(135deg, rgba(120,180,255,0.24), rgba(255,255,255,0.2)),
      rgba(255,255,255,0.32);
    box-shadow:
      0 13px 28px rgba(0,0,0,0.16),
      inset 0 1px 0 rgba(255,255,255,0.68);
    transform: translateY(-3px);
}

.category-button:focus-visible {
    outline: 3px solid rgba(37,170,252,0.5);
    outline-offset: 4px;
}

.category-icon,
.games-heading-icon {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #25aafc, #7c70e8);
    box-shadow: 0 10px 24px rgba(64,111,214,0.28);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.category-icon {
    width: 68px;
    height: 68px;
    border: 1px solid rgba(255,255,255,0.74);
    border-radius: 19px;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.5), rgba(231,240,247,0.22)),
      rgba(255,255,255,0.22);
    box-shadow:
      0 10px 24px rgba(64,111,214,0.14),
      inset 0 1px 0 rgba(255,255,255,0.84);
    color: #2e688c;
    font-size: 25px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.word-category-icon {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 10px;
}

.word-category-icon span,
.card-category-icon span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 22px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 9px;
    background: rgba(255,255,255,0.58);
    box-shadow: 0 3px 8px rgba(54,70,110,0.1);
    font: 800 16px/1 "Poppins", "Segoe UI", Arial, sans-serif;
}

.word-category-icon span:nth-child(3) {
    grid-column: 1 / -1;
    color: #8f6794;
}

.card-category-icon {
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 10px;
    color: #8b4c6f;
}

.card-category-icon span {
    font: 800 18px/1 Georgia, "Times New Roman", serif;
}

.card-category-icon span:nth-child(2),
.card-category-icon span:nth-child(3) {
    color: #a13e3e;
}

.category-copy {
    min-width: 0;
    padding-left: 4px;
}

.category-copy strong {
    display: block;
    margin-bottom: 5px;
    font: 800 24px/1.08 "Trebuchet MS", "Poppins", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.01em;
}

.category-copy small {
    color: #5f687b;
    font: 600 14px/1.38 "Trebuchet MS", "Poppins", "Segoe UI", Arial, sans-serif;
}

.category-arrow {
    color: #477bd3;
    font-size: 30px;
    transition: transform 0.2s ease;
}

.category-button:hover .category-arrow {
    transform: translateX(6px);
}

.card-heading-icon {
    background: linear-gradient(135deg, #e8667d, #7457bd);
}

.card-eyebrow {
    color: #9b4c79;
}

.games-header {
    position: relative;
    z-index: 2;
    padding: 24px clamp(20px, 5vw, 64px);
}

.back-home {
    display: inline-flex;
    padding: 10px 16px;
    border: 1px solid rgba(255,255,255,0.75);
    border-radius: 999px;
    color: #465069;
    background: rgba(255,255,255,0.72);
    box-shadow: 0 8px 20px rgba(54,70,110,0.12);
    font: 650 14px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.back-home:hover {
    background: rgba(255,255,255,0.94);
    transform: translateX(-3px);
}

.games-page {
    width: min(1080px, calc(100% - 40px));
    margin: 28px auto 70px;
}

.home-games {
    width: min(1080px, calc(100% - 40px));
    margin: -48px auto 70px;
}

.home-invite {
    width: min(760px, 100%);
    margin: 0 auto 30px;
    color: rgba(255,255,255,0.92);
    font: 600 clamp(17px, 2.2vw, 22px)/1.4 "Trebuchet MS", "Poppins", "Segoe UI", Arial, sans-serif;
    text-align: center;
    text-shadow:
      0 2px 10px rgba(33,48,85,0.55),
      0 0 18px rgba(120,180,255,0.35);
}

.home-games .games-grid {
    align-items: stretch;
}

.home-games .game-card {
    border: 2px solid rgba(37,170,252,0.78);
    background: rgba(255,255,255,0.56);
}

.home-games .featured-game {
    box-shadow:
      0 18px 46px rgba(54,70,110,0.24),
      inset 0 1px 0 rgba(255,255,255,0.8);
    transform: translateY(-6px);
}

.home-games .featured-game:hover {
    transform: translateY(-11px);
}

.games-heading {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 32px;
}

.games-heading-icon {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    border-radius: 22px;
    font-size: 28px;
}

.games-eyebrow {
    margin: 0 0 3px;
    color: #337fc4;
    font: 700 12px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.games-heading h1 {
    margin: 0;
    color: #30384b;
    font: 750 clamp(34px, 5vw, 52px)/1 "Poppins", "Segoe UI", Arial, sans-serif;
    letter-spacing: -0.04em;
}

.games-heading div > p:last-child {
    margin: 8px 0 0;
    color: #697388;
    font: 400 15px/1.4 "Poppins", "Segoe UI", Arial, sans-serif;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.game-card {
    display: flex;
    min-height: 310px;
    padding: 18px;
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 24px;
    color: #31394d;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 16px 40px rgba(54,70,110,0.16);
    box-sizing: border-box;
    flex-direction: column;
    perspective: 900px;
    backdrop-filter: blur(13px);
    -webkit-backdrop-filter: blur(13px);
}

.game-card.available {
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.game-card.available:hover {
    box-shadow: 0 22px 48px rgba(54,70,110,0.25);
    transform: translateY(-5px);
    background: rgba(255,255,255,0.9);
}

.game-door {
    position: relative;
    display: block;
    width: 100%;
    height: 155px;
    padding: 13px 13px 17px;
    border: 1px solid rgba(165, 136, 92, 0.35);
    border-radius: 18px 18px 14px 14px;
    background:
      linear-gradient(90deg, rgba(255,255,255,0.62), rgba(228,218,201,0.58)),
      linear-gradient(135deg, rgba(216,229,232,0.66), rgba(252,244,229,0.78));
    box-shadow:
      inset 0 0 0 5px rgba(255,255,255,0.45),
      inset 0 -9px 0 rgba(118, 102, 78, 0.12),
      0 10px 22px rgba(54,70,110,0.14);
    box-sizing: border-box;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.game-door::before {
    content: "";
    position: absolute;
    inset: 8px 8px 12px;
    border: 2px solid rgba(255,255,255,0.72);
    border-radius: 12px;
    box-shadow:
      inset 0 0 0 1px rgba(69,82,110,0.12),
      0 0 0 1px rgba(89,93,102,0.08);
    pointer-events: none;
    z-index: 2;
}

.game-door::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #f6d77e;
    box-shadow:
      0 0 0 2px rgba(95,75,43,0.18),
      0 2px 5px rgba(51,42,31,0.28);
    z-index: 3;
}

.game-card.available:hover .game-door {
    filter: saturate(0.9) brightness(1.03);
    box-shadow:
      inset 0 0 0 5px rgba(255,255,255,0.5),
      inset 0 -9px 0 rgba(118, 102, 78, 0.1),
      0 15px 28px rgba(54,70,110,0.2);
    transform: rotateY(-7deg) translateX(2px);
}

.game-card img,
.future-game-icon {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-sizing: border-box;
}

.card-game-cover {
    display: grid;
    width: 100%;
    height: 155px;
    padding: 19px 34px;
    grid-template-columns: repeat(3, 1fr);
    place-items: center;
    border-radius: 17px;
    color: #ffffff;
    background:
      radial-gradient(circle at 24% 20%, rgba(255,255,255,0.2), transparent 28%),
      linear-gradient(135deg, #254f68, #493b72);
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
    font: 700 31px/1 Georgia, "Times New Roman", serif;
}

.card-game-cover span:nth-child(1),
.card-game-cover span:nth-child(4) {
    color: #ff8da1;
}

.card-game-cover span:nth-child(2),
.card-game-cover span:nth-child(3) {
    color: #8de0c3;
}

.card-game-cover span:nth-child(5) {
    color: #d5bbff;
}

.card-game-cover span:nth-child(6) {
    color: #add6ff;
}

.card-future-icon {
    color: rgba(92,65,112,0.45);
    font-size: 40px;
    letter-spacing: 0.16em;
}

.game-card img {
    display: block;
    object-fit: cover;
    filter: saturate(0.9) contrast(0.96);
}

.future-game-icon {
    display: grid;
    place-items: center;
    color: rgba(67,80,112,0.45);
    background:
      linear-gradient(135deg, rgba(230,239,255,0.9), rgba(236,228,255,0.9));
    font: 700 52px/1 Georgia, "Times New Roman", serif;
}

.anagram-icon {
    font-size: 35px;
    letter-spacing: 0.08em;
}

.tafl-card-art {
    display: grid;
    place-items: center;
    background:
      radial-gradient(circle at 50% 50%, rgba(240,195,91,0.2), transparent 34%),
      linear-gradient(135deg, rgba(45,27,87,0.9), rgba(9,47,86,0.78));
}

.tafl-mini-board {
    display: grid;
    width: min(118px, 72%);
    aspect-ratio: 1;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 4px;
    padding: 8px;
    border: 2px solid rgba(240,195,91,0.68);
    border-radius: 14px;
    background: rgba(255,248,235,0.16);
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
}

.tafl-mini-board i {
    position: relative;
    display: block;
    border-radius: 4px;
    background: rgba(255,248,235,0.32);
}

.tafl-mini-board i:nth-child(1),
.tafl-mini-board i:nth-child(5),
.tafl-mini-board i:nth-child(21),
.tafl-mini-board i:nth-child(25),
.tafl-mini-board i:nth-child(13) {
    background: rgba(240,195,91,0.78);
}

.tafl-mini-board i:nth-child(3)::after,
.tafl-mini-board i:nth-child(11)::after,
.tafl-mini-board i:nth-child(15)::after,
.tafl-mini-board i:nth-child(23)::after,
.tafl-mini-board i:nth-child(13)::after {
    content: "";
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background: #f8f0dc;
    box-shadow: 0 3px 6px rgba(0,0,0,0.22);
}

.tafl-mini-board i:nth-child(13)::after {
    border-radius: 30%;
    background: linear-gradient(135deg, #f0c35b, #c58a25);
}

.game-card-copy {
    display: flex;
    padding: 17px 4px 2px;
    flex: 1;
    flex-direction: column;
}

.game-card-copy strong {
    font: 700 21px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
}

.game-card-copy small {
    margin-top: 7px;
    color: #747d91;
    font: 400 13px/1.45 "Poppins", "Segoe UI", Arial, sans-serif;
}

.game-card-copy b {
    margin-top: auto;
    padding-top: 14px;
    color: #377fd1;
    font: 700 13px/1.2 "Poppins", "Segoe UI", Arial, sans-serif;
}

.home-footer {
    display: flex;
    width: min(1080px, calc(100% - 40px));
    margin: -30px auto 28px;
    padding: 18px 22px;
    align-items: center;
    justify-content: center;
    gap: 22px;
    border: 1px solid rgba(255,255,255,0.78);
    border-radius: 22px;
    color: #5f687b;
    background:
      linear-gradient(135deg, rgba(255,255,255,0.58), rgba(236,246,252,0.34));
    box-shadow:
      0 12px 28px rgba(54,70,110,0.13),
      inset 0 1px 0 rgba(255,255,255,0.82);
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: 700 13px/1.3 "Poppins", "Segoe UI", Arial, sans-serif;
}

.home-footer a {
    color: #277fd1;
    font-weight: 800;
}

.home-footer a:hover {
    text-decoration: underline;
}

.coming-soon {
    opacity: 0.72;
}

.coming-soon .game-card-copy b {
    color: #8a789f;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 800px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .home-games .featured-game,
    .home-games .featured-game:hover {
        transform: none;
    }

    .game-card {
        min-height: 280px;
    }
}

@media (max-width: 520px) {
    .home-top-bar {
        width: min(100% - 28px, 1120px);
        align-items: flex-start;
        flex-direction: column;
    }

    .home-brand {
        font-size: 17px;
    }

    .home-brand-mark {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        border-radius: 12px 12px 15px 15px;
    }

    .home-brand-mark img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: none;
    }

    #account-navigation {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .home-top-line {
        width: 100%;
        flex: none;
    }

    .home-footer {
        margin-top: -40px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .category-button {
        grid-template-columns: 52px minmax(0, 1fr) 22px;
        gap: 20px;
        padding: 15px;
    }

    .category-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 21px;
    }

    .word-category-icon,
    .card-category-icon {
        gap: 4px;
        padding: 7px;
    }

    .word-category-icon span,
    .card-category-icon span {
        min-height: 15px;
        border-radius: 7px;
        font-size: 12px;
    }

    .card-category-icon span {
        font-size: 14px;
    }

    .category-copy {
        padding-left: 2px;
    }

    .category-copy strong {
        font-size: 19px;
    }

    .games-heading {
        align-items: flex-start;
    }

    .games-heading-icon {
        width: 58px;
        height: 58px;
        border-radius: 17px;
        font-size: 23px;
    }
}

.game-tile {
    width: 250px;
    cursor: pointer;
    transition: transform 0.2s;
}

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