/* Base styles and CSS variables */

:root {
  --primary-gradient: #44e48e;
  --primary-color: #44e48e;
  --primary-light: #f8d12f;
  --primary-dark: #d4a007;
  --text-dark: #1e2026;
  --text-light: #76808f;
  --background-light: #fafafa;
  --background-dark: #14151a;
  --border-color: rgba(240, 185, 11, 0.1);
  --node-main: #f0b90b;
  /* Color for main wallet node */
  --node-connected: #f8d12f;
  /* Color for connected wallet nodes */
  --node-text: #1e2026;
}

/* Visualization container styles */

.visualization-section {
  width: 100%;
  height: 600px;
  margin: 2rem 0;
  background-color: var(--background-light);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  overflow: hidden;
}

/* SVG styles for the visualization */

svg {
  width: 100%;
  height: 100%;
}

/* Node and link styles */

circle {
  stroke: var(--border-color);
  stroke-width: 1.5px;
  transition: all 0.3s ease;
}

circle:hover {
  stroke-width: 2.5px;
  stroke: var(--text-dark);
}

line {
  stroke-opacity: 0.6;
  transition: stroke-opacity 0.3s ease;
}

line:hover {
  stroke-opacity: 1;
}

/* Loading spinner styles */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Error message styles */

.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-light);
  text-align: center;
  padding: 2rem;
}

/* Tooltip styles */

.tooltip {
  position: absolute;
  background-color: #1c1c1e;
  color: var(--text-dark);
  border: 1px solid #44e48e;
  border-radius: 4px;
  padding: 8px;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Wallet Analysis specific styles */

.wallet-graph {
  width: 100%;
  height: 600px;
  background: var(--background-light);
  border-radius: 8px;
  margin-top: 2rem;
  overflow: hidden;
}

.tooltip {
  position: absolute;
  padding: 10px;
  background: var(--background-light);
  border-radius: 4px;
  pointer-events: none;
  font-size: 14px;
  max-width: 300px;
}

.load-more-container {
  text-align: center;
  margin: 2rem 0;
}

.analyze-button,
.clear-button,
.mode-button,
.filter-button,
.export-button,
.load-more-button,
.mode-btn,
.primary-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: black;
  background: #44e48e;
  border: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin: 0.5rem;
}

.analyze-button:hover,
.clear-button:hover,
.mode-button:hover,
.filter-button:hover,
.export-button:hover,
.load-more-button:hover,
.mode-btn:hover,
.primary-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.analyze-button:active,
.clear-button:active,
.mode-button:active,
.filter-button:active,
.export-button:active,
.load-more-button:active,
.mode-btn:active,
.primary-button:active {
  transform: translateY(1px);
}

.analyze-button:disabled,
.clear-button:disabled,
.mode-button:disabled,
.filter-button:disabled,
.export-button:disabled,
.load-more-button:disabled,
.mode-btn:disabled,
.primary-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Graph styles */

.node {
  fill: var(--primary-color);
  stroke: var(--primary-dark);
  stroke-width: 2px;
}

.node.main {
  fill: var(--primary-dark);
}

.link {
  stroke: rgba(240, 185, 11, 0.2);
  stroke-opacity: 0.6;
}

.link:hover {
  stroke-opacity: 1;
}

.node-label {
  font-size: 12px;
  fill: var(--text-dark);
}

/* Progress bar styles */

.progress-container {
  margin: 1rem 0;
}

.progress-text {
  text-align: center;
  color: #44e48e;
  margin-top: 0.5rem;
  font-size: 14px;
}

.wallet-analyzer,
.bundle-checker {
  border-radius: 12px;
  padding: 2rem;
}

.wallet-analyzer h2,
.bundle-checker h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.wallet-analyzer label,
.bundle-checker label {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.wallet-analyzer input[type="text"],
.bundle-checker input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #28282b;
  color: white;
  background: #28282b;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.wallet-analyzer input[type="text"]:focus,
.bundle-checker input[type="text"]:focus {
  outline: none;
  border-color: #44e48e;
}

.wallet-analyzer input[type="text"]::placeholder,
.bundle-checker input[type="text"]::placeholder {
  color: #ababad;
}

.wallet-analyzer button,
.bundle-checker button {
  display: inline-block;
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: black;
  background: #44e48e;
  border: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  cursor: pointer;
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.wallet-analyzer button::before,
.bundle-checker button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.wallet-analyzer button:hover::before,
.bundle-checker button:hover::before {
  opacity: 1;
}

.wallet-analyzer button span,
.bundle-checker button span {
  position: relative;
  z-index: 1;
}

.wallet-analyzer button:hover,
.bundle-checker button:hover {
  transform: translateY(-2px);
  color: var(--text-dark);
}

.wallet-analyzer button:active,
.bundle-checker button:active {
  transform: translateY(1px);
}

.wallet-analyzer button:disabled,
.bundle-checker button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.wallet-analyzer button:disabled::before,
.bundle-checker button:disabled::before {
  display: none;
}

.analysis-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: white;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #28282b;
  color: white;
  background: #28282b;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #44e48e;
}

.form-group input::placeholder {
  color: rgba(30, 32, 38, 0.5);
}

.results-section {
  margin-top: 2rem;
  padding: 2rem;
  background: #1c1c1e;
  border-radius: 12px;
  border: 1px solid #28282b;
}

.results-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.results-section p {
  color: #ababad;
  line-height: 1.6;
}
