:root {
  --bg--: #FFDB58 ;
  --border--: rgb(224, 114, 74);
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
  font-family: monospace;
  background-color: #FFDB58; 
  color: #333;
  overflow: hidden;
  padding: 10px;
}

.container {
    min-height: 100vh;
    padding: 20px;
}

.title {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;        
    margin-bottom: 20px;  
    padding: 10px 0;      
}

.title img {
    width: 70px;
}

.title > h1 {
    text-align: center;
    font-family: monospace;
    font-size: 32px;
    line-height: 1.2;     
}

.layout {
   display: grid;
   grid-template-columns: 1fr 1.5fr 1fr;
   gap: 20px;
   max-width: 1400px;
   margin: 0 auto;
}

.grid-item {
  background-color: #f2f2f2;
  border: 1px solid rgba(129, 129, 129, 0.525);
  border-radius: 15px;
  padding: 25px;
  max-height: 500px;
}

/* Left Panel */
.left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
}

.menu {
    background-color: #333;
    padding: 20px;
    border: 4px solid var(--border--);
    border-radius: 10px;
}

.menu h1 {
    color: #ccc;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.shop-info {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.pizza-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pizza-name {
    background-color: #552603;
    color: white;
    padding: 12px;
    font-size: 16px;
    border-left: 4px solid transparent;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pizza-name:hover {
    transform: translateX(10px);
    border-left-color: rgb(240, 213, 78);
    background-color: rgb(43, 42, 39);
}

.pizza-name.selected {
    background-color: rgb(221, 152, 24);
    color: #333;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(240, 183, 78, 0.3);
}

.pizza-type {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    text-transform: uppercase;
}

.order-info {
    text-align: center;
}

.order-info p {
    margin-bottom: 10px;
    font-weight: bold;
}

.order-info input {
    width: 60px;
    padding: 8px;
    font-size: 16px;
    border: 2px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.btns {
    display: flex;
    gap: 10px;
}

.btns button {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

#orderBtn {
    background-color: var(--border--);
}

#orderBtn:hover:not(:disabled) {
    background-color: rgb(225, 159, 37);
}

#orderBtn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#cancelBtn {
    background-color: var(--border--);
}

#cancelBtn:hover {
    background-color: rgb(225, 159, 37);
}

.refresh {
    background-color: var(--border--);
}

.refresh:hover {
    background-color: rgb(225, 159, 37);
}

/* Center Panel */
.center {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 500px;
}

.stages-list {
    display: inline;
    background-color:#333;
    padding: 25px;
    border: 4px solid var(--border--);
    border-radius: 10px;
    max-height: 500px;
    overflow: auto;
}

.stages-list h1 {
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
    color: #ccc;
}

.stage-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    margin: 10px 0;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    opacity: 0.5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.4, 1);
    position: relative;
}

.stage-connector {
    position: absolute;
    left: 35px;
    top: 60px;
    width: 4px;
    height: 0;
    background: #ddd;
    transition: all 1.2s cubic-bezier(0.6, 0, 1, 1.1);
    z-index: 1;
    border-radius: 2px;
}

.stage-item:last-child .stage-connector {
    display: none;
}

.stage-item.active .stage-connector {
    height: 100px;
    background: linear-gradient(180deg, #c6ac51, var(--bg--));
    background-size: 100% 200%;
    box-shadow: 0 0 15px rgba(6, 255, 165, 0.6);
    animation: flowData 0.6s linear infinite;
}

@keyframes flowData {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 200%; }
}


.stage-item.completed .stage-connector {
    height: 100px;
    background: linear-gradient(180deg, #c6ac51 0%, var(--bg--) 100%);
    box-shadow: 0 0 10px rgba(238, 233, 144, 0.4);
}

.stage-item.cancelled .stage-connector {
    height: 90px;
    background: linear-gradient(180deg, #ff6b6b 0%, var(--border--) 100%);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

.stage-item.active {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.95);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(255, 230, 6, 0.2);
}

.stage-item.active .emojis {
    animation: pulse 1.2s ease-in-out infinite;
}

.stage-item.completed {
    opacity: 0.85;
    background-color: var(--bg--);
    transform: scale(1);
}

.stage-item.cancelled {
    opacity: 0.85;
    background-color: var(--border--);
    transform: scale(1);
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(255, 255, 6, 0.4);
    }
    50% { 
        transform: scale(1.15); 
        border: 1px solid #eee590;
        box-shadow: 0 0 20px 5px rgba(255, 205, 6, 0.2);
    }
}

.emojis {
    font-size: 24px;
    padding: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stage-item.cancelled .emojis {
    background-color: #ffcccc;
}

.stage-content {
    flex: 1;
}

.stage-name {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.stage-item.cancelled .stage-name {
    color: #d32f2f;
}

.stage-data {
    font-size: 12px;
    color: #555;
    background-color: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 150px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.stage-item.cancelled .stage-data {
    background-color: rgba(255, 204, 204, 0.7);
    color: #d32f2f;
}

/* Right Panel */
.right {
    display: flex;
    flex-direction: column;
    max-height: 500px;
}

.state-console {
    background-color: #333;
    max-height: 500px;
    padding: 25px;
    border: 4px solid var(--border--);
    border-radius: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

.state-console h1 {
    color: #ccc;
    font-size: 24px;
    margin-bottom: 20px;
    text-align: center;
}

.console-output {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border: 2px dotted var(--bg--);
    box-shadow: inset 0 0 20px rgba(0, 255, 0, 0.05); 
    padding: 15px;
    border-radius: 8px;
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: #0f0;
    overflow-y: auto;
    max-height: 500px;
}
.console-line:last-child::after {
    content: " _";
    animation: blink 1s infinite;
}

@keyframes blink { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

.console-line {
    margin-bottom: 5px;
    animation: fade-in 0.7s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.console-line.pending {
    color: orange;
}

.console-line.fulfilled {
    color: lightgreen;
}

.console-line.rejected {
    color: #ff6b6b;
}

.console-output::-webkit-scrollbar {
    width: 6px;
}

.console-output::-webkit-scrollbar-track {
    background: #2a2a2a;
}

.console-output::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: #777;
}

.loader {
  width: 28px;
  --b: 4px; 
  aspect-ratio: 1;
  border-radius: 50%;
  padding: 1px;
  background: conic-gradient(#0000 10%,#f0a133) content-box;
  -webkit-mask:
    repeating-conic-gradient(#0000 0deg,#000 1deg 20deg,#0000 21deg 36deg),
    radial-gradient(farthest-side,#0000 calc(100% - var(--b) - 1px),#000 calc(100% - var(--b)));
  -webkit-mask-composite: destination-in;
          mask-composite: intersect;
  animation:l4 1s infinite steps(10);
}
@keyframes l4 {to{transform: rotate(1turn)}}

.checkmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #7ac142;
    animation: fill .4s ease-in-out .1s forwards, scale .3s ease-in-out .5s both;
    flex-shrink: 0;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #7ac142;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

.crossmark {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #ff6b6b;
    animation: fillRed .4s ease-in-out .1s forwards, scale .3s ease-in-out .5s both;
    flex-shrink: 0;
}

.crossmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #ff6b6b;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.crossmark__cross {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.4s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%, 100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #7ac142;
    }
}

@keyframes fillRed {
    100% {
        box-shadow: inset 0px 0px 0px 30px #ff6b6b;
    }
}


@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 1fr;
        max-width: 700px; 
    }
    .grid-item {
        max-height: none; 
    }
    body {
        overflow: auto;
        padding: 10px;     
    }
    .title {
        margin-top: 0;      
        margin-bottom: 15px;
    }
    .title h1{
        font-size: 24px;    
        line-height: 1.2;   
    }
    .title img {
        width: 50px;
    }
}