* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    color: #2c3e50;
}

h1 {
    color: #fff;
    text-align: center;
    margin: 0 0 20px 0;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cont {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    column-gap: 24px;
    row-gap: 8px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.f1 { flex: 0 0 auto; }
.f2 {
    flex: 0 1 auto;
    text-align: right;
}

.f1 p {
    color: #1a237e;
    margin: 0 0 8px 0;
    font-weight: 600;
    font-size: 15px;
}

.sele {
    font-weight: 600;
    font-size: 16px;
    min-width: 150px;
    height: 38px;
    padding: 4px 10px;
    border: 1px solid #b0bec5;
    border-radius: 8px;
    background: white;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    color: #1a237e;
}

/* ---------- 3D buttons ---------- */
.button {
    display: inline-block;
    text-align: center;
    width: 150px;
    height: 40px;
    line-height: 40px;
    color: white;
    font-weight: 600;
    font-size: 15px;
    border-radius: 10px;
    margin: 5px 0 5px 10px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    border: none;
}

.button1 {
    background: linear-gradient(180deg, #4facfe 0%, #0288d1 100%);
    box-shadow: 0 4px 0 #01579b, 0 6px 12px rgba(0, 0, 0, 0.28);
}
.button1:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #01579b, 0 8px 14px rgba(0, 0, 0, 0.32);
}
.button1:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #01579b, 0 2px 6px rgba(0, 0, 0, 0.22);
}

.button2 {
    background: linear-gradient(180deg, #ffb74d 0%, #fb8c00 100%);
    box-shadow: 0 4px 0 #e65100, 0 6px 12px rgba(0, 0, 0, 0.28);
}
.button2:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #e65100, 0 8px 14px rgba(0, 0, 0, 0.32);
}
.button2:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #e65100, 0 2px 6px rgba(0, 0, 0, 0.22);
}

.button3 {
    width: 60px;
    background: linear-gradient(180deg, #81c784 0%, #43a047 100%);
    box-shadow: 0 4px 0 #1b5e20, 0 6px 12px rgba(0, 0, 0, 0.28);
}
.button3:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #1b5e20, 0 8px 14px rgba(0, 0, 0, 0.32);
}
.button3:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1b5e20, 0 2px 6px rgba(0, 0, 0, 0.22);
}

.button4 {
    background: linear-gradient(180deg, #b39ddb 0%, #7e57c2 100%);
    box-shadow: 0 4px 0 #4527a0, 0 6px 12px rgba(0, 0, 0, 0.28);
}
.button4:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #4527a0, 0 8px 14px rgba(0, 0, 0, 0.32);
}
.button4:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #4527a0, 0 2px 6px rgba(0, 0, 0, 0.22);
}

/* ---------- tables wrap ---------- */
.tables-wrap {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 16px auto 0;
    background: white;
    padding: 16px;
    border-radius: 14px;
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    overflow: auto;
}

table.table,
table.table2 {
    border-collapse: collapse;
    display: inline-block;
    vertical-align: top;
    margin: 0;
}

.table2 { margin-left: -1px; }

table th,
table td {
    border: 1px solid #b0bec5;
    text-align: center;
    font-family: "Consolas", "Monaco", "Menlo", monospace;
}

/* Fixed heights so both tables align row-by-row, even when right-side
   data cells are empty before "Ok!" is pressed. */
table th {
    height: 54px;
    padding: 4px 12px;
    background: linear-gradient(180deg, #455a64 0%, #37474f 100%);
    color: white;
    font-weight: 600;
    font-size: 15px;
}

th.eq {
    background: linear-gradient(180deg, #ffd54f 0%, #ffa000 100%);
    color: #2c3e50;
    text-shadow: none;
}

table td {
    height: 40px;
    padding: 4px 12px;
    min-width: 36px;
    background: white;
    font-size: 15px;
    color: #263238;
}

/* Zebra striping — applied identically to both tables so rows align visually */
.table  tr:nth-child(even) td,
.table2 tr:nth-child(even) td {
    background: #eceff1;
}

.table2 td:last-child {
    background: #fff8e1;
    font-weight: 700;
    color: #e65100;
}
.table2 tr:nth-child(even) td:last-child {
    background: #fff3c4;
}

/* Selectors inside header cells — compact and consistent height */
.sel {
    font-weight: 600;
    font-size: 14px;
    min-width: 72px;
    height: 32px;
    padding: 2px 6px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    background: white;
    color: #2c3e50;
    cursor: pointer;
}

.sel:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.25);
}
