/* Basic reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg,#8B95FF, #1e90ff);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px;
}

/* Header */
header { text-align: center; margin: 18px 0; }
header h1 { font-size: 1.8rem; margin-bottom: 6px; }
header p { opacity: 0.95; font-size: 0.95rem; }

/* Main layout */
main { width: 100%; max-width: 1100px; margin-top: 12px; }
.tool {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 20px;
  align-items: start;
}

/* Controls panel */
.controls {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  padding: 18px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.row { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.small { gap: 8px; margin-top: 8px; }

.switch-group span { display:block; font-size: 0.85rem; margin-bottom: 6px; }
.switch-group select {
  padding: 8px 10px; border-radius: 8px; border: none; font-weight:600;
}

/* Angle group */
.angle-group { display:flex; gap:8px; align-items:center; }
.angle-group input[type="range"] { width: 140px; }
.angle-group input[type="number"] { width:64px; padding:6px 8px; border-radius:6px; border:none; }

/* Colors area */
#colors-area { display:flex; flex-direction: column; gap:10px; margin-bottom:6px; }

.color-row {
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
}

.color-picker {
  display:flex; gap:8px; align-items:center;
  background: rgba(255,255,255,0.04);
  padding:8px; border-radius:10px;
}

.color-picker input[type="color"] {
  width:42px; height:42px; border-radius:8px; border: none; padding:0;
}

.color-picker input[type="text"] {
  width:100px; padding:6px 8px; border-radius:8px; border:none; font-weight:600; background:transparent; color:#fff;
}

.color-picker button.remove {
  background: transparent; color:#fff; border:1px solid rgba(255,255,255,0.12);
  padding:6px 8px; border-radius:8px; cursor:pointer; font-weight:600;
}

/* Actions */
.actions button, .small button, #add-color {
  background: #fff; color:#1e90ff; border:none; padding:8px 12px; border-radius:8px; cursor:pointer; font-weight:600;
}
.actions button:hover, .small button:hover, #add-color:hover {
  background:#1e90ff; color:#fff;
}

/* Preview area */
.preview-area {
  display:flex; flex-direction: column; gap:12px; align-items:center;
}

.preview {
  width: 100%;
  max-width: 420px;
  height: 260px;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(135deg,#8B95FF,#1e90ff);
}

/* Code box */
.code-box {
  width:100%; max-width:420px;
  background: rgba(255,255,255,0.08);
  padding:10px; border-radius:10px; position: relative;
}
.code-box label { font-size:0.85rem; opacity:0.95; margin-bottom:6px; display:block; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace; font-size:0.95rem; color:#fff; white-space:pre-wrap; word-break:break-all; }

/* Favorites area */
.favorites { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.fav-chip {
  background: rgba(255,255,255,0.08); padding:6px 8px; border-radius:8px; cursor:pointer; border:1px solid rgba(255,255,255,0.06);
  font-weight:600;
}

footer{
  text-align: center;
  margin:50px 0px -25px;
  font-size: 0.5rem;
  opacity: 0.6;
  color:#fff;
  background:#000;
  width:100vw;
  padding:40px 10px;
  
}

.testAlso{
  display:flex; flex-direction:column; align-items:space-around; margin-bottom:20px;
  font-weight:bold;
}
.testAlso a{
  color: white ;
  background:#1e90ff;
  border-radius:30px;
  width:fit-content;
  margin:5px auto;
  padding:3px;
  font-weight:bold;
  text-decoration:none;
}



/* Responsive */
@media (max-width: 920px) {
  .tool { grid-template-columns: 1fr; }
  .preview { max-width: 100%; height:200px; }
}
@media (max-width: 480px) {
  header h1 { font-size:1.4rem; }
  .angle-group input[type="range"] { width:110px; }
  .color-picker input[type="text"] { width:78px; }
  .preview { height:180px; }
}