body, html {
  margin: 0;
  padding: 0;
  background-color: #FDF6EC;
  color: #333333;
  height: 100%;
}

/* Layout */
.container-ai {
  display: flex;
  flex-direction: row;
  height: auto;
  position: relative;
}

.sidebar-overlay{
	width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: #0000008c;
    z-index: 999;
	visibility:hidden;
}
.sidebar-overlay.open{
	visibility:visible;
}
.sidebar {
  width: 220px;
  background: #ffffff;
  border-right: 2px solid #ff6b6b;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  color: #333333;
  transition: transform 0.3s ease;
  z-index: 20;
	position: fixed;
	top: 0;
	left: 0;
  height: 100%;
}

.logo i {
  font-size: 24px;
}

.menu {
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.menu-title {
  font-size: 15px;
  color: #333;
  font-weight: bold;
  margin-top: 5px;
  margin-bottom: 6px;
}

.menu a i {
  font-size: 18px;
  color:#777;
}

.menu a:hover i{
	color: #ff8b71;
}

#aicp-user-quota p{
	padding: 8px 12px;
    color: #555;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

#aicp-user-quota p i{
	color:#777;
	font-size: 16px;
}

#aicp-user-quota p span{
	font-weight: 600;
	color:#444
}
.main-content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 20px;
  background-color: #fefefe;
  color: #333333;
  border-radius: 16px;
  box-sizing: border-box;
  height: auto;
  overflow: auto;
  margin-left:270px;
  min-height: 100vh;
  padding-bottom: 90px;
}

.background-image {
  position: absolute;
  inset: 0;
  background-color: #fffdeb; 
  opacity: 0.06;
  z-index: 0;
  display:none;
}

.center-content {
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
  padding: 1.7rem;
  background: rgb(255, 245, 245);
  border-radius: 24px;
  border:1px solid;
  border-color: rgb(255, 220, 220);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  max-width: 640px;
  text-align: center;
  color: #333333;
}

.center-content.hidden,.scroll-indicator.hidden{display:none}

.title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 12px;
  color: #333;
}

.highlight {
  color: #222;
}

.subtitle {
  color: #444;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.example {
  font-size: 1.1rem;
  color: #ff6b6b;
  font-style: normal;
}

.scroll-indicator {
  margin-top: 30px;
  font-size: 24px;
  color: #ff6b6b;
  animation: bounce 1.5s infinite;
  z-index: 1;
  position: relative;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
.aicp-textarea{
	position: fixed;
    bottom: 0;
    text-align: center;
    left: 270px;
    width: calc(100% - 270px);
    background: #fff5f5;
    height: fit-content;
    padding: 20px 0;
    z-index: 50;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
	border-top: 1px solid #fff;
}
.prompt-bar {
  position: relative;
  width: calc(100% - 60px);
  display: flex;
  background-color: white;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  padding: 10px 16px;
  margin:0 auto;
  gap: 10px;
  z-index: 10;
}

.prompt-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: #222;
}

.prompt-bar button {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 20px;
  transition: 0.2s ease;
}

.send-btn {
  padding: 8px 12px;
  border-radius: 999px;
}

.send-btn:hover {
  background-color: #ff6b6b;
  color:#fff;
}
.menu-toggle-btn{display:none}
.center-content.hidden, .scroll-indicator.hidden{display:none}
#autocomplete-suggestions{
	box-shadow: 0 1px 7px rgba(0, 0, 0, .2);
	width:calc(100% - 60px) !important;
	border-radius:5px;
	border:none !important;
}
#autocomplete-suggestions li{
	text-align:left;
	font-weight:500;
	font-size:1rem;
	color:#555;
}

/*CSSResult*/
#aicp-image-output, .aicp-user-gallery {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    justify-content: center;
    flex-wrap: wrap;
	width:100%;
}

.aicp-img-container {
  flex: 0 0 auto;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s ease, z-index 0.3s, box-shadow 0.3s;
  z-index: 1;
  width: calc(33% - 30px);
  flex-basis: calc(33% - 30px);
  padding-bottom: 45px;
}
.img-wrap{
	display: flex;
	align-content: center;
	align-items: center;
	justify-content: center;
	aspect-ratio: 210 / 270;
    width: 100%;
	box-shadow: 0 6px 10px #0000004d;
	border-radius:3px;
}



.aicp-img-thumb {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  pointer-events: none;
}


.btn-wrap {
  position: absolute;
  bottom: 2px;
  width: 100%;
  display: flex;
  height:35px;
  justify-content: space-between;
  gap: 1px;
}

.btn-wrap > button, .btn-wrap > a, .btn-wrap > form {
  flex: 1;
  padding: 10px 0;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: 0.2s;
  text-align: center;
  background-color: #12acf5; /* xanh đậm */
  color: white;
}

/* Màu hiện đại */
.aicp-btn-download,.btn-wrap > a{
  border-radius:6px 0 0 6px;
}

.img-coloring{
  border-radius:0 6px 6px 0;
}

.btn-wrap > button:hover, .btn-wrap > a:hover, .btn-wrap > form:hover {
  background-color: #ff8670;
}
.btn-wrap > form button{background:transparent;border:none}
.btn-wrap > button svg,.btn-wrap > form button svg{
	fill:#fff;width:20px
}

/* Icon */
.btn-wrap i {
  pointer-events: none;
}

/*Select count images*/
.aicp-slider-wrapper {
  margin: 0 15px;
}

.aicp-slider-wrapper label {
  display: block;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 15px;
}

.aicp-slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  appearance: none; 
  width: 100%;
  height:12px;
  cursor: pointer;
  outline: none;
  overflow: hidden;
  border-radius: 16px;
  display:inline-block;
}

.aicp-slider-wrapper input[type="range"]::-webkit-slider-runnable-track {
  height: 12px;
  background: #ccc;
  border-radius: 16px;
}

.aicp-slider-wrapper input[type="range"]::-moz-range-track {
  height: 12px;
  background: #ccc;
  border-radius: 16px;
}

.aicp-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none; 
  height: 12px;
  width: 12px;
  background-color: #fff;
  border-radius: 50%;
  border: 2px solid #0073aa;
  box-shadow: -407px 0 0 400px #0073aa;
}

.aicp-slider-wrapper input[type="range"]::-moz-range-thumb {
  height: 12px;
  width: 12px;
  background-color: #fff;
  border-radius: 50%;
  border: 1px solid #0073aa;
  box-shadow: -407px 0 0 400px #0073aa;
}


#aicp-batch-value {
  color: #0073aa;
  font-weight: bold;
  font-size: 16px;
  margin-left: 5px;
}


/* -------- Responsive -------- */

@media (max-width: 1280px) {
}


@media (max-width: 1000px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 200px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    background: #fff;
    z-index: 1000;
  }
  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle-btn {
    position: fixed;
    top: 10px;
    left: 16px;
    width: 36px;
    height: 36px;
    background-color: #ff6b6b;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .menu-toggle-btn:hover {
    background-color: #ff6b6b;
  }

  .menu-toggle-btn span,
  .menu-toggle-btn span::before,
  .menu-toggle-btn span::after {
    display: block;
    background-color: white;
    height: 3px;
    width: 20px;
    border-radius: 2px;
    position: relative;
  }
  .menu-toggle-btn span::before,
  .menu-toggle-btn span::after {
    content: "";
    position: absolute;
  }
  .menu-toggle-btn span::before {
    top: -6px;
    left: 0;
  }
  .menu-toggle-btn span::after {
    top: 6px;
    left: 0;
  }

  .main-content {
    border: none;
    border-radius: 0;
    box-sizing: border-box;
	margin-left: 0;
    padding: 60px 0px 0;
  }
  
  .aicp-textarea{width: 100%;left: 0;}
  .aicp-btn-download,.aicp-btn-print {opacity:1}
  
  #aicp-image-output,.aicp-user-gallery{
	  width:calc(100% - 60px);
	  padding: 60px 30px 120px;
	  overflow-x: auto;
	  overflow-y: hidden;
	  scroll-snap-type: x mandatory;
	  -webkit-overflow-scrolling: touch;}

  .center-content {
    padding: 1.3rem;
	margin: 10px;
  }

  .title {
    font-size: 28px;
  }

  .sidebar .logo{margin-top:30px}
}

@media (max-width: 768px) {
	.aicp-img-container{
	  width: calc(50% - 30px);
	  flex-basis:calc(50% - 30px)
	}
}

@media (max-width: 450px) {
	.aicp-img-container{
	  width: calc(100% - 30px);
	  flex-basis:calc(100% - 30px)
	}
}