/* ─────────────────────────────────────────────────────────────
   FORM & LAYOUT
   ───────────────────────────────────────────────────────────── */
   #formContainer {
    width: 80%;
    max-width: 600px;
    margin: 20px auto;
    text-align: center;
    box-sizing: border-box;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background: #fafafa;
  }
  #formatSelect{
      width: 50%;
  }
  .form-row {
    display: block;
    margin-bottom: 15px;
  }
  .form-row label {
    font-weight: bold;
    display: inline-block;
    min-width: 120px;
    text-align: right;
    margin-right: 5px;
  }
  .form-row input[type="number"],
  .form-row select {
    width: 150px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: box-shadow 0.3s ease;
  }
  .form-row input[type="number"]:focus,
  .form-row select:focus {
    outline: none;
    box-shadow: 0 0 5px #66aaff;
  }
  #generateBtn {
    padding: 10px 20px;
    margin-top: 10px;
    border: none;
    font-size: 1.2rem;
    color: #fff;
    background: linear-gradient(to right, #0099ff, #33cc33);
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite alternate;
  }
  #generateBtn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  }
  
  @keyframes pulse {
    0% {
      box-shadow: 0 0 0 rgba(0,0,0,0);
    }
    100% {
      box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }
  }
  
  /* ─────────────────────────────────────────────────────────────
     DOWNLOAD & PRINT BUTTONS STYLING
     ───────────────────────────────────────────────────────────── */
  .download-buttons {
    /* Flex layout with wrap & gap for extra space when wrapping */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
  }
  .download-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    font-size: 1rem;
    color: #fff;
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: pulse 2s infinite alternate;
  }
  .download-buttons button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
  }
  .btn-icon {
    width: 20px;
    height: 20px;
  }
  
  /* ─────────────────────────────────────────────────────────────
     TABLE CONTAINER
     ───────────────────────────────────────────────────────────── */
  #tableContainer {
    width: 95%;
    max-width: 850px;
    margin: 20px auto;
    text-align: center;
    box-sizing: border-box;
    /* Added horizontal scroll if content overflows & extra padding */
    overflow-x: auto;
    padding: 10px;
    position: relative;
  }
  table {
    border-collapse: collapse;
    margin: 0 auto;
  }
  td, th {
    border: 1px solid #ccc;
    padding: 8px 12px;
    min-width: 50px;
    text-align: center;
  }
  
  /* ─────────────────────────────────────────────────────────────
     FORMAT 1 – (We will override with JS)
     ───────────────────────────────────────────────────────────── */
  .format1 th {
    background-color: #eee;
    color: #ffffff;
  }
  
  /* ─────────────────────────────────────────────────────────────
     FORMAT 2 – row-based striping
     ───────────────────────────────────────────────────────────── */
  .format2 tr:nth-child(odd) {
    background-color: #ffe9b2;
  }
  .format2 tr:nth-child(even) {
    background-color: #dfffd8;
  }
  .format2 th {
    background-color: #ff6666;
    color: #fff;
  }
  
  /* ─────────────────────────────────────────────────────────────
     FORMAT 3 – horizontal gradient
     ───────────────────────────────────────────────────────────── */
  .format3 td, .format3 th {
    background: linear-gradient(to right, #e0f7fa, #b2ebf2);
  }
  .format3 th {
    background: linear-gradient(to right, #076816, #045c6f);
    color: #fff;
  }
  
  /* ─────────────────────────────────────────────────────────────
     Override corner cell for Formats 1,2,3,4,5
     ───────────────────────────────────────────────────────────── */
  .format1 tr:first-child th:first-child,
  .format2 tr:first-child th:first-child,
  .format3 tr:first-child th:first-child,
  .format4 tr:first-child th:first-child,
  .format5 tr:first-child th:first-child {
    background: #ffffff !important;
    color: #0f0303 !important;
  }
  
  /* ─────────────────────────────────────────────────────────────
     FORMAT 4 – black top row & left column, white corner
     ───────────────────────────────────────────────────────────── */
  .format4 tr:first-child {
    background-color: #000;
    color: #fff;
  }
  .format4 tr th:first-child {
    background-color: #000;
    color: #fff;
  }
  .format4 tr:nth-child(2n+2) {
    background-color: #f8f8f8;
  }
  .format4 tr:nth-child(2n+3) {
    background-color: #fff;
  }
  
  /* ─────────────────────────────────────────────────────────────
     FORMAT 5 – diagonal coloring logic in JS
     ───────────────────────────────────────────────────────────── */
  .format5 th {
    font-weight: bold;
  }
  
  /* ─────────────────────────────────────────────────────────────
     SCROLL TIP FOR TABLE PREVIEW
     ───────────────────────────────────────────────────────────── */
  #scrollTip {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 50px;
    color: #000;
    animation: blink 1s infinite;
    cursor: pointer;
    z-index: 999;
  }
  @keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
  }
  
  /* ─────────────────────────────────────────────────────────────
     TIP ICON + TEXT ALIGNMENT
     ───────────────────────────────────────────────────────────── */
  .tip-container {
    /* Use flex so icon and text sit side by side */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
  }
  .tip {
    /* Adjust icon size as desired and preserve blinking */
    width: 100px;
    margin-right: 10px;
    animation: blink 1s infinite;
  }
  .tipText {
    /* Ensure text does not shrink too narrowly */
    max-width: 80%;
    text-align: left;
  }
  