
/* =========================================
   DIGANT STUDIO - WORD COUNTER
   Premium Responsive Light UI
========================================= */

:root {
  --wc-bg: #f8f8ff;
  --wc-card: #ffffff;
  --wc-primary: Red;
  --wc-primary-light: #efedff;
  --wc-text: #20223a;
  --wc-muted: #777b91;
  --wc-border: #e9e9f3;
  --wc-shadow: 0 8px 30px rgba(40, 35, 100, .055);
  --wc-radius: 18px;
}

.wc-tool-section {
  background: var(--wc-bg);
  padding: 55px 0;
}

.wc-workspace {
  max-width: 1000px;
  margin: 30px auto;
  padding: 26px;
  background: var(--wc-card);
  border: 1px solid var(--wc-border);
  border-radius: 24px;
  box-shadow: var(--wc-shadow);
  color: var(--wc-text);
}

/* HEADER */

.wc-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--wc-border);
}

.wc-workspace-title {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.wc-workspace-subtitle {
  margin: 5px 0 0;
  color: var(--wc-muted);
  font-size: 13px;
}

.wc-status {
  background: #e9f9ef;
  color: #18864a;
  padding: 7px 13px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
}

/* UPLOAD */

.wc-upload-panel {
  margin-top: 24px;
  padding: 22px;
  background: #fafaff;
  border: 1px solid var(--wc-border);
  border-radius: 18px;
}

.wc-upload-heading {
  font-size: 15px;
  font-weight: 750;
  margin-bottom: 15px;
}

.wc-upload-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wc-upload-option {
  min-height: 125px;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  background: white;
  border: 1.5px dashed #c9c5ff;
  border-radius: 15px;
  cursor: pointer;
  transition: .2s ease;
}

.wc-upload-option:hover {
  background: var(--wc-primary-light);
  border-color: var(--wc-primary);
  transform: translateY(-2px);
}

.wc-upload-icon {
  font-size: 27px;
}

.wc-upload-option strong {
  font-size: 14px;
}

.wc-upload-option small {
  color: var(--wc-muted);
  font-size: 12px;
}

.wc-upload-info {
  margin-top: 13px;
  color: var(--wc-muted);
  font-size: 12px;
}

.wc-upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  color: var(--wc-primary);
  font-size: 13px;
}

/* STATISTICS */

.wc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 25px 0;
}

.wc-stat {
  min-width: 0;
  padding: 19px 15px;
  background: white;
  border: 1px solid var(--wc-border);
  border-radius: 16px;
  transition: .2s ease;
}

.wc-stat:hover {
  border-color: #c8c3ff;
  box-shadow: 0 5px 18px rgba(101, 88, 245, .08);
}

.wc-stat-label {
  display: block;
  color: var(--wc-muted);
  font-size: 12px;
  font-weight: 650;
}

.wc-stat-value {
  display: block;
  margin: 9px 0 5px;
  color: var(--wc-primary);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.wc-stat-note {
  color: #9698aa;
  font-size: 11px;
}

/* EDITOR */

.wc-editor-wrap {
  margin-top: 25px;
}

.wc-editor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}

.wc-editor-label {
  font-size: 15px;
  font-weight: 750;
}

.wc-editor-hint {
  color: var(--wc-muted);
  font-size: 11px;
}

.wc-editor {
  display: block;
  width: 100%;
  min-height: 260px;
  padding: 19px;
  resize: vertical;
  outline: none;
  border: 1.5px solid var(--wc-border);
  border-radius: 15px;
  background: #fdfdff;
  color: var(--wc-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.8;
  transition: .2s;
}

.wc-editor:focus {
  border-color: var(--wc-primary);
  box-shadow: 0 0 0 4px rgba(101, 88, 245, .09);
}

.wc-editor::placeholder {
  color: #a3a4b4;
}

/* BUTTONS */

.wc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 17px;
}

.wc-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.wc-action {
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid var(--wc-border);
  border-radius: 10px;
  background: white;
  color: var(--wc-text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: .2s;
}

.wc-action:hover {
  border-color: var(--wc-primary);
  color: var(--wc-primary);
  background: var(--wc-primary-light);
}

.wc-action-primary {
  color: white;
  background: var(--wc-primary);
  border-color: var(--wc-primary);
}

.wc-action-primary:hover {
  color: white;
  background: #5143e6;
}

.wc-action-danger {
  color: #d84b55;
}

.wc-copy-feedback {
  min-height: 22px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ANALYSIS */

.wc-analysis {
  margin-top: 25px;
  padding: 22px;
  background: #fafaff;
  border: 1px solid var(--wc-border);
  border-radius: 17px;
}

.wc-analysis-title {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 800;
}

.wc-analysis-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wc-analysis-item {
  min-width: 0;
  padding: 15px;
  background: white;
  border: 1px solid var(--wc-border);
  border-radius: 12px;
}

.wc-analysis-label {
  display: block;
  color: var(--wc-muted);
  font-size: 11px;
}

.wc-analysis-value {
  display: block;
  margin-top: 7px;
  font-size: 17px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

/* PROGRESS */

.wc-progress-track {
  height: 9px;
  margin-top: 22px;
  overflow: hidden;
  background: #e9e7ff;
  border-radius: 20px;
}

.wc-progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #6558f5, #958aff);
  border-radius: inherit;
  transition: width .3s ease;
}

.wc-limit-note {
  margin: 9px 0 0;
  color: var(--wc-muted);
  font-size: 11px;
}

/* KEYWORDS */

.wc-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.wc-keyword {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  background: var(--wc-primary-light);
  color: var(--wc-primary);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
}

.wc-keyword strong {
  padding: 2px 7px;
  background: white;
  border-radius: 6px;
}

.wc-empty {
  color: var(--wc-muted);
  font-size: 13px;
}

.wc-tool-note {
  margin-top: 20px;
  padding: 14px;
  background: #f5f4ff;
  border-left: 3px solid var(--wc-primary);
  border-radius: 8px;
  color: var(--wc-muted);
  font-size: 12px;
  line-height: 1.7;
}

/* LOADING */

.ds-tool-loading {
  padding: 45px 15px;
  text-align: center;
}

.ds-spinner,
.wc-upload-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e8e5ff;
  border-top-color: var(--wc-primary);
  border-radius: 50%;
  animation: wcSpin .8s linear infinite;
}

.ds-spinner {
  margin: 0 auto 15px;
}

@keyframes wcSpin {
  to { transform: rotate(360deg); }
}

/* TABLET */

@media (max-width: 768px) {
  .wc-workspace {
    padding: 20px;
  }

  .wc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wc-analysis-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* MOBILE */

@media (max-width: 480px) {
  .wc-tool-section {
    padding: 30px 0;
  }

  .wc-workspace {
    margin: 18px auto;
    padding: 15px;
    border-radius: 17px;
  }

  .wc-workspace-head {
    align-items: flex-start;
  }

  .wc-workspace-title {
    font-size: 19px;
  }

  .wc-workspace-subtitle {
    font-size: 12px;
  }

  .wc-upload-panel {
    padding: 15px;
  }

  .wc-upload-option {
    min-height: 110px;
    padding: 13px 6px;
  }

  .wc-stats {
    gap: 9px;
  }

  .wc-stat {
    padding: 14px 11px;
    border-radius: 13px;
  }

  .wc-stat-value {
    font-size: 23px;
  }

  .wc-stat-label {
    font-size: 11px;
  }

  .wc-editor {
    min-height: 220px;
    padding: 14px;
  }

  .wc-editor-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .wc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .wc-toolbar-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wc-action {
    padding: 10px 8px;
  }

  .wc-analysis {
    padding: 15px;
  }

  .wc-analysis-grid {
    gap: 9px;
  }

  .wc-analysis-item {
    padding: 12px;
  }

  .wc-analysis-value {
    font-size: 15px;
  }
}

/* ACCESSIBILITY */

.wc-action:focus-visible,
.wc-upload-option:focus-within {
  outline: 3px solid rgba(101, 88, 245, .25);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .wc-workspace *,
  .wc-workspace *::before,
  .wc-workspace *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
