/* ============================
   Kidale Dress-Up Game – Clean v1.6.1
   ============================ */

/* --- Thumbnails & Items --- */
.du-thumb {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06);
}
.du-label {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #111827;
}

/* Active / worn state */
.du-thumb.is-active {
  opacity: .7;
  border: 2px solid #4f46e5;
  box-shadow: 0 0 6px rgba(79, 70, 229, 0.6);
  /* pointer-events: none; ΑΦΑΙΡΕΙΤΑΙ ώστε να μπορεί να γίνει undress */
}
/* Locked appearance */
.du-thumb.is-locked {
  filter: grayscale(100%);
  opacity: 0.55; /* όσο πιο χαμηλό τόσο πιο “ξεκλείδωτο” μοιάζει */
}
/* Locked trophy (λουκετάκι) */
.du-thumb.is-locked::after {
  content: "🔒";
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 1.2em;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  padding: 2px;
}

/* Gold trophy (⭐) */
.du-thumb.is-gold::after {
  content: "⭐";
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 1.1em;
  color: gold;
}

/* --- Modal --- */
.du-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: grid;
  place-items: center;
  z-index: 99999;
  animation: du-fade-in .2s ease-out both;
}
.du-modal.hidden { display: none; }
.du-modal-box {
  background: #fff;
  padding: 18px;
  border-radius: 14px;
  width: min(360px, 92vw);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}
.du-modal .du-btn { 
	background: #dc2626; /* κόκκινο */
    color: #fff;
	margin-top: 10px; }

@keyframes du-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================
   Responsive Layout
   ============================ */

/* --- DESKTOP / TABLET --- */
@media (min-width: 769px) {
  .du-wrapper {
    display: grid;
    grid-template-columns: 2fr 3fr auto; /* left grid, stage, right buttons */
    height: 100vh;
  }
	.du-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, 160px);
  gap: 8px;
  background: #f8fafc;
  padding: 10px;
  max-width: 320px;
}
  /* Left panel: 2x5 grid 
  .du-left-panel {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 6px;
    background: #fff;
    box-shadow: inset -1px 0 4px rgba(0, 0, 0, .08);
  }*/

  .du-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 11px;
    text-align: center;
  }

  .du-stage-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #e0e7ff;
    padding: 4px;
  }
	
  .du-btn {
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    text-align: center;
    background: #dc2626; /* κόκκινο */
    color: #fff;
	color: white;
    cursor: pointer;
  }
  .du-btn-reset { background: #ef4444; }
  .du-btn-exit  { background: #3d2b1f; }
	
  .du-stage {
    aspect-ratio: 3/4;
    width: 90%;
    background: #065f46;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    overflow: hidden;
  }

  .du-stage img {
    position: absolute;
    inset: 0;
    width: 95%;
    height: 95%;
	justify-content: center;
    object-fit: contain;
    display: block;
  }

  .du-right-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
    background: #fff;
    box-shadow: inset 1px 0 4px rgba(0, 0, 0, .08);
  }


}

/* --- MOBILE PORTRAIT --- */
/* --- MOBILE PORTRAIT --- */
@media (max-width: 768px) {
  .du-wrapper {
    display: flex;
    flex-direction: column;
    height: 95vh;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
  }

  /* Stage full width, 70% ύψος */
  .du-top {
    flex: 0 0 70%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: #e0e7ff;
    width: 100%;
  }

  .du-stage {
    aspect-ratio: 3 / 4;
    width: 100%;
    max-height: 100%;
    border-radius: 12px;
    background: #065f46;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
  }

  .du-stage img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
  }

  /* Buttons πάνω δεξιά */
  .du-buttons {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    background: #dc2626; /* κόκκινο */
    color: #fff;
	gap: 8px;
    z-index: 10;
  }
  .du-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    background: #dc2626; /* κόκκινο */
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  }
  .du-btn-reset { background: #ef4444; }
  .du-btn-exit  { background: #3d2b1f; }

  /* Κάτω μπάρα: 2 γραμμές x 5 στήλες */
  .du-bottom {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 6px;
    background: #1e293b;
    padding: 6px;
    width: 100%;
    max-width: 100vw;
    min-width: 0;
  }

  .du-item {
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    color: #111827;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-width: 0; /* FIX για να μη σπάει το grid */
  }

  .du-item img {
    width: 70%;
    height: auto;
    object-fit: contain;
    margin-bottom: 3px;
  }

  .du-item span {
    font-size: 11px;
    line-height: 1;
    text-align: center;
    word-break: break-word;
  }
}
