        * {
            box-sizing: border-box;
            font-weight: bold;
            margin: 0;
            padding-top: 0;
            font-family: monospace;
            font-weight: 800;
            text-shadow: 2px 2px 6px rgba(0, 100, 255, 0.3);
        }
        body {
            text-align: center;
            background: #314a83;
            color: #fff;
            overflow: hidden;
            touch-action: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        .container {
            max-width: 440px;
            margin: auto;
            padding: 25px;
        }
        .app {
            padding-top: 70px;
        }

        .header {
            height: 90px;
            margin-bottom: 20px;
        }

        .app .flex{
            margin-bottom: 20px;
        }

        .app .header {
            margin-bottom: 50px;
        }
        .instructions {
            line-height: 90px;
            font-size: 28px;
        }
        h1 {
            font-size: 24px;
            margin-bottom: 20px;
        }
        .flex {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }
        .flex div {
            flex: 1;
        }

        #board {
            overflow: overlay;
            border: 3px solid;
            border-radius: 8px;
            background: #161f39;
            padding: 1px;
            box-sizing: content-box;
            margin-left: -5px;
            margin-top: -5px;
            border-bottom-color: #445da1;
            border-left-color: #2b3e6b;
            border-right-color: #2b3e6b;
            border-top-color: #283968;
        }
        #gameover {
            background: #000000bf;
            position: relative;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            border: solid 3px #000000bf;
            border-radius: 5px;
            box-sizing: content-box;
            padding: 1px;
            margin-left: -5px;
            margin-top: -5px;
        }
        .square {
            float: left;
            display: inline-block;
            aspect-ratio: 1/1;
            background-color: #1d2547;
            border: 1px solid #161f39;
            border-radius: 5px;
        }
        .square:not(.empty) {
            background-size: 400% 100%;
            border: 1px solid #161f39;
            border-radius: 5px;
        }
        #points {
            position: absolute;
            display: none;
            color: #fff;
            z-index: 999;
            font-size: 34px;
            text-align: center;
        }

        .streak{
            font-size: 49px!important;
            font-style: italic; 
            font-weight: 900;  
            letter-spacing: -3px; 
            color: #d5f1fd!important;
            text-shadow:  -5px -5px 0 #3952d8,  0 -5px 0 #3952d8,  5px -5px 0 #3952d8,  /* Top */
            -5px  0px 0 #3952d8,                   5px  0px 0 #3952d8,  /* Sides */
            -5px  5px 0 #3952d8,  0  5px 0 #3952d8,  5px  5px 0 #3952d8, /* Bottom */
            0 0 20px #3952d8, 0 0 35px #3952d8;            
        }


        .combo{
            font-size: 49px!important;
            font-style: italic; 
            font-weight: 900;  
            letter-spacing: -3px; 
            color: gold!important;
            text-shadow:  -5px -5px 0 #ff4500,  0 -5px 0 #ff4500,  5px -5px 0 #ff4500,  /* Top */
            -5px  0px 0 #ff4500,                   5px  0px 0 #ff4500,  /* Sides */
            -5px  5px 0 #ff4500,  0  5px 0 #ff4500,  5px  5px 0 #ff4500, /* Bottom */
            0 0 20px #ff4500, 0 0 35px #ff4500; 
        }


        .streaknumber{
            margin-left: 3px;
            color:gold;
            text-shadow:  -5px -5px 0 #3952d8,  0 -5px 0 #3952d8,  5px -5px 0 #3952d8,  /* Top */
            -5px  0px 0 #3952d8,                   5px  0px 0 #3952d8,  /* Sides */
            -5px  5px 0 #3952d8,  0  5px 0 #3952d8,  5px  5px 0 #3952d8, /* Bottom */
            0 0 20px #3952d8, 0 0 35px #3952d8; 
            font-size: 63px!important;
        }

        #pieces {
            margin-top: 30px;
            display: grid;
            grid-template-columns: repeat(3, 33.33%);
            justify-items: center;
        }

        /* ─────── NEW multi-piece tray ─────── */
        .piece {
            border-top: 80px solid transparent;
            border-bottom: 80px solid transparent;
            border-left: 30px solid transparent;
            border-right: 30px solid transparent;
            box-sizing: content-box;
            cursor: grab;
            position: relative;
            transition: transform 0.1s ease-out;
            will-change: transform;
        }


        .ui-draggable-dragging {
         transform: scale(1.34);  
     }

     .horizontal {
        border-width: 80px;
    }
    .vertical {
        margin-top: 0px;
    }

    .first {
        aspect-ratio: 1/1;
        background-size: 400% 100%;
        border-radius: 5px;
        border: 1px solid transparent;
        background-clip: padding-box;
    }
    .second {
        position: absolute;
        width: 100%;
        aspect-ratio: 1/1;
        background-size: 400% 100%;
        border-radius: 5px;
        border: 1px solid transparent;
        background-clip: padding-box;
    }

    .vertical .second {
        z-index: -99;
    }

    .horizontal div span {
        top: 0;
        left: calc(100%);
    }
    .vertical div span {
        top: calc(-100%);
        left: 0;
    }

    .ui-droppable-active.highlight {
        filter: brightness(150%);
    }

    .message {
        font-size: 28px;
        margin-bottom: 30px;
    }
    #restart {
        background: linear-gradient(to bottom, #4cd137, #44bd32);
        border: 2px solid #2ecc71;
        border-radius: 5px;
        color: #fff;
        font-size: 26px;
        padding: 10px;
        cursor: pointer;
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.3);
    }
    .apps {
        margin-top: 30px;
    }

    .apps {
        margin-top: 30px;
        margin-bottom: 0px;
    }

    .apps svg {
        width: 150px;
        margin: 5px;
    }

    .app .apps {
        display: none;
    }

    .ui-draggable-dragging {
        cursor: grabbing !important;
        z-index: 999;
    }

    .ui-draggable-dragging .first,
    .ui-draggable-dragging .second {
        box-shadow: none;
    }

    .hidden {
        display: none !important;
    }


    #highscore {
        text-align: left;
        color: #fbcc4c;
        display: flex;
        align-items: center;
    }

    #best {
        vertical-align: middle;
        margin-left: 10px;
    }

    img {
        width: 16%;
        height: 16%;
    }

    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 999;
        background: #00000082;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding-top: 160px;
    }

    .modalinner {
        width: 90%;
        max-width: 360px;
        padding: 20px;
        color: #bde1f7;
        background: #314a83;
        position: relative;
        text-align: center;
        overflow-y: auto;
        border-radius: 16px;
        font-size: 18px;
        max-height: 60vh;
        box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.45);
        margin: 0;
    }

    .modalcontent {
        width: 90%;
        margin: auto;
    }

    .modal .close {
        position: sticky;
        top: 0;
        cursor: pointer;
        padding: 10px;
        padding-top: 0px;
        font-size: 28px;
        color: #bde1f7;
        z-index: 1;
        text-align: right;
        margin-bottom: -40px;
    }

    .togglemodal {
        cursor: pointer;
    }

    .settings {
        text-align: right;
    }

    .defaultskins {
        font-size: 0px;
    }


    .userskins {
        font-size: 0px;
    }

    .skin {
        width: 100%;
        border-radius: 5px;
        border: 3px solid #314a83;
        cursor: pointer;
        background: #1d2447;
        margin-bottom: 15px;
        vertical-align: middle;
    }

    .skin.active {
        border: 3px solid #d09e43;
    }

    #fileInput {
        display: none;
    }

    .buttons {
        margin-top: 10px;
        margin-bottom: 40px;
        gap: 15px;
        font-size: 16px;
    }

    .buttons div {
        padding: 10px;
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        color: white;
        cursor: pointer;
    }

    .loader {
        border: 4px solid #f3f3f3;
        border-top: 4px solid #3498db;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        animation: spin 1s linear infinite;
        margin: 18px auto 0;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }
        100% {
            transform: rotate(360deg);
        }
    }

    a {
        color: inherit;
    }

    .skins {
        position: relative;
    }

    .delete {
        position: absolute;
        top: -5px;
        right: 0px;
        width: 60px;
        height: 60px;
        color: white;
        font-weight: bold;
        text-align: center;
        cursor: pointer;
    }

    .deleteinner {
        display: block;
        background-color: red;
        border-radius: 50%;
        font-size: 14px;
        width: 20px;
        height: 20px;
        line-height: 20px;
        margin: auto;
        margin-right: 6px;
        vertical-align: middle;
        margin-top: 15px;
    }

    .links {
        margin-top: 30px;
    }

    .links div {
        margin: auto;
        border-bottom: 2px solid #ffffff29;
        padding-bottom: 15px;
        padding-top: 15px;
        width: 80%;
        cursor: pointer;
    }
    .links div:last-child {
        border-bottom: none;
        margin-bottom: 20px;
    }

    form {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    input,
    textarea {
        padding: 0.75rem 1rem;
        border: 1px solid #ccc;
        border-radius: 8px;
        width: 100%;
        box-sizing: border-box;
        transition: border-color 0.3s ease;
    }

    input:focus,
    textarea:focus {
        border-color: #0077ff;
        outline: none;
    }

    textarea {
        resize: vertical;
        min-height: 120px;
    }

    button {
        padding: 0.75rem 1.5rem;
        border: none;
        background-color: #0077ff;
        color: white;
        border-radius: 8px;
        cursor: pointer;
        transition: background-color 0.3s ease;
    }

    button:hover {
        background-color: #005fcc;
    }

    .red {
        display: inline-block;
        width: 10px;
        height: 10px;
        background-color: red;
        border-radius: 50%;
        margin-left: -3px;
        vertical-align: super;
    }

    .information {
        text-align: left;
    }

    .information p {
        font-weight: 400;
        font-family: sans-serif;
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    h2 {
        margin-top: 30px;
        font-size: 18px;
        margin-bottom: 10px;
    }


    .single .second {
        display: none;
    } 

    .single {
        margin-top: 0px;
    } 


    .tutorial-flash {
        border: 1px solid gold;                            
        box-shadow: inset 0 0 8px 4px rgba(255, 215, 0, 0.8);
        animation: flash-inner 0.8s infinite ease-in-out;
    }

    @keyframes flash-inner {
        0%, 100% {
            box-shadow: inset 0 0 8px 4px rgba(255, 215, 0, 0.8);
        }

        50% {
            box-shadow: inset 0 0 3px 1px rgba(255, 215, 0, 0.2);
        }
    }

    .app .tutorial-instructions {
        line-height: 120px;
    }

    .tutorial-instructions {
        font-size: 26px;
        line-height: 90px;
        text-align: center;
        margin-bottom: 20px;
        font-weight: bold;
    }
    .tutorial-mode #pieces {
        display: flex;
        justify-content: center;
        margin-top: 30px;
    }

    .tutorial-gif{
      position: absolute;
      transition: none; 
      width: 150px;
      height: 150px;
  }

  .piece-animate {
    transform: scale(0);
    animation: pieceGrowIn 0.3s ease-out forwards;
}

@keyframes pieceGrowIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}



@keyframes pointsGrowIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


@keyframes pointsShrinkOut {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.8;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}