body {
    font-family: Arial, sans-serif; 
    /*font-family: cursive;*/
    transition: background-color 0.3s, color 0.3s;
   /* font-family: var(--default-font);*/
    font-size: 14px;
    line-height: 16px;
    font-weight: 700;
    font-style: italic;
    background-color: #f9f9f9; /* This will act as fallback */
    background-image: url('img/buildings/day.jpg?v=1'); /* Insert your image URL here */
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center; /* Centers the background image */
    background-repeat: no-repeat; /* Prevents the image from repeating */
    /*color: var(--tg-theme-text-color);
    color-scheme: var(--tg-color-scheme);*/
    margin: 0;
    padding: 0;
    width: 1px;
    min-width: 100%;
    
    --default-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    --block-bg-color: var(--tg-theme-bg-color);
    --bg-color: #ebedf0;
    --animation: .15s ease;
    --page-animation-duration: .3s;
    --page-animation: var(--page-animation-duration) ease;
    --status-height: 48px;
    --accent-color: #31b545;
    --main-color: #f8a917;
    --text-color: #222;
    --page-hint-color: #83878a;
    --hint-color: #74787a;
    --placeholder-color: #999da1;
    --ripple-duration: .45s;
    --ripple-end-duration: .3s;
    -webkit-user-select: none;
    user-select: none;
    cursor: default;
  }
  /*html.dark body {
    --block-bg-color: var(--tg-theme-bg-color);
    --bg-color: #0f0f0f;
    --text-color: #fff;
    --page-hint-color: #9b9ba1;
    --hint-color: #64666d;
    --placeholder-color: #5d6163;
  }*/
  body.order-mode {
    background-color: var(--bg-color);
  }
  
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  .cafe-page {
    transition: filter var(--animation);
  }
  body.closed .cafe-page {
    filter: grayscale(1) opacity(0.7);
  }
  
  .cafe-block {
    background-color: var(--block-bg-color);
    -webkit-box-shadow: 0 0.5px rgba(0, 0, 0, .07);
    box-shadow: 0 0.5px rgba(0, 0, 0, .07);
     min-width: 100%;
    box-sizing: border-box; 
    overflow: hidden;
    word-wrap: break-word; /* Break words to prevent overflow */
    white-space: normal;  /* Allow text to wrap onto the next line */
     
  }
  
  .cafe-items {
    display: flex;
    flex-wrap: wrap;
    margin: 0 auto;
    max-width: 480px;
    justify-content: space-around;
    align-content: flex-end;
    transition: max-height var(--page-animation), opacity var(--page-animation);
    background-color: var(--block-bg-color);
  }
  body.order-mode .cafe-items {
    max-height: 0 !important;
    opacity: 0 !important;
  }
  .cafe-items:after {
    content: '';
    flex-grow: 2;
  }
  .cafe-item,
  .cafe-item-shadow {
    position: relative;
    width: 33%;
    min-height: 160px;
    padding: 4px 5px 21px;
    box-sizing: border-box;
    text-align: center;
  }
  .cafe-item-shadow {
    height: 0;
    padding: 0;
    margin: 0;
  }
  
  .cafe-item-photo {
    position: relative;
    height: 100px;
  }
  .cafe-item-photo .cafe-item-emoji {
    font-size: 70px;
    line-height: 78px;
  }
  .cafe-item-lottie {
    display: inline-block;
    vertical-align: top;
    position: relative;
    margin: 0 auto;
  }
  .cafe-item-photo .cafe-item-lottie {
    width: 74px;
  }
  .data-item-photo .cafe-item-lottie {
    width: 74px;
  }
  .cafe-item-lottie:before {
    content: '';
    display: block;
    padding-top: 100%;
  }
  .cafe-item-lottie img,
  .cafe-item-lottie canvas {
    position: absolute;
    top: 0; bottom: 0;
    left: 0; right: 0;
    width: 100%;
    height: 100%;
  }
  .amountForSale{
    display: none;
  }
  .settings-wrapper{
      width: min-content;
      margin-left: 10%;
  }
  .settings-item-lottie img
   {
    
    top: 0; bottom: 0;
    left: 0; right: 0;
    width: 100%;
    height: 100%;
  }
  .cafe-item-label {
  display: flex;
  justify-content: center;
  height: auto;
  flex-direction: column; /* Change flex-direction to column */
  /*padding-left: 25%;*/
}
.setting-item-label {
  display: flex;
  justify-content: center;
  height: auto;
  flex-direction: column; 
 /*  padding-left: 25%;Change flex-direction to column */
}

.cafe-item-title {
  font-weight: 500;
  overflow: hidden; 
  font-size: 14.8px;
  white-space: pre-line;
  text-overflow: ellipsis;
  
   /* Number of lines to show */
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   /*height: 70%;*/
   height: 60px;
   /*margin: auto;*/
   line-height: 21px;
   
  
}
.settings-item-title {
  font-weight: 500;
  /*overflow: hidden; */
  font-size: 16px;
  white-space: pre-line;
  text-overflow: ellipsis;
   /* Number of lines to show */
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   /*height: 70%;*/
   height: auto;
   /*margin: auto;*/
   line-height: 21px;
   
  
}
.initial-text{
  display: block;
  font-size: 18px;
  font-family: 'Courier New', Courier, monospace;
  
}
.initial-text .hide{
  display: none;
}
.cafe-item-quantity {
  font-weight: 900;
  margin: 5px 2px;
}

.cafe-item-price {
  font-weight: 700;
  white-space: nowrap;
  min-height: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 10px;
}
.settings-item-price {
  font-weight: 700;
  white-space: nowrap;
  min-height: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
  padding: 10px;
}
.cafe-item-price:before {
  display: inline-block;
  vertical-align: top;
  content: '';
  width: 2px;
  height: 2px;
  border-radius: 2px;
  background-color: currentColor;
  margin: 7px 4px;
}

.cafe-item-buttons {
  display: flex;
  width: 72px;
  justify-content: space-between;
  margin: 10px auto 0;
  position: relative;
  transition: all var(--animation);
}
.settings-item-buttons {
  display: flex;
  width: 80px;
  justify-content: space-between;
   
  position: relative;
  transition: all var(--animation);
}

button {
  cursor: pointer;
}

/* Adjustments for long titles in order overview */
.cafe-order-item-title {
  font-weight: 500;
  overflow: hidden;
  white-space: pre-line;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2; /* Number of lines to show */
  -webkit-box-orient: vertical;
  width: 25%;
}

.cafe-order-item-description {
  max-height: 100px; /* Limit the height of the description */
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 5px; /* Add margin to description */
}


  /*button,*/
  .cafe-item-counter {
    display: inline-block;
    font-family: var(--default-font);
    font-weight: 700;
    font-size: 14px;
    line-height: 18px;
    padding: 6px 16px;
    height: 30px;
    border-radius: 7px;
    box-sizing: border-box;
    background-color: var(--main-color);
    text-transform: uppercase;
    color: hsl(0, 5%, 4%);
    outline: none;
    border: none;
  }
  .cafe-item-counter {
    position: absolute;
    right: 0;
    top: 0;
    min-width: 22px;
    height: 22px;
    padding: 2px 6px;
    margin: 4px 6px;
    border-radius: 11px;
    transform: scale3d(0, 0, 1);
    animation: var(--animation) both;
    pointer-events: none;
    z-index: 3;
  }
  .cafe-item-incr-button {
    position: absolute !important;
    top: 0;
    right: 0;
    transition: width var(--animation);
    /*width: 80px;*/
    width: auto;
  }
  .selected .cafe-item-incr-button {
    width: 38px;
  }
  .cafe-item-decr-button {
    position: relative;
    width: 38px;
  }
  .cafe-item-decr-button {
    background-color: #e64d44;
    pointer-events: none;
    transform: scale3d(0.9, 0.9, 1);
    transition: transform var(--animation), visibility var(--animation);
    visibility: hidden;
  }
  .selected .cafe-item-decr-button {
    pointer-events: auto;
    transform: scale3d(1, 1, 1);
    visibility: visible;
  }
  .cafe-item-incr-button:before,
  .cafe-item-incr-button:after,
  .cafe-item-decr-button:before {
    display: inline-block;
    position: absolute;
    content: '';
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    width: 14px;
    height: 3px;
    background-color: #fff;
    border-radius: 1px;
    z-index: 1;
  }
  .cafe-item-incr-button:before,
  .cafe-item-incr-button:after {
    background-color: rgba(255, 255, 255, 0);
    transition: background-color var(--animation);
  }
  .selected .cafe-item-incr-button:before,
  .selected .cafe-item-incr-button:after {
    background-color: #fff;
  }
  .cafe-item-incr-button .button-item-label {
    transition: transform var(--animation);
  }
  .selected .cafe-item-incr-button .button-item-label {
    transform: scale3d(0.4, 0, 1);
  }
  .cafe-item-incr-button:after {
    width: 3px;
    height: 14px;
  }
  
  .cafe-status-wrap {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    transform: translateY(var(--tg-viewport-height, 100vh));
  }
  .cafe-status {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: block;
    width: 100%;
    padding: 8px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    background-color: #e64d44;
    box-shadow: 0 var(--status-height) #e64d44;
    color: #fff;
    height: var(--status-height);
    transition: transform var(--animation), visibility var(--animation);
    transform: translateY(var(--status-height));
    box-sizing: border-box;
    pointer-events: none;
    visibility: hidden;
    z-index: 11;
  }
  .cafe-status.shown {
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }
  
  .cafe-order-overview {
    display: none;
    font-family: var(--default-font);
    background-color: var(--bg-color);
    transition: opacity var(--page-animation);
    opacity: 0;
  }
  .headwrappers{
    display: inline;
  }
  body.order-mode .cafe-order-overview {
    opacity: 1;
  }
  .cafe-order-header-wrap {
    padding: 11px 0px 14px 0px;
    display: flex;
    align-items: right;
    width: 100%;
     
  }
  .cafe-order-header {
    font-size: 17px;
    line-height: 21px;
    text-transform: uppercase;
    padding: 0;
    margin: 0;
    text-align: left;
    flex-grow: 1; /* Allow headers to grow and take available space */
    margin-left: 11px;
  }
  .total-header-wrap {
    padding: 11px 2px 14px 0px;
    display: flex;
    align-items: left;
    width: 100%;
    
  }
  
  .total-header {
    font-size: 17px;
    line-height: 21px;
    text-transform: uppercase;
    flex-grow: 1;
    padding: 0 ;
    margin: 0;
    text-align: center;
    min-width: 100%;
    
  }
  .cafe-order-edit {
    font-size: 19px;
    line-height: 18px;
    font-weight: 500;
    color: var(--accent-color);
  }
  .cafe-order-item {
    display: none;
    padding: 11px 0px 14px 0px;    
    align-items: center;
    width: 100%;
     
  }
  .cafe-order-item.show {
    display: flex;
  }
 
  .cafe-order-item-photo {
    text-align: center;
    width: 50px;
    height: 50px;
    margin-left: 7px;
  }
  .cafe-order-item-photo .cafe-item-emoji {
    font-size: 38px;
    line-height: 50px;
  }
  .cafe-order-item-photo .cafe-item-lottie {
    width: 40px;
    margin: 4px 0;
  }
  .cafe-order-item-title {
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
    padding: 3px 0;
  }
  .cafe-order-item-counter {
    color: var(--main-color);
    font-size: 15px;
    line-height: 18px;
    font-weight: 700;
  }
  .cafe-order-item-description {
    font-size: 12px;
    line-height: 17px;
    -webkit-font-smoothing: antialiased;
    color: var(--page-hint-color);
    padding: 2px 0;   
     white-space: normal;    
    word-wrap: break-word; /* Break words to prevent overflow */
    flex-grow: 1;
    padding: 0;
    margin: 0;
    text-align: left;   
    width: 23%;
    
  }
  .cafe-order-item-price {
    font-size: 14px;
    line-height: 17px;
    font-weight: 500;
    padding: 4px 4px;
    width: 20%;
     
  }
  .comment {
    display:none;
    margin-left: 11px;
  }
  .finalamount {
    margin-left: 11px;
    display: none;
  }
  .finalamount.show {

    display: flex;
  }
  .cafe-text-field-wrap {
    margin-top: 14px;
    width: 50%;
  }
  .cafe-text-field {
    font-family: var(--default-font);
    font-size: 13px;
    line-height: 12px;
    -webkit-font-smoothing: antialiased;
    padding: 12px 20px 13px;
    box-sizing: border-box;
    display: flex;
    outline: none;
    border-style: dotted;
    border-radius: 0;
    resize: none;
    color: var(--text-color);
    -webkit-user-select: auto;
    user-select: auto;
    cursor: auto;
    width: 100%;
  }
  .cafe-text-field::-webkit-input-placeholder {
    transition: color var(--animation);
    color: var(--placeholder-color);
    text-overflow: ellipsis;
  }
  .cafe-text-field::-moz-placeholder {
    transition: color var(--animation);
    color: var(--placeholder-color);
    text-overflow: ellipsis;
  }
  .cafe-text-field:-ms-input-placeholder {
    transition: color var(--animation);
    color: var(--placeholder-color);
    text-overflow: ellipsis;
  }
  .cafe-text-field::placeholder {
    text-overflow: ellipsis;
  }
  .cafe-text-field-hint {
    font-family: var(--default-font);
    font-size: 14px;
    line-height: 18px;
    -webkit-font-smoothing: antialiased;
    padding: 10px 5px 24px;
    color: var(--hint-color);
  }
  
  
  /* Style for the container div */
  .cafe-settings {
    display: none;
    justify-content: flex-start;
    align-items: center;
    margin-left: 20px;
}

/* Style for the input fields */
/* Style for each row */
.add-item {
   
  align-items: left;
  margin-bottom: 10px;
  padding-left: 10px;
}

.button-container {
  display: flex;
  align-items: center;
  padding: 5px;
}

.buttons-wrapper {
  display: flex;
  align-items: center;
}

.addNewItemBtn {
  margin: 0 0 0 25px; /* Adjust the margin as needed */
  position: relative;
  top: 0.2em; /* Adjust the value as needed */  
}
.delAllItemBtn {
  margin: 0 0 0 25px; /* Adjust the margin as needed */
  position: relative;
  top: 0.2em; /* Adjust the value as needed */  
}

.add-qty {
 
  padding-left: 1px; /* Adjust the padding as needed */
}


/* Style for the input fields */
.data-input {
  padding: 10px;
  margin: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 14px;
  width: 80%;
}
.desc-input {
  font-size: 14px;
 
}
/* Style for the button */
.data-item-incr-button {
  background-color: var(--main-color);
  border: none;
  padding: 10px;
  margin: 5px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
}

/* Style for the button text */
.button-item-data {
  color: white;
  font-weight: bold;
  margin-left: 5px;
}

 
.data-item-photo {
  position: relative;
  height: 78px;
  width: 20%;
}
/* Style for the placeholders */
.data-item-label {
  display: inline-block;
    max-width: 50%;
    
    text-overflow: ellipsis;
    vertical-align: top;
    position: relative;
    z-index: 1;
    
}

  .cafe-settings.show{
    display: block;
    
  }
  .button-item.ripple-handler {
    position: relative;
  }
  .ripple-mask {
    position: absolute;
    left: 0; right: 0;
    top: 0; bottom: 0;
    transform: translateZ(0);
    overflow: hidden;
    pointer-events: none;
  }
  .button-item .ripple-mask {
    border-radius: inherit;
  }
  .button-item .ripple {
    position: absolute;
    width: 200%;
    left: 50%; top: 50%;
    margin: -100% 0 0 -100%;
    padding-top: 200%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.07);
    transition:
      transform var(--ripple-duration) ease-out,
      opacity var(--ripple-duration) ease-out,
      background-color var(--ripple-duration) ease-out;
    opacity: 0;
  }
  .button-item-label {
    display: inline-block;
    max-width: 100%;
    /*overflow: hidden;*/
    text-overflow: ellipsis;
    vertical-align: top;
    position: relative;
    z-index: 1;
    
  }
  
  .cafe-item-add-button .ripple,
  .cafe-item-incr-button .ripple {
    background-color: #ed960b;
  }
  .cafe-item-decr-button .ripple {
    background-color: #d3362d;
  }
  
  
  .loading-icon {
    position: absolute;
    top: 0;
    right: 0;
    pointer-events: none;
    transform: scale(0);
    visibility: hidden;
    opacity: 0.2;
    transform-origin: 50%;
    transition: all var(--animation);
  }
  body.loading .loading-icon {
    transition-delay: .4s;
    transform: scale(1);
    visibility: visible;
    opacity: 1;
  }
  .loading-icon-circle {
    stroke: #fff;
    stroke-width: 2.25px;
    stroke-linecap: round;
    fill: transparent;
    transform: rotateZ(-90deg);
    transform-origin: 50%;
    animation: rotate-circle linear 1.5s infinite, resize-circle linear 360s infinite;
    stroke-dasharray: calc(var(--radius) * 6.28);
   
    --radius: 9px;
  }
  
  .cafe-item-quantity-wrap{
    display: none;
  }
  
  @-webkit-keyframes rotate-circle {
    from { transform: rotateZ(-90deg); }
    to   { transform: rotateZ(630deg); }
  }
  @keyframes rotate-circle {
    from { transform: rotateZ(-90deg); }
    to   { transform: rotateZ(630deg); }
  }
  
  @-webkit-keyframes resize-circle {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 12500px; }
  }
  @keyframes resize-circle {
    from { stroke-dashoffset: 0; }
    to   { stroke-dashoffset: 12500px; }
  }
  
  @-webkit-keyframes badge-incr {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(1.2, 1.2, 1); }
  }
  @keyframes badge-incr {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(1.2, 1.2, 1); }
  }
  
  @-webkit-keyframes badge-incr2 {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(1.2, 1.2, 1); }
  }
  @keyframes badge-incr2 {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(1.2, 1.2, 1); }
  }
  
  @-webkit-keyframes badge-decr {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(0.8, 0.8, 1); }
  }
  @keyframes badge-decr {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(0.8, 0.8, 1); }
  }
  
  @-webkit-keyframes badge-decr2 {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(0.8, 0.8, 1); }
  }
  @keyframes badge-decr2 {
    from, to { transform: scale3d(1, 1, 1); }
    40% { transform: scale3d(0.8, 0.8, 1); }
  }
  
  @-webkit-keyframes badge-show {
    from { transform: scale3d(0.5, 0.5, 1); opacity: 0; visibility: hidden; }
    30%  { transform: scale3d(1.2, 1.2, 1); }
    to   { transform: scale3d(1, 1, 1); opacity: 1; visibility: visible; }
  }
  @keyframes badge-show {
    from { transform: scale3d(0.5, 0.5, 1); opacity: 0; visibility: hidden; }
    30%  { transform: scale3d(1.2, 1.2, 1); }
    to   { transform: scale3d(1, 1, 1); opacity: 1; visibility: visible; }
  }
  
  @-webkit-keyframes badge-hide {
    from { transform: scale3d(1, 1, 1); opacity: 1; visibility: visible; }
    to   { transform: scale3d(0.5, 0.5, 1); opacity: 0; visibility: hidden; }
  }
  @keyframes badge-hide {
    from { transform: scale3d(1, 1, 1); opacity: 1; visibility: visible; }
    to   { transform: scale3d(0.5, 0.5, 1); opacity: 0; visibility: hidden; }
  }

  .cafe-item-photo {
    cursor: pointer;
  }
  
  .pulse {
    animation: pulseAnimation 0.3s 1 normal;
  
  }
  
  @keyframes pulseAnimation {
    0% {
      transform: scale(1); /* Initial scale */
    }
    100% {
      transform: scale(1.5); /* Scale to 110% */
    }
  }

  .hidden {
    display: none;
  }
  
  .loadingAnimation {
    margin: auto;
    width: 80px;
    height: 80px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }
  
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
 
  #ton-connect-button {
    display: none;
    
  }
 
  .tonconnect{
    background-color: #0098EA;
    color: #FFFFFF;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
    padding: 8px 16px 8px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    border-radius: 10px;
    font-weight: bolder;
  }
  .header-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  .header-container h1 {
      padding: 5px;
  }

  /* Your existing styles */

.container {
  max-width: 100%;
  margin: auto;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  background-color: #f9f9f9;
  transition: background-color 0.3s, color 0.3s;
  position: relative;
}
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dark-mode-toggle {
  position: relative;  
  top: 10px;
  right: 10px;
}
.dark-mode-toggle input {
  display: none;
}
.dark-mode-toggle label {
  cursor: pointer;
  background: #ccc;
  border-radius: 34px;
  display: inline-block;
  height: 26px;
  position: relative;
  width: 50px;
}
.dark-mode-toggle label:before {
  content: '';
  background: #fff;
  border-radius: 50%;
  height: 20px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 20px;
  transition: 0.3s;
}
.dark-mode-toggle input:checked + label {
  background: #2196f3;
}
.dark-mode-toggle input:checked + label:before {
  transform: translateX(24px);
}
.language-selector {
  cursor: pointer;
  display: flex;
  align-items: center;
  position: absolute;
  top: 10px;
  right: 10px;
}
.language-selector img {
  width: 40px;
  height: 30px;
  margin-left: 10px;
  border:1px solid #ccc;
  border-width: 1px;
}
.language-list {
  display: none;
  position: absolute;
  top: 30px;
  right: 0;
 /* background-color: white; */ 
 /*  border: 1px solid #ccc;*/
  padding: 5px;
}
.language-list img {
  display: block;
  margin-bottom: 5px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.header img {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}
.header h1 {
  font-size: 18px;
  margin: 0;
}
.balance-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px;
}

.balances {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  margin-bottom: 10px;
  /*-webkit-text-stroke:medium;*/
  font-size: 18px;
}

.balance-container span {
  font-weight: bold;
  overflow-wrap: anywhere;
  max-width: 50%;
}

.buy-sell-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 10px;
}

.buy-stars-button,
.sell-stars-button {
  color: white;
  border: none;
  border-radius: 5px;
  padding: 7px 10px;
  cursor: pointer;
  font-weight: bold;
  
}

.buy-stars-button {
  background-color: #4caf50;
  font-size: 15px;
}

.sell-stars-button {
  background-color: #0c99f7;
  margin-left: 10px;
  font-size: 15px;
}

.dracoinbalance {
  display: flex;
  align-items: center;
  /*font-size: 16px;*/
  overflow-wrap: anywhere;
}

.dracoinbalance img {
  width: 30px;
  height: 30px;
  margin-left: 5px;
  vertical-align: middle;
}
.smalldracoinbalance{
  width: 25px!important;
  height: 25px!important;
  margin-left: 3px;
  vertical-align: middle;
}
/* Swap block styles */
.main-swap-container {
  background-color: gray;
  border-radius: 20px;
  padding: 10px;
  margin: 10px;
  opacity: 0.9;
}
.main-swap-container.dark-mode{
  background-color: darkslategray;
  border-radius: 20px;
  padding: 10px;
  margin: 10px;
  opacity: 0.9;
}
.swap-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  max-width: 100%;
  
}

.swap-container input {
  width: 60%; /* Increase width slightly for better appearance */
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  border: 2px solid #ccc;
  font-size: 18px;
  font-family: 'Lucida Sans', 'Lucida Grande', Geneva, Verdana, sans-serif;
  
  background: #f7f7f7; /* Light background for input */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle inner shadow for depth */
  transition: all 0.3s ease; /* Smooth transition for focus */
}

.swap-container input:focus {
  border-color: #d35400; /* Highlight border on focus */
  outline: none;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 0 5px rgba(211, 84, 0, 0.5); /* Outer shadow for focus */
}

.swap-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-direction {
  background-color: #f0ad4e;
  color: black;
  border: none;
  border-radius: 10px;
  padding: 5px 10px;
  cursor: pointer;
  font-weight: bold;
  margin: 10px;
  font-size: 25px;
}

.swap-result {
  margin-top: 10px;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
 /*width: max-content;*/
  display: flex; /* Added flex for alignment */
  align-items: center; /* Center vertically */
  overflow-wrap: anywhere ;
}
.swap-result img {
  
  margin-left: 5px; /* Optional margin for spacing */
}
#swap-label{
  
 font-size: 20px;  
}
@keyframes swapAnimation {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); /* Add a glowing effect */
  }
  50% {
    transform: scale(1.05); /* Slight scaling for effect */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); /* Increase glow */
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); /* Return to original glow */
  }
}

/* Apply animation to the main swap container */
.main-swap-container.swap-in-progress {
  animation: swapAnimation 1s infinite;
}

.swap-in-progress .withdraw-button {
  background-color: #f0ad4e;
  color: white;
  cursor: not-allowed; /* Change cursor to indicate in-progress state */
  pointer-events: none; /* Disable button during the swap */
}





#marketinfo{
  
  font-size: 18px;  
 /* font-family: 'MedievalSharp', cursive;*/
 }
 
.withdraw-button {
  background-color: #0c99f7;
  width: 150px;
  height: 40px;
  border-radius: 30px;
  color: white;
  font-family: 'MedievalSharp', cursive;
  font-size: 16px;
}
.dracoin{
  width: 40px;
  height: 40px;
}
.price-dracoin{
  width: 22px!important;
  height: 22px!important;
  vertical-align: middle;
}
.form-group {
  margin-bottom: 15px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
}
.form-group input,
.form-group textarea {
  width: 99%;
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.form-group textarea {
  resize: none;
}
.buttons {
  display: flex;
  justify-content: space-between;
}
.buttons button {
  flex: 1;
  padding: 10px;
  margin: 0 5px;
  border: none;
  border-radius: 5px;
  background-color: #ffcc00;
  cursor: pointer;
  font-weight: bold;
}
.buttons button:first-child {
  margin-left: 0;
}
.buttons button:last-child {
  margin-right: 0;
}
.item-list {
  margin-top: 20px;
}
.item {
  /*background-color: inherit;*/
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #ccc;
  transition: background-color 0.3s, color 0.3s;
}
.item img {
  width: 50px;
  height: 50px;
  margin-right: 10px;
}
.item-details {
  font-family: Arial, Helvetica, sans-serif;
  flex-grow: 1;
  overflow: hidden;
  overflow-wrap: break-word;
}
.item-details p {
  margin: 0;
}
.namebg {
  background-color: dimgray;
  padding-right: 1px;
}
.item-amount {
  display: flex;
  flex-direction: column;
  align-items: baseline;
  margin-top: 5px;
}
.item-amount div {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
.item-amount button {
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 10px;
  background-color: #ffcc00;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 4px #d1a700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.1s;
  font-size: large;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.item-amount button:active {
  box-shadow: 0 2px #d1a700;
  transform: translateY(2px);
}
.item-amount input {
  width: 40px;
  text-align: center;
  margin: 0 5px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  padding: 5px;
}
.delete-button {
  background-color: #ff4444;
  border-radius: 5px;
  /*color: white;*/
  padding: 5px 10px;
  cursor: pointer;
  font-weight: bold;
}

body.dark-mode {
  background-color: #333;
  background-image: url('img/buildings/night.jpg?v=1'); /* Insert your image URL here */
    background-size: cover; /* Ensures the image covers the entire background */
    background-position: center; /* Centers the background image */
    background-blend-mode: color-burn;
  color: #f9f9f9;
 /*color: #ffcc00;*/
}
.container.dark-mode {
  background-color: #444;
  color: #f9f9f9;
}
.form-group input.dark-mode,
.form-group textarea.dark-mode {
  background-color: #555;
  color: #f9f9f9;
  border-color: #777;
}
.item.dark-mode {
  background-color: #333;
  color: #f9f9f9;
  border-color: #777;
}
.settingsicon {
  width: 50px;
  height: 50px;
  display: block;
}
/*html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;  Prevent scrolling 
}*/

.container {
  height: 100vh; /* 100% of the viewport height */
  display: flex;
  flex-direction: column;
}

.content {
  flex: 1;
  overflow-y: auto; /* Enable scrolling for the content */
  padding: 20px;
  box-sizing: border-box;
}

.header,
.balance-container,
.form-group,
.buttons {
  flex-shrink: 0;
}

.item-list {
  flex-grow: 1;
  overflow-y: auto; /* Allow scrolling for the item list */
  margin-top: 20px;
}
.item-list.hidden {
 display: none;
}
.top-bar {
  flex-shrink: 0;
}



.show-table-btn {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}
.show-table-btn:hover {
  background-color: #0056b3;
}
.price-table {
  width: 100%;
  max-width: 350px;
  margin: 20px auto;
  border-collapse: collapse;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.price-table tr {
  border-bottom: 1px solid #ddd;
}
.price-table th, .price-table td {
  padding: 10px;
  text-align: left;
}
.price-table tr:hover {
  background-color:#276829;
  cursor: pointer;
}
.popup {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: #4caf50;
  border-radius: 10px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  z-index: 1001;
}
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.popup2 {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 20px;
  background-color: #0c99f7;
  border-radius: 10px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  z-index: 1001;
}
.popup-overlay2 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #dc3545;
  color: white;
  border: none;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  text-align: center;
  line-height: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}
.close-btn:hover {
  background-color: #c82333;
}



/* Стили для заставки */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff; /* Замените на нужный цвет */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* Обеспечивает отображение поверх других элементов */
  opacity: 1;
  transition: opacity 0.5s ease;
  background: linear-gradient(135deg, #f06, #4a90e2);
  background-image: url('img/buildings/day.jpg');
  background-size: cover; /* Adjusts the background image to cover the container */
  background-position: center center; /* Centers the image */
  background-repeat: no-repeat; /* Prevents the image from repeating */
}


#preloader.hidden {
  opacity: 0;
  pointer-events: none;
}

.loader {
  width: 75px;
  height: 75px;
  /*border: 5px solid #ccc;*/
  border-top-color: #1e90ff;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite; /*spin 1s linear infinite, */
}

/* Animation Keyframes */
@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(52, 152, 219, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(52, 152, 219, 0);
  }
}

/* New button styles */
.menu-button-container {
  position: fixed; /* Fix it to the viewport */
  bottom: 0; /* Align it to the bottom */
  left: 0; /* Start from the left */
  width: 100%; /* Make it span the full width */
  background-color: #fefadf; /* Background color for better visibility */
  display: flex; /* Align items in a row */
  flex-wrap: nowrap; /* Ensure the items don’t wrap to the next line */
  justify-content: space-around; /* Distribute items evenly with space around */
  align-items: center; /* Center align items vertically */
  padding: 7px 0; /* Add some vertical padding */
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); /* Add shadow above */
  z-index: 1000; /* Ensure it stays above other elements */
}
.menu-button-container.dark-mode {  
  background-color: #000000; /* Background color for better visibility */
  
}

.menu-custom-button {
  display: flex;
  flex-direction: column; /* Stack image and text vertically */
  align-items: center;
  justify-content: flex-start;
  width: 25%; /* Adjust button width */
  height: 85px; /* Let height adjust based on content */
   /* margin: 0 10px;Horizontal spacing between buttons */
  border: none;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.menu-custom-button img {
  max-width: 50px; /* Adjust size */
  max-height: 50px;
  margin-bottom: 5px; /* Space between image and text */
  border-radius: 50%; /* Round images */
}

.menu-custom-button:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: #e0e0e0;
  transform: scale(1.05); /* Slightly enlarge on hover */
}
.menu-button-container.hide {
 display: none;
}
.addeditem {
  background-color: white;
}
#loading-spinner {
  border: 8px solid #f5e1c0;
  border-top: 8px solid #4a3628;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
  position: fixed;
  left: 150px;
  top:150px;
}
.transparent-balance{
  opacity: 0;
}