* {
    outline: none;
    margin: 0;
    padding: 0;
    font-family: 'Lato', Verdana, Geneva, sans-serif;
    font-size: 14px;
    line-height: 20px;
    transform-origin: center;
}

#topleftblack,
#Headerr1c1,
#bottomleftblack,
#toprightblack,
#bottomrightblack,
#footerimage,
#headerimage {
    background-color: palevioletred;
}

.button-icon {
    color: cadetblue;
    left: 0.5rem;
    top: 0.9rem;
    display: inline-flex;
}

#tabs {
    background-color: white;
    color: blue;
}

#tabs {
    border: none;
    margin: 0px;
}

header {
    background-color: black;
}

#rollerHeader {
    background-color: palevioletred;
}

#address p {
    font-size: 10pt;
}

footer {
    background-color: palevioletred;
}

#testform0 {
    align-items: center;
}

p {
    color: black;
}

.errorText {
    color: red;
}

.errorInput {
    background-color: lightpink;
}

.goodText {
    color: black;
}

.goodInput {
    background-color: black;
    color: lightgreen;
}

.errorBorder {
    background-color: red;
}

#mainform {
    padding: 0px;
}

#left {
    text-align: right;
    padding: 0px;
}

.text-left {
    text-align: center;
}

.ui-button {
    text-indent: 5px;
}

form .error {
    color: #ff0000;
    font-style: italic;
}

/* The Modal (background) */
.modal {
    display: none;
    /* Hidden by default */
    position: absolute;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    left: 35%;
    top: 10%;
    width: 50%;
    /* Full width */
    height: 45%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.4);
    /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    /* Could be more or less, depending on screen size */
}

/* The Close Button */
.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.input-symbol-dollar {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='16px' width='85px'><text><svg>");
    padding-left: 12px;
    background-repeat: no-repeat;
}

#tablespace {
    min-height: 600px;
    height: 100%;
}

.xbutton {
    border: none;
}

.card {
    /* Add shadows to create the "card" effect */
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    width: 200px;
    min-height: 400px;
    float: left;
    padding: 25px;
    margin: 8px;
    position: relative;
}

.directionCard {
    min-height: 250px;
}

img {
    max-width: 95%;
    max-height: 145px;
    padding: 8px;
}

/* On mouse-over, add a deeper shadow */
.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
}

/* Add some padding inside the card container */
.container {
    padding: 2px 16px;
}

hr {
    height: 6px !important;
    margin: 0;
    padding: 0;
}

.Built {
    color: green;
}

.InBag {
    color: blue;
}

.InBox {
    color: red;
}

.InProgress {
    color: Orange;
}

.row.p {
    padding: 2px;
    margin: 0;
}

.badge {
    height: 45px;
    width: 45px;
    padding: 2px;
    margin: 0;
    text-align: center;
    border-radius: 1px;
    float: left;
    font-size: 20px;
    outline: none;
}

button:not(.ui-button) {
    outline: none;
    background-color: transparent;
    background-repeat: no-repeat;
    border: none;
}

.buttons {
    transform-origin: center;
}

.badge.Built {
    /* background-color: blue; */
    color: white;
}

.badge.InBag {
    /*background-color: green; */
    color: white;
}

.badge.InBox {
    /*background-color: red; */
    color: white;
}

.badge.InProgress {
    /*background-color: Orange; */
    color: white;
}

.badge.Built.true {
    background-color: green;
    color: black;
    border-style: dotted;
}

.badge.InBag.true {
    background-color: blue;
    color: black;
    border-style: dotted;
}

.badge.InBox.true {
    background-color: red;
    color: black;
    border-style: dotted;
}

.badge.InProgress.true {
    background-color: yellow;
    color: black;
    border-style: dotted;
}

.disable {
    pointer-events: none;
}

.cardBottom {
    position: absolute;
    bottom: 8px;
}

.buttons {
    horiz-align: center;
}

@-webkit-keyframes rotating {
    from {
        -webkit-transform: rotateY(0deg);
        -o-transform: rotateY(0deg);
        transform: rotateY(0deg);
        transform-origin: center;
    }

    to {
        -webkit-transform: rotateY(360deg);
        -o-transform: rotateY(360deg);
        transform: rotateY(360deg);
        transform-origin: center;
    }
}

@keyframes rotating {
    from {
        -ms-transform: rotateY(0deg);
        -moz-transform: rotateY(0deg);
        -webkit-transform: rotateY(0deg);
        -o-transform: rotateY(0deg);
        transform: rotateY(0deg);
        transform-origin: center;
    }

    to {
        -ms-transform: rotateY(360deg);
        -moz-transform: rotateY(360deg);
        -webkit-transform: rotateY(360deg);
        -o-transform: rotateY(360deg);
        transform: rotateY(360deg);
        transform-origin: center;
    }
}

.rotating {
    -webkit-animation: rotating .6s linear infinite;
    -moz-animation: rotating .6s linear infinite;
    -ms-animation: rotating .6s linear infinite;
    -o-animation: rotating .6s linear infinite;
    animation: rotating .6s linear infinite;
    transform-origin: center;
}

#dialog.img {
    width: 40px;
}

.completed {
    background-color: darkblue;
    color: white;
}

.tinypadding {
    margin: 1px;
    padding: 1px;
}

.ui-button {
    display: inline-block !important;
    visibility: visible !important;
    min-height: 40px !important;
    min-width: 120px !important;
    padding: 10px 20px !important;
    border: 1px solid #ccc !important;
    background-color: #f7f7f7 !important;
    color: #333 !important;
    margin: 5px !important;
}

.ui-button-text {
    display: inline !important;
}

.ui-button,
.ui-button.ui-widget {
    padding: 8px 16px !important;
    margin: 4px !important;
    display: inline-block !important;
}

.ui-button .ui-button-text {
    display: inline !important;
    padding: 0 !important;
}

button.ui-button {
    padding: 8px 16px !important;
    margin: 5px !important;
    display: inline-block !important;
    min-width: 100px;
    min-height: 40px;
}

span.ui-icon {
    display: inline-block !important;
    vertical-align: middle;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
    padding: 0 10px;
}

.col-md-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
}

.col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
}






.math-grid {
    width: 300px;
    border-collapse: collapse;
    margin-top: 10px;
}

.math-cell,
.header-cell {
    border: 1px solid #ccc;
    text-align: center;
    width: 25px;
    height: 25px;
}

.math-cell {
    background-color: #f0f0f0;
    cursor: pointer;
}

.math-cell:hover {
    background-color: #ddd;
}

.header-cell {
    font-size: 10px;
    font-weight: bold;
    background: #eee;
}

.quiz-box {
    margin-top: 30px;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    text-align: center;
    width: 300px;
}

#user-answer {
    padding: 8px;
    width: 60px;
    margin-right: 5px;
}

.math-cell.pending {
    background-color: yellow !important;
}
.math-cell.almostAnswer {
    background-color: orange !important;
}

.math-cell.correct {
    background-color: green !important;
    color: white;
    cursor: default;
}

.math-cell.error {
    background-color: red !important;
}

.math-cell.disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

#user-answer {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    font-size: 1.2em;
    box-sizing: border-box;
}

.main-wrapper {
    display: grid;
    grid-template-columns: 8fr 4fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tab-container {
    width: 100%;
}

.quiz-box {
    background-color: #f4f4f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    align-self: start;
}

@media (max-width: 900px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }
}


/****
.bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease-in-out;
    background-color: palevioletred;
}
***/

.overall {
    background: linear-gradient(90deg, #ff9a9e, #fad0c4);
}

.add {
    background-color: #4CAF50;
}

.sub {
    background-color: #FF9800;
}

.mult {
    background-color: #9C27B0;
}

.div {
    background-color: #2196F3;
}

.sub-progress-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.8em;
}

@media screen and (max-width: 900px) {
    html,
    body {
        min-width: 900px;
    }
}

.progress-dashboard {
    display: flex;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
}

.progress-item {
    flex: 1;
    font-size: 0.9em;
    font-weight: bold;
    vertical-align: bottom;
}

/****
.bar-fill {
    height: 100%;
    width: 0%;
    background: #28a745;
    transition: width 0.5s ease-in-out;
}
****/
.main-Container {
    max-width: 800px;
    margin: 0 auto;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}




.progress-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.progress-table td {
    padding: 8px;
    vertical-align: top;
    width: 20%; /* Distributes space evenly across 5 items */
}


/* --- 1. Main Container: Horizontal Row --- */
.custom-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* --- 2. Individual Tab Item --- */
.custom-tabs li {
    display: flex;
    flex-direction: column;
    width: 140px; /* Adjust width as needed for your labels */
    gap: 2px;
    padding: 2px;
    transition: background 0.2s ease;
}

/* --- 3. The Row (Label + Reset) --- */
.tab-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px;
    border: 1px solid transparent; /* Prevents jumping when active border appears */
}

/* --- 4. The Active State (Highlights the WHOLE row) --- */
.custom-tabs li.active .tab-row {
    /*border-top: 3px solid palevioletred;*/


}

/* --- 5. Button Styling --- */
.tab-button {
    flex-grow: 1;
    padding: 2px;
    border: none;
    background: transparent;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bold text when parent LI is active */
.custom-tabs li.active .tab-button {
    font-weight: bold;
}

/* Reset Button */
.reset-btn {
    cursor: pointer;
    background: transparent;
    border: none;
    font-size: 16px;
    color: #666;
    margin-left: 5px;
    flex-shrink: 0;
}

.reset-btn:hover {
    color: #ff4757;
    transform: rotate(180deg);
}

/* --- 6. Progress Bar Styling --- */
.bar-bg {
    width: 100%;
    height: 10px;
    background-color: #cceeee;
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0%;
    background-color: palevioletred;
    transition: width 0.5s ease-in-out;
}


/* 1. Shake animation for Incorrect (Mode 1) */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* 2. Success flash for Correct (Mode 0) */
@keyframes successPulse {
    0% { background-color: #fff; }
    50% { background-color: #d4edda; } /* Light Green */
    100% { background-color: #fff; }
}



/* Helper classes triggered by JS */
.animate-error { animation: shake 0.4s ease-in-out; border: 1px solid red; }
.animate-success { animation: successPulse 0.5s ease-out; }


/* Ensure the element can handle 3D space */
.math-grid, .quiz-box {
    perspective: 1000px; /* Gives the rotation depth */
    transform-style: preserve-3d;
}

@keyframes spin-out {
    0% { transform: rotateY(0deg) }
    100% { transform: rotateY(90deg) }
}

@keyframes spin-in {
    0% { transform: rotateY(270deg) }
    100% { transform: rotateY(360deg) }
}

.animate-spin-out { animation: spin-out .5s linear forwards; }
.animate-spin-in { animation: spin-in .5s linear forwards; }

.animate-fade {
    /* 'linear' makes the spin constant */
    /* 'forwards' keeps the element at the final rotation state */
    animation: spin 1s linear forwards;
}

.tab-panel {
    /* Instead of display: none; */
    visibility: hidden;
    position: absolute;
    opacity: 0;

}

.tab-panel.active {
    /* Instead of display: block; */
    visibility: visible;
    position: relative;
    opacity: 1;
}

/* Style for the input inside the modal */
#newSaveNameInput {
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

/* Ensure the close button is visible */
.close {
    cursor: pointer;
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}
.tally-quiz-display {
    display: flex;
    flex-flow: row wrap;
    gap: 15px; /* Space between groups */
    justify-content: flex-start;
    padding: 10px;
}

.tally-group {
    position: relative;
    display: inline-flex;
    justify-content: flex-start; /* Push marks to the left side of the group */
    align-items: center;
    width: 28px;      /* Keep fixed width so the slash has a consistent "anchor" */
    height: 30px;
    flex-shrink: 0;
}

.tally-mark {
    width: 3px;
    height: 22px;
    background-color: #000;
    border-radius: 1px;
    /* Use a fixed margin instead of space-between */
    margin-right: 3px;
}

/* Remove margin from the 4th mark so it doesn't push the slash alignment off */
.tally-mark:nth-child(4) {
    margin-right: 0;
}

/* The Slash: Anchored precisely to the group */
.tally-mark.slash {
    position: absolute;
    width: 3px;
    height: 32px;    /* Taller than the sticks to clear the group */
    background-color: #cc0000; /* Deep red */

    /* This is the secret sauce: */
    left: 40%;
    top: 40%;
    transform: translateY(-50%) rotate(-70deg);
    transform-origin: center;

    /* Ensure it doesn't get pushed by flex spacing */
    margin: 0;
    z-index: 2;
}

.primary-tabs {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
    border-bottom: 2px solid #ccc;

}
.primary-tabs li {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    background: #dddddd;
    margin-right: 5px;
    border-radius: 8px 8px 0 0;
    min-width: 130px;
    text-align: center;
}
.primary-tabs li.active {
    background: #007bff;
    color: white;
}
.secondary-tabs-container {
    margin-bottom: 20px;
    padding: 10px;
    /*background: #f9f9f9*/;
    border-radius: 0 0 8px 8px;
}
.hidden { display: none !important; }

/* Keep your existing tab-row and bar styles */
.tab-row { display: flex; align-items: center; justify-content: space-between; }
.custom-tabs { list-style: none; padding: 0; display: flex; gap: 10px; }
.custom-tabs li {
    flex: 1;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
    text-align: center;
}
.custom-tabs li.active {
    border: 3px solid darkgray;
}
.difficulty-1 { background-color: #cce6ff; } /* very light blue */
.difficulty-2 { background-color: #99ccff; }
.difficulty-3 { background-color: #66b3ff; }
.difficulty-4 { background-color: #3399ff; }
.difficulty-5 { background-color: #ffcc66; } /* transition to warmer color */
.difficulty-6 { background-color: #ff9966; }
.difficulty-7 { background-color: #ff6666; }
.difficulty-8 { background-color: #ff3333; }
.difficulty-9 { background-color: #990000; } /* dark red */

.clockText {
    font-size: 10px;
    text-anchor: middle;
    /* Changing 'bottom' to 'middle' often helps alignment-baseline issues */
    alignment-baseline: middle;
    font-family: Arial, sans-serif;
    fill: black;
    /* Move it down 2 units */
    transform: translateY(2px);
}

#feedback {
    opacity: 1;
    transition: opacity 0.8s ease-in-out; /* Slightly faster than 1s feels snappier */
}

.fadedout {
    opacity: 0 !important;
}

.nav-btn {
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.nav-btn:hover {
    background-color: #ddd;
}

.nav-btn:active {
    background-color: #bbb;
}

/* The Main Container */
.clock-case {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(145deg, #222, #444);
    padding: 3px;
    border-radius: 10px;
    border: 4px solid #1a1a1a;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 2px 5px rgba(255,255,255,0.1);
}

/* Digital Readout Area */
.digit-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #111;
    padding: 10px 15px;
    border-radius: 10px;
    box-shadow: inset 0 0 15px #000;
}

/* The Numbers */
.digit-text {
    font-family: 'Courier New', Courier, monospace; /* Or 'Orbitron' if using Google Fonts */
    font-size: 3rem;
    color: #00ff00;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7), 0 0 20px rgba(0, 255, 0, 0.2);
    min-width: 1.5em;
    text-align: center;
    user-select: none;
}

/* The Colon Separator */
.digit-separator {
    font-size: 3rem;
    color: #00ff00;
    padding: 0 10px;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.7);
    animation: blink 2s infinite;
}

/* Styled Buttons */
.clock-btn {
    background: #555;
    color: white;
    border: none;
    width: 50px;
    height: 35px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.1s;
    box-shadow: 0 4px #222;
}


.clock-btn:active {
    box-shadow: 0 0 #222;
    transform: translateY(4px);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.clock-num-group:hover text {
    fill: #cc0000;
    font-weight: bold;
    font-size: 12px; /* Slightly larger on hover */
    transition: all 0.2s;
}

.clock-num-group:hover circle {
    /*fill: rgba(204, 0, 0, 0.1);*/
}
.L1Header{
    background-color: #000000; !important;

}

.money-svg-text {
    font-family: 'Arial Black', Impact, sans-serif !important;
    font-weight: 900 !important;
    text-anchor: middle !important;
    transform: translateY(5px);
    font-size: var(--font-size, 40px) !important;
}

/* --- Money Interaction Component Styles --- */

/* Wrapper for the full coin/bill entry stack */
.money-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

/* Interactive Currency Graphic Wrapper */
.clickable-money {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease-in-out;
}

/* Explicit layout zones to prevent scaling jumps */
.clickable-money[data-target-input^=".coin-"] {
    height: 65px;
}

.clickable-money[data-target-input^=".bill-"] {
    height: 55px;
}

/* User Delight Hover State */
.clickable-money:hover {
    transform: scale(1.05);
}

/* Standardized Input Field Styling */
.money-qty-input {
    width: 55px;
    margin-top: 8px;
    padding: 6px;
    text-align: center;
    font-size: 1.1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Match layout layout spacing across global components */
.svg-aligned {
    vertical-align: middle;
}

