@import url('https://fonts.googleapis.com/css2?family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Anton&display=swap');


*, ::before, ::after {
    box-sizing: border-box;
}

.custom-input {
    padding: 1px 2px;
    max-width: 100%;
    min-width: 0px;
    border: 2px solid black;
    background-color: white;
    cursor: text;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.6;
    color: black;
    font-family: "Open Sans", sans-serif;
	margin-top: 10px;
}

.submit-button {
    background: linear-gradient(to bottom, #fffe22, #cccb1b);
    border: none;
    border-radius: 4px;
    color: black;
    padding: 4px;
    text-align: center;
    font-size: 16px;
	font-weight: bold;
    cursor: pointer;
    margin-top: 10px; 
}

body {
    background-color: #0e1117;
    font-family: 'Open Sans', sans-serif;
    color: rgb(250, 250, 250);
    margin: 0px;
    padding: 0;
    font-weight: 400;
    line-height: 1.6;
}

/* h1 styling */
h1 {
    font-family: 'Anton', sans-serif;
    font-size: 85px;
    letter-spacing: 2px;
    color: #000;  /* Text color */
    -webkit-text-stroke: 1px #ed9911;  /* Inner stroke for Webkit browsers */
    padding: 5px;
    text-align: center;
    text-shadow:
    5px 5px 0 #000000,  /* Outer stroke */
    -2px -2px 0 #000000,  
    2px -2px 0 #000000,
    -2px 2px 0 #000000,
    2px 2px 0 #000000;
}

#header {
    background-image: url('path/to/your/image.jpg');
    background-size: cover;  /* Stretch to fit */
    background-repeat: no-repeat;  
    background-position: center;  
    height: 100px; 
}

.title-container {
	height: 250px;
    width: 100%;
	margin-bottom: 0 !important;   /* REMOVE gap under header */
    padding-bottom: 0 !important;
    padding-top: 25.00%; /* This is 100% divided by the aspect ratio, which is approximately 3 */
    background-color: #F7DA21;
    background-image: url('{{ url_for('static', filename='images/buzzkillheader.png') }}');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.word-length {
	font-weight: bold;
	font-size: 1.2em;
}

.title-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.title-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Maintain aspect ratio, may cut off parts of the image */
}

/* Font size based on viewport width for h1, h2, h3 */
h1, h2, h3 {
    font-size: 4vw;
}

/* Font size based on viewport width for h1, h2, h3 */
h1, h2, h3 {
    font-size: 4vw; /* Adjust based on your preference */
}

/* Media query for smaller screens */
@media (max-width: 768px) {
    h1, h2, h3 {
        font-size: 36px; 
    }

    .title-container {
        background-size: contain; /* Ensure the whole image is visible */
        background-position: top center; /* Adjust position if necessary */
        height: 150px; 
    }

    /* title image scaling on smaller screens */
    .title-img {
        object-fit: contain; 
    }
}

.title-wrapper h1 {
    flex-shrink: 1; /* Allow the text to shrink */
    min-width: 100px;
    white-space: nowrap; /* Prevent text from wrapping to the next line */
}

.title-text {
    margin-left: 30px;
    margin-right: auto;
}

/* Subtitle Container */
.subtitle-container {
	width: 100%;
    text-align: center;
    color: f7da21;
    padding: 5px;
    background-color: black;
    font-weight: bold;
}

.summary-count {
  margin: 8px 0 12px;
}

.count-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  background: #0f131d;
  border: 1px solid rgba(255,255,255,.06);
  color: #ffdd33;
  font-weight: 700;
}


/* Input Container */
.input-container {
    width: 100%;  /* Make it the same width as the container */
    margin: 0; 
    padding: 0;  
    box-sizing: border-box;
}

.input-container label {
    font-size: 16px;
    color: #ffffff;
    margin-top: 10px;
    display: block; /* makes the label a block-level element, helping in layout */
}

.custom-input:focus {
    outline: 2px solid #F7DA21; /* Set outline color */
}


.container {
    width: 75%;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

input[type="text"] {
    border: 2px solid black;
    text-transform: uppercase;
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
	
}

/* Matching words */
.matching-words h2 {
    font-size: 24px;
}

.pangram {
    font-weight: bold;
    color: yellow;
}

.error-message {
    color: red;
    font-size: 14px;
}

#copyright {
    text-align: left;
    font-size: small;
    margin-top: 10px;
    color: white; 
}

#copyright a,
#copyright a:visited {
    text-decoration: none;
    color: inherit; 
	
}

/* --- Toggle row (checkbox + label + help) --- */
.input-toggle-row {
  display: flex;
  align-items: middle;
  gap: 4px;
  position: relative;
  margin: var(--s-16) 0;

  min-height: 16px; /* Ensure consistent height */
}

/* Checkbox + label */
.bk-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 20px;
  line-height: 24px;
  margin: 0; /* Remove any default margins */
}

.bk-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bk-box {
  width: 24px;
  height: 24px;
  border: 2px solid var(--bk-accent);
  border-radius: 6px;
  background: transparent;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  flex-shrink: 0; /* Prevent shrinking */
}

.bk-toggle:hover .bk-box {
  box-shadow: 0 0 6px rgba(255, 221, 51, .6);
  transform: scale(1.03);
}

.bk-toggle input[type="checkbox"]:checked + .bk-box {
  background: var(--bk-accent);
  border-color: var(--bk-accent);
}

.bk-toggle input[type="checkbox"]:checked + .bk-box::after {
  content: "✓";
  color: var(--bk-accent-ink);
  font-size: 16px;
  font-weight: 900;
  line-height: 20px;
  position: absolute;
  left: 6px;
  top: 0;
}

.bk-text {
  color: var(--bk-accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  height: 24px;
  white-space: nowrap; /* Prevent text wrapping */
}

/* Help (?) button + tooltip */
.info-tip {
  width: 20px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: var(--bk-accent);
  color: var(--bk-accent-ink);
  font-size: 14px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bk-accent);
  cursor: pointer;
  position: relative;
  z-index: 3;
  transition: transform .15s ease, box-shadow .15s ease;
  flex-shrink: 0; /* Prevent shrinking */
  margin: 0; /* Remove any default margins */
}

.info-tip:hover {
  transform: scale(1.06);
  box-shadow: 0 0 8px rgba(255, 221, 51, .8);
}

.info-tip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: var(--bk-accent);
  border: 1px solid var(--bk-accent);
  padding: 8px 12px;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease-in-out;
  z-index: 9999;
}

.info-tip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--bk-accent);
  opacity: 0;
  transition: opacity .2s ease-in-out;
  z-index: 10000;
}

.info-tip:hover::after,
.info-tip:hover::before {
  opacity: 1;
}


/* ====== BuzzKill Design Tokens ====== */
:root{
  --bk-bg: #0e1117;
  --bk-surface: #121621;
  --bk-surface-2: #0f131d;
  --bk-text: #fafafa;
  --bk-subtle: #b9c0cf;
  --bk-accent: #ffdd33;
  --bk-accent-ink: #000;

  /* spacing scale */
  --s-2: 2px;
  --s-4: 4px;
  --s-6: 6px;
  --s-8: 8px;
  --s-12: 12px;
  --s-16: 16px;
  --s-20: 20px;
  --s-24: 24px;
  --s-32: 32px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-1: 0 6px 20px rgba(0,0,0,.25);
  --shadow-2: 0 10px 30px rgba(0,0,0,.35);
}

body { background: var(--bk-bg); color: var(--bk-text); }

/* ====== Layout Cards ====== */
.container { max-width: 960px; width: 90%; }

.card {
  background: var(--bk-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
  padding: var(--s-24);
  margin-top: var(--s-24);
}

/* Hero/banner with rounded corners */
.hero {
  border: 10px solid #1d212a !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f7da21;
  box-shadow: var(--shadow-1);
  margin: var(--s-24) 0 var(--s-16);
}
.hero__img {
  width: 100%;
  aspect-ratio: 3.2 / 1;     /* keeps nice banner height */
  background: #f7da21 center/contain no-repeat;
  /* your image is still set inline in HTML via style attr */
}

/* Subtitle sits on the hero edge like a pill */
.subtitle-container {
  display: inline-block;
  margin: var(--s-12) 0 var(--s-16);
  padding: var(--s-8) var(--s-12);
  background: var(--bk-surface-2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius-sm);
  color: var(--bk-accent);
  font-weight: 700;
}

/* ====== Inputs & Buttons ====== */
.input-container { margin: var(--s-16) 0; }

.input-container label {
  display: block;
  margin-bottom: var(--s-6);
  color: var(--bk-text);
  font-weight: 600;
  font-size: 14px;
}

.custom-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 2px solid #000;
  background: #fff;
  color: #000;
  font-weight: 700;
}
.custom-input:focus {
  outline: none;
  border-color: var(--bk-accent);
  box-shadow: 0 0 0 3px rgba(255,221,51,.35);
}

/* Button */
.submit-button {
  display: inline-flex;
  gap: var(--s-8);
  align-items: center;
  background: linear-gradient(to bottom, #fffe22, #cccb1b);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-weight: 800;
  box-shadow: 0 3px 0 rgba(0,0,0,.3);
  transform: translateY(0);
  transition: transform .05s ease, box-shadow .1s ease;
  margin-top: var(--s-12);
}
.submit-button:active {
  transform: translateY(1px);
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
}

/* ====== Toggle Row Alignment ====== */
.input-toggle { margin: var(--s-12) 0 var(--s-20); }

.bk-toggle {
  display: inline-flex;
  align-items: center;            /* centers everything vertically */
  gap: var(--s-12);
  line-height: 1;                 /* removes extra baseline wobble */
}

.bk-toggle input[type="checkbox"] {
  position: absolute; opacity: 0; pointer-events: none;
}

.bk-box {
  width: 24px; height: 24px;
  border: 2px solid var(--bk-accent);
  border-radius: 6px;
  background: transparent;
  display: inline-block;
  position: relative;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.bk-toggle:hover .bk-box { box-shadow: 0 0 6px rgba(255,221,51,.6); transform: scale(1.03); }

.bk-toggle input[type="checkbox"]:checked + .bk-box {
  background: var(--bk-accent);
  border-color: var(--bk-accent);
}
.bk-toggle input[type="checkbox"]:checked + .bk-box::after {
  content: "✓";
  color: var(--bk-accent-ink);
  font-size: 16px; font-weight: 900; line-height: 24px;
  position: absolute; left: 6px; top: -1px;
}

.bk-text { color: var(--bk-accent); font-weight: 700; }

/* Tooltip tweak so it sits perfectly centered with the row */
.info-tip { margin-left: 2px; transform: translateY(2px); }

/* ====== Results ====== */
.matching-words h2 {
  font-size: 18px;
  margin: var(--s-16) 0 var(--s-8);
  color: var(--bk-text);
}
.word-length { font-weight: 800; font-size: 0.95rem; color: var(--bk-subtle); }
.pangram { font-weight: 900; color: var(--bk-accent); }

/* ====== Footer ====== */
#copyright { color: var(--bk-subtle); margin-top: var(--s-16); }

/* ====== Responsive ====== */
@media (max-width: 720px){
  .container { width: 92%; }
  .card { padding: var(--s-16); }
  .matching-words h2 { font-size: 16px; }
}

.subtitle-standalone {
    margin-top: 0;              /* remove gap ABOVE */
    padding-top: 0;
    margin-bottom: 25px;        /* keep spacing BELOW */
    font-size: 1.1rem;
    text-align: center;
    background-color: transparent !important;
    padding-bottom: 0 !important;
}

/* Remove the space under the yellow banner */
.hero {
  margin-bottom: 0 !important;
}

/* Keep no space above the subtitle */
.subtitle-standalone {
  margin-top: -6px !important;  /* pull it up slightly */
}
