:root {
  --primary-color: #3a86ff;
  --secondary-color: #8338ec;
  --accent-color: #ff006e;
  --light-color: #f8f9fa;
  --dark-color: #121212;
  --darker-color: #0a0a0a;
  --success-color: #38b000;
  --warning-color: #ffbe0b;
  --danger-color: #fb5607;
  --text-color: #e0e0e0;
  --text-muted: #9e9e9e;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: var(--darker-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0 auto;
  padding: 0;
  min-height: 100vh;
  max-width: 800px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 15px;
  margin-bottom: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.diagnostic-box {
  background: var(--dark-color);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 2.5rem;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  border: 1px solid #333;
}

.diagnostic-title {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.input-group {
  display: flex;
  margin-bottom: 2rem;
}

#stock-code {
  flex: 1;
  padding: 1rem;
  background: #1e1e1e;
  border: 2px solid #333;
  border-radius: 8px 0 0 8px;
  font-size: 1.1rem;
  transition: border-color 0.3s;
  color: var(--text-color);
}

#stock-code:focus {
  outline: none;
  border-color: var(--primary-color);
}

#diagnose-btn {
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
  color: white;
  border: none;
  padding: 0 2rem;
  border-radius: 0 8px 8px 0;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, opacity 0.2s;
}

#diagnose-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

#diagnose-btn:disabled {
  background: #333;
  color: #666;
  cursor: not-allowed;
  transform: none;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
  background: var(--dark-color);
  border-radius: 15px;
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.4s ease-in-out;
  border: 1px solid #333;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--danger-color);
}

.line-contact {
  background-color: #06c755;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 2rem;
  text-decoration: none;
  transition: background-color 0.2s;
}

.line-contact:hover {
  background-color: #05a344;
}

.line-contact i {
  margin-right: 0.8rem;
  font-size: 1.2rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.stock-info {
  display: flex;
  align-items: center;
}

.stock-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-right: 1rem;
  color: var(--text-color);
}

.stock-code {
  background: #333;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.verdict {
  font-size: 1.2rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.buy {
  background-color: rgba(56, 176, 0, 0.2);
  color: var(--success-color);
}

.hold {
  background-color: rgba(255, 190, 11, 0.2);
  color: var(--warning-color);
}

.sell {
  background-color: rgba(251, 86, 7, 0.2);
  color: var(--danger-color);
}

.analysis-details {
  background: #1e1e1e;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  border: 1px solid #333;
}

.detail-item {
  margin-bottom: 1rem;
}

.detail-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  color: var(--text-color);
}

.detail-title i {
  margin-right: 0.5rem;
}

.progress-container {
  height: 8px;
  background: #333;
  border-radius: 4px;
  margin-top: 0.5rem;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
}

.positive {
  background: var(--success-color);
}

.neutral {
  background: var(--warning-color);
}

.negative {
  background: var(--danger-color);
}

.loading {
  text-align: center;
  padding: 2rem;
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #333;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.feature-card {
  background: var(--dark-color);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
  border: 1px solid #333;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.feature-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.disclaimer {
  background: #1a1a1a;
  padding: 2rem;
  border-radius: 10px;
  margin-top: 4rem;
  border-left: 4px solid var(--danger-color);
}

.disclaimer-title {
  color: var(--danger-color);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.disclaimer-content {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
}

footer {
  text-align: center;
  margin-top: 4rem;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  border-top: 1px solid #333;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  .hero-image {
    height: 200px;
  }

  .diagnostic-box {
    padding: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  #stock-code {
    border-radius: 8px;
    margin-bottom: 1rem;
  }

  #diagnose-btn {
    border-radius: 8px;
    padding: 1rem;
  }

  .modal-content {
    width: 95%;
    padding: 1.5rem;
  }
}
