/* Tool Container Styles */
.tool-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Analyzer Tool Styles — golden luxury */
.analyzer-tool {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.2);
}

.input-section {
  margin-bottom: 30px;
}

.input-section label {
  display: block;
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#textInput {
  width: 100%;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.26);
  border-radius: 8px;
  padding: 16px;
  color: #4a351f;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  resize: vertical;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

#textInput:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.16);
}

#textInput::placeholder {
  color: #8c7558;
}

.action-buttons.btn-contain-x {
  margin-bottom: 25px;
  display: flex;
  gap: 15px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: rgba(182, 138, 58, 0.08);
  border: 1px solid rgba(145, 103, 48, 0.15);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(182, 138, 58, 0.14);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -12px rgba(94, 65, 30, 0.35);
}

.stat-icon {
  color: #b98b3b;
  font-size: 2rem;
  margin-bottom: 10px;
}

.stat-value {
  color: #4f3a24;
  font-size: 2rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  margin-bottom: 5px;
}

.stat-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-section {
  margin-bottom: 25px;
  background: #fffaf2;
  border-radius: 12px;
  border: 1px solid rgba(145, 103, 48, 0.15);
  overflow: hidden;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: rgba(182, 138, 58, 0.08);
  border-bottom: 1px solid rgba(145, 103, 48, 0.12);
}

.result-header h3 {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.result-header h3 i {
  font-size: 1rem;
}

.result-content {
  padding: 20px;
}

.frequency-output {
  background: #fff8ef;
  color: #4a351f;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  border: 1px solid rgba(145, 103, 48, 0.12);
  max-height: 400px;
  overflow-y: auto;
}

.frequency-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  margin: 5px 0;
  background: rgba(182, 138, 58, 0.06);
  border-left: 3px solid #ab7c34;
  border-radius: 4px;
}

.frequency-word {
  color: #7a5526;
  font-weight: 600;
}

.frequency-count {
  color: #4a351f;
  font-weight: 600;
}

@media (max-width: 768px) {
  .tool-container {
    padding: 0 15px;
  }

  .analyzer-tool {
    padding: 25px 20px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .action-buttons.btn-contain-x {
    flex-direction: row;
    gap: 12px;
  }

  .action-buttons.btn-contain-x .btn {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .stat-card {
    padding: 15px;
  }

  .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
  }

  .stat-value {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }
}
