/* ================================
   MAIN.CSS - SMART ELEMENTS (ORIGINAL STYLE RESTORED)
   ================================ */

/* -------------------------------
   BODY
   ------------------------------- */
body {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  font-family: sans-serif;
  background: url('../bg.png') no-repeat center center fixed;
  background-size: cover;
  position: relative;
  padding-top: 60px; /* for theme picker */
}

/* -------------------------------
   CARD / PANEL
   ------------------------------- */
.smart-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;

  width: 90%;
  max-width: 700px;
  padding: 20px;
  box-sizing: border-box;

  /* ORIGINAL GLASS PANEL STYLE */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* -------------------------------
   SMART CONTAINER
   ------------------------------- */
.smart-container {
  display: flex;
  flex-wrap: wrap;       /* items wrap to new line */
  gap: 10px;             /* spacing between items */
  width: 100%;
}


/* -------------------------------
   SMART ITEM WRAPPER
   ------------------------------- */
.smart-item {
  display: flex;
  justify-content: center;
  align-items: center;
  flex: 1 1 0;           /* grow/shrink evenly */
  min-width: 0;          /* prevent overflow */
}


/* -------------------------------
   PLAIN BUTTONS (NO IMAGE)
   ------------------------------- */
.smart-item button {
  width: 100%;
}

.smart-item button:not(.has-image) {
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-family: sans-serif;
  color: white;
  background-color: rgba(70,130,180,0.8); /* steelblue */
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s all ease;
}

/* Hover effect for plain buttons */
.smart-item button:not(.has-image):hover {
  background-color: rgba(70,130,180,1);
}

/* -------------------------------
   BUTTONS WITH ICONS / IMAGES
   ------------------------------- */
.smart-item button.has-image {
  width: 100%; /* still stretchable */
  padding: 10px 10px;
  font-size: 0px;
  font-family: sans-serif;
  color: white;
  background-color: rgba(233, 78, 218, 0.8);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s all ease;
}

.smart-item button.has-image:hover {
  background-color: rgb(218, 78, 233);
}

/* ICON INSIDE BUTTON */
.button-icon {
  width: 80px;
  max-width: 80px;
  max-height: 24px;
  height: auto;
  margin-right: 80px;
  vertical-align: middle;
}

/* ICON-ONLY BUTTONS */
button.icon-only {
  flex: 0 0 60px;        /* fixed square cell */
  width: 60px;
  height: 60px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

button.icon-only .button-icon {
  margin-right: 0;
  max-width: 32px;
  max-height: 32px;
}


/* -------------------------------
   IMAGES (STANDALONE)
   ------------------------------- */
.smart-item img {
  width: 500px;       /* desired width */
  height: auto;       /* maintain aspect ratio */
  max-width: none;    /* prevent flexbox capping */
  display: inline-block;  /* allow natural sizing */
  flex-shrink: 0;     /* prevent shrinking inside flex */
  object-fit: contain; 
  border-radius: 50px;
  transition: 0.2s all ease;
}

.smart-item img:hover {
  transform: scale(1.0);
}

/* -------------------------------
   TEXT ELEMENTS
   ------------------------------- */
.smart-item p {
  font-size: 20px;
  color: white;
  text-align: center;
  margin: 0;
  word-wrap: break-word;
}

/* -------------------------------
   THEME PICKER
   ------------------------------- */
.theme-picker {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;

  padding: 6px 10px;
  font-size: 14px;
  font-family: sans-serif;
  background-color: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 5px;
  cursor: pointer;
  transition: 0.2s all ease;
}

.theme-picker:hover {
  background-color: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.6);
}

/* -------------------------------
   FLEX BREAK / NEW ROW
   ------------------------------- */
.smart-container > div[style*="flex-basis:100%"] {
  flex-basis: 100%;
  height: 0;
}

