/* ==============================
   WORD COUNTER - MODERN UI CSS
   (SEPARATE STYLESHEET READY)
============================== */

/* ROOT VARIABLES */
:root {
  --primary: #8a2be2;
  --secondary: #4facfe;
  --glass: rgba(20, 20, 35, 0.65);
  --text: #ffffff;
  --muted: #cfcfcf;
 --font-main: system-ui, -apple-system, BlinkMacSystemFont, 
               "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, 
               "Open Sans", "Helvetica Neue", sans-serif;
}

/* MAIN WRAPPER */
.generator-wrapper {
  padding: 40px 0;
}

/* INNER CONTAINER */
.glass-card.theme-purple .gen-controls {
  width: min(820px, 92%);
  margin: 0 auto;

  padding: 28px;

  background: var(--glass);
  backdrop-filter: blur(14px);

  border-radius: 20px;

  border: 1px solid rgba(138, 43, 226, 0.25);

  box-shadow:
    0 10px 40px rgba(0,0,0,0.35),
    0 0 30px rgba(138, 43, 226, 0.15);

  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* TITLE */
.gen-controls h1 {
  font-size: 1.9rem;
  color: var(--text);
  text-align: center;
  line-height: 1.3;
}

/* TAGLINE */
.tagline {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
}

.tagline strong {
  color: #fff;
}

/* FORM */
.calculator {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* TEXTAREA LABEL */
.calculator label {
  display: block;
  margin-bottom: 8px;

  font-size: 14px;
  font-weight: 600;

  color: #e5e7eb;
}

/* TEXTAREA */
.calculator textarea {
  width: 100%;
  min-height: 240px;

  padding: 16px;

  border-radius: 14px;

  border: 1px solid rgba(255,255,255,0.12);

  background: rgba(255,255,255,0.06);
  color: #fff;

  font-size: 15px;
  line-height: 1.6;

  resize: vertical;

  outline: none;

  transition: 0.3s ease;

  overflow-y: auto;

  backdrop-filter: blur(10px);
}

/* FOCUS EFFECT */
.calculator textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 18px rgba(138, 43, 226, 0.35);
}

/* SCROLLBAR */
.calculator textarea::-webkit-scrollbar {
  width: 8px;
}

.calculator textarea::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
}

.calculator textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
}

.calculator textarea::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #a855f7, #60a5fa);
}

/* OUTPUT BOX */
.output {
  display: flex;
  flex-direction: column;
  gap: 10px;

  padding: 18px;

  border-radius: 16px;

  background: rgba(255,255,255,0.04);

  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(12px);
}

/* OUTPUT ITEMS */
.output p {
  margin: 0;
  padding: 10px 12px;

  border-radius: 10px;

  font-size: 14px;
  color: #f3f4f6;

  background: rgba(255,255,255,0.03);

  border-left: 3px solid var(--primary);

  transition: 0.25s ease;
}

/* HOVER EFFECT */
.output p:hover {
  transform: translateX(4px);
  background: rgba(138, 43, 226, 0.08);
}

/* BUTTON WRAPPER */
.calculator > div:last-child {
  display: flex;
  gap: 12px;
}

/* BUTTONS */
.calculator button {
  flex: 1;

  padding: 12px;

  border-radius: 12px;

  border: none;

  cursor: pointer;

  font-size: 13px;
  font-weight: 600;

  text-transform: uppercase;

  letter-spacing: 0.8px;

  transition: 0.25s ease;

  color: #fff;

  background: linear-gradient(135deg, var(--primary), var(--secondary));

  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* RESET BUTTON */
.calculator button[type="reset"] {
  background: rgba(255,255,255,0.08);
  box-shadow: none;
}

/* HOVER EFFECT */
.calculator button:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}



/* case converter */
/* ==============================
   CASE CONVERTER BUTTONS (PRO UI)
   ============================== */
/* ==============================
   CASE CONVERTER - PRO BUTTON UI
============================== */
.case-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

/* Each button */
.case-btn-row button {
  flex: 1 1 calc(33.33% - 8px); /* 3 buttons per row */
  min-width: 120px;

  padding: 8px 10px;
  font-size: 14px;

 background: rgba(255, 255, 255, 0.08);
  color: #fff;

  border-radius: 6px;
  cursor: pointer;

  text-align: center;
  white-space: nowrap;

  text-transform: none !important;
}

/* Hover (light only) */


/* Click effect */
.case-btn-row button:active {
  transform: scale(0.98);
}


/* case converter */


/* ==============================
   LOREM IPSUM TOOL (FAST UI)
   Lightweight + Performance Optimized
============================== */

/* INPUT FIELD */
.input-field {
  width: 100%;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);

  background: rgba(255,255,255,0.04);
  color: #fff;

  font-size: 14px;

  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 8px rgba(138, 43, 226, 0.25);
}

/* GROUP */
.input-group,
.output-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==============================
   RADIO GRID (NO :has → FAST)
============================== */

.radio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 6px;
}

/* RADIO CARD */
.radio-card {
  padding: 10px;

  border-radius: 10px;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);

  cursor: pointer;

  text-align: center;
  font-size: 13px;
  color: #ddd;

  transition: background 0.2s ease, border 0.2s ease;
}

/* HIDE RADIO */
.radio-card input {
  display: none;
}

/* ACTIVE (using :checked + span) */
.radio-card input:checked + span {
  display: block;
  color: #fff;
}

/* CHANGE PARENT STYLE (SIMULATED ACTIVE) */
.radio-card input:checked + span {
  font-weight: 600;
}

/* simple active highlight */
.radio-card input:checked + span::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  z-index: -1;
}

/* FIX positioning */
.radio-card {
  position: relative;
  overflow: hidden;
}

/* HOVER */
.radio-card:hover {
  background: rgba(255,255,255,0.08);
}

/* ==============================
   BUTTONS (FAST + CLEAN)
============================== */

.action-row {
  margin-top: 8px;
}

/* GENERATE */
.btn-generate {
  background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
  font-weight: 600;
}

/* COPY */
.btn-copy {
  background: rgba(255,255,255,0.08) !important;
  border: 1px solid rgba(255,255,255,0.15);
}

/* HOVER */
.btn-generate:hover {
  filter: brightness(1.1);
}

.btn-copy:hover {
  background: rgba(255,255,255,0.14) !important;
}

/* ==============================
   OUTPUT
============================== */

.output-group textarea {
  margin-top: 4px;
}

/* ==============================
   LIGHT ANIMATION (FAST)
============================== */

.lorem-tool {
  animation: fadeInLite 0.25s ease;
}

@keyframes fadeInLite {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}


/* ==============================
   LOREM IPSUM TOOL (FAST UI)
   Lightweight + Performance Optimized  END
============================== */





/* minifiers */

.editor-box textarea {
  width: 100%;
  height: 200px;
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: monospace;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
}

.drop-zone {
  border: 2px dashed #666;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 15px;
}

.drop-zone.active {
  border-color: #a855f7;
  background: rgba(168,85,247,0.1);
}

.options-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

/* BUTTON WRAPPER */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 15px 0;
}

/* BASE BUTTON STYLE */
.buttons button {
  flex: 1 1 auto;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;
  white-space: nowrap;
}

/* INDIVIDUAL COLORS */
#minifyBtn {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}

#copyBtn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
}

#downloadBtn {
  background: linear-gradient(135deg, #059669, #10b981);
}

#clearBtn {
  background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* HOVER EFFECT */
.buttons button:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

/* CLICK EFFECT */
.buttons button:active {
  transform: scale(0.97);
}


/* minifiers */


/* MOBILE RESPONSIVE */
/* ==============================
   MOBILE RESPONSIVE (OPTIMIZED)
============================== */

@media (max-width: 768px) {

  /* MAIN CARD */
  .glass-card.theme-purple .gen-controls {
    width: 95%;
    padding: 20px;
    border-radius: 16px;
  }

  /* TITLE */
  .gen-controls h1 {
    font-size: 1.4rem;
    line-height: 1.4;
  }

  /* TAGLINE */
  .tagline {
    font-size: 13px;
  }

  /* INPUT */
  .input-field {
    font-size: 14px;
    padding: 12px;
  }

  /* RADIO GRID → FULL WIDTH */
  .radio-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* RADIO CARD */
  .radio-card {
    padding: 12px;
    font-size: 14px;
  }

  /* BUTTON ROW → STACK */
  .action-row {
    flex-direction: column;
  }

  .action-row button {
    width: 100%;
    padding: 14px;
    font-size: 14px;
  }

  /* TEXTAREA */
  .calculator textarea {
    min-height: 180px;
    font-size: 14px;
    padding: 14px;
  }
}





/* MOBILE OPTIMIZATION */
@media (max-width: 600px) {
  .buttons button {
    flex: 1 1 100%;
  }
}

/* EXTRA SMALL DEVICES */
@media (max-width: 480px) {

  .gen-controls h1 {
    font-size: 1.25rem;
  }

  .tagline {
    font-size: 12.5px;
  }

  .input-field {
    padding: 11px;
    font-size: 13px;
  }

  .radio-card {
    padding: 10px;
    font-size: 13px;
  }

  .action-row button {
    font-size: 13px;
    padding: 12px;
  }

  .calculator textarea {
    min-height: 160px;
  }
}