:root {
  --primary-color: #2B546A;
  --secondary-color: #4A90A4;
  --accent-color: #FF6B6B;
  --light-bg: #f8f9fa;
  --dark-text: #333333;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --shadow: 0 6px 20px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
  --sidebar-width: 320px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  color: var(--dark-text);
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top right, rgba(43, 84, 106, 0.05) 0%, transparent 40%),
              radial-gradient(circle at bottom left, rgba(255, 107, 107, 0.05) 0%, transparent 40%);
  z-index: -1;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding: 1rem 5%;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.6rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo i {
  color: var(--secondary-color);
  font-size: 1.8rem;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

nav a {
  text-decoration: none;
  color: var(--dark-text);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--primary-color);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

nav a:hover::after {
  width: 100%;
}

.main-container {
  max-width: 1400px;
  margin: 100px auto 0;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 25px;
}

.main-column {
  grid-column: 1;
}

.sidebar {
  grid-column: 2;
  position: sticky;
  top: 100px;
  height: fit-content;
}

.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5f 100%);
  padding: 8rem 2rem 6rem; 
  text-align: center;
  position: relative;
  overflow: hidden;
  color: white;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh; 
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><circle cx="80" cy="20" r="10" fill="rgba(78, 205, 196, 0.1)"/><circle cx="60" cy="60" r="5" fill="rgba(255, 255, 255, 0.1)"/><circle cx="30" cy="40" r="7" fill="rgba(255, 107, 107, 0.1)"/></svg>');
  background-size: cover;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 2;
}

.hero-stats-under-content {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin: 2rem auto 2rem;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.stat-item-large {
  background: transparent; 
  border-radius: var(--border-radius);
  padding: 1.5rem 1rem;
  text-align: center;
  width: 160px;
  transition: var(--transition);
  color: white;
}

.stat-item-large:hover {
  background: rgba(255, 255, 255, 0.15); 
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number-large {
  font-size: 2rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-label-large {
  font-size: 1rem;
  color: white;
  margin: 0;
}

.hero .stat-label-large {
  color: white !important;
}

.hero .stat-number-large {
  color: white !important;
}

.hero h1 {
  font-size: 4.5rem; 
  margin-bottom: 1.2rem;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.8rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta-button {
  display: inline-block;
  color: white;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  font-weight: bold;
  transition: var(--transition);
  box-shadow: var(--shadow);
  border: 2px solid var(--secondary-color);
  margin: 0 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.cta-button.primary {
  background: var(--secondary-color);
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid white;
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.cta-button.primary:hover {
  background: transparent;
  color: var(--secondary-color);
}

.cta-button.secondary:hover {
  background: white;
  color: var(--primary-color);
}

.info-stats-container {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 3rem;
  padding: 0 1rem;
  flex-wrap: wrap;
}

.stat-item-large {
  background: transparent;
  border-radius: var(--border-radius);
  padding: 2rem 1rem;
  text-align: center;
  width: 180px;
  transition: var(--transition);
}

.stat-item-large:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-number-large {
  font-size: 2.5rem;
  font-weight: bold;
  color: white;
  margin-bottom: 0.5rem;
}

.stat-label-large {
  font-size: 1.1rem;
  color: var(--dark-text);
  margin: 0;
}

section {
  margin-bottom: 2.5rem;
  background: white;
  border-radius: var(--border-radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.section-title {
  font-size: 1.7rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--secondary-color);
  border-radius: 3px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.market-actions {
  display: flex;
  gap: 0.8rem;
}

.btn-refresh, .btn-export {
  background: var(--light-gray);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--dark-text);
  font-weight: 500;
  transition: var(--transition);
}

.btn-refresh:hover, .btn-export:hover {
  background: var(--secondary-color);
  color: white;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.ai-analysis-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.analysis-card {
  background: white;
  padding: 1.8rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary-color);
}

.analysis-card h3 {
  color: var(--primary-color);
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.analysis-card p {
  margin: 1.2rem 0;
  color: #666;
  font-size: 1.05rem;
}

.progress-container {
  background: var(--light-gray);
  height: 12px;
  border-radius: 10px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--secondary-color);
  border-radius: 10px;
  width: 98%;
}

.progress-label {
  font-weight: bold;
  color: var(--primary-color);
}

.analysis-features {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.feature-item {
  background: white;
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--secondary-color);
}

.feature-item h4 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 0 1rem;
  color: var(--primary-color);
}

.feature-item p {
  margin: 0;
  color: #666;
}

.market-overview {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: linear-gradient(to right, var(--light-bg), white);
  border-radius: var(--border-radius);
}

.market-indicator {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.indicator-value {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.indicator-desc {
  color: #666;
  font-size: 0.9rem;
}

.market-trend-summary h3 {
  color: var(--primary-color);
  margin: 0 0 0.8rem;
}

.market-trend-summary p {
  color: #666;
  margin: 0;
}

.card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-image {
  height: 150px;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.1rem;
  color: var(--primary-color);
  margin-bottom: 0.8rem;
}

.card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.news-tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  font-weight: bold;
  align-self: flex-start;
}

.news-time {
  margin-top: auto;
  font-size: 0.8rem;
  color: #999;
  text-align: right;
  font-style: italic;
  padding-top: 1rem;
}

.market-data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.market-data-table th,
.market-data-table td {
  padding: 0.9rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

.market-data-table th {
  background: var(--primary-color);
  color: white;
  font-weight: 500;
}

.market-data-table tr:last-child td {
  border-bottom: none;
}

.trend-up {
  color: #28a745;
  font-weight: bold;
}

.trend-down {
  color: #dc3545;
  font-weight: bold;
}

.chart-wrapper {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.chart-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
}

.faq-container {
  margin-top: 1.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--light-gray);
  padding: 1.2rem 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  color: var(--primary-color);
  font-size: 1.2rem;
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.faq-question:hover {
  background: rgba(74, 144, 164, 0.1);
}

.faq-question i {
  color: var(--secondary-color);
  transition: transform 0.3s ease;
}

.faq-question.active i {
  transform: rotate(90deg);
}

.faq-answer {
  color: var(--dark-text);
  line-height: 1.7;
  padding-left: 2.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding-top 0.3s ease;
}

.faq-answer.show {
  max-height: 500px;
  padding-top: 1rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.8rem;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.testimonial-content {
  flex-grow: 1;
  margin-bottom: 1.5rem;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: -15px;
  left: -5px;
  font-size: 2rem;
  color: rgba(74, 144, 164, 0.1);
}

.testimonial-content p {
  font-style: italic;
  color: #555;
  margin: 0;
  padding-top: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2rem;
}

.author-info h4 {
  margin: 0;
  color: var(--primary-color);
}

.author-info p {
  margin: 0;
  font-size: 0.9rem;
  color: #777;
}

.sidebar-widget {
  background: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.widget-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--light-gray);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu li {
  margin-bottom: 0.8rem;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem;
  text-decoration: none;
  color: var(--dark-text);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar-menu a:hover {
  background: rgba(74, 144, 164, 0.1);
  color: var(--primary-color);
  padding-left: 1rem;
}

.market-trend-item {
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--light-gray);
}

.trend-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.trend-name {
  font-weight: 500;
}

.trend-value.up {
  color: #28a745;
  font-weight: bold;
}

.trend-value.down {
  color: #dc3545;
  font-weight: bold;
}

.trend-progress {
  height: 6px;
  background: var(--light-gray);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.trend-bar {
  height: 100%;
}

.trend-bar.up {
  background: #28a745;
}

.trend-bar.down {
  background: #dc3545;
}

.event-item {
  display: flex;
  justify-content: space-between;
  padding: 0.8rem 0;
  border-bottom: 1px dashed var(--light-gray);
}

.event-time {
  font-weight: bold;
  color: var(--secondary-color);
  min-width: 60px;
}

.event-info {
  flex-grow: 1;
}

.event-name {
  font-weight: 500;
}

.widget-promo {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a3a5f 100%);
  color: white;
}

.widget-promo .widget-title {
  color: white;
  border-bottom: 2px solid rgba(255,255,255,0.2);
}

.widget-promo p {
  color: rgba(255,255,255,0.9);
  margin: 1rem 0;
}

.cta-button.premium {
  background: white;
  color: var(--primary-color);
  width: 100%;
  justify-content: center;
}

.cta-button.premium:hover {
  background: rgba(255,255,255,0.9);
}

footer {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 2rem 2rem 1rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--dark-text);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.disclaimer {
  font-size: 0.8rem;
  line-height: 1.6;
  color: #777;
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--light-gray);
}

/* Responsive Design */
@media (max-width: 1100px) {
  .main-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .sidebar {
    order: 2; 
  }
  
  .hero {
    grid-template-columns: 1fr;
    padding: 3rem 1.5rem;
  }
  
  .hero-stats {
    grid-column: 1;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .hero h1 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0.3rem 5%; 
    min-height: 60px; 
  }
  
  .logo {
    font-size: 1.1rem; 
  }
  
  .logo i {
    font-size: 1.2rem;
  }
  
  nav ul {
    gap: 0.6rem;
  }
  
  nav a {
    font-size: 0.75rem;
    padding: 0.2rem 0; 
  }

  .hero {
    margin-top: 90px;
  }
  
  body {
    overflow-x: hidden;
  }
  
  .header-container {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.3rem 0;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
    overflow-x: auto;
    padding: 3px 0;
  }
  
  .hero h1 {
    font-size: 1.6rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .market-actions {
    justify-content: center;
  }
  
  .market-overview {
    grid-template-columns: 1fr;
  }
  
  .ai-analysis-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-button {
    display: block;
    margin: 10px auto;
    width: 80%;
    max-width: 250px;
  }
  
  .market-data-table {
    display: block;
  }
  
  .market-data-table thead {
    display: none;
  }
  
  .market-data-table tbody,
  .market-data-table tr,
  .market-data-table td {
    display: block;
  }
  
  .market-data-table tr {
    background: white;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    padding: 1rem;
    box-shadow: var(--shadow);
  }
  
  .market-data-table td {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--light-gray);
    align-items: center;
  }
  
  .market-data-table td:last-child {
    border-bottom: none;
  }
  
  .market-data-table td:nth-of-type(1):before { content: "指数: "; font-weight: bold; }
  .market-data-table td:nth-of-type(2):before { content: "価格: "; font-weight: bold; }
  .market-data-table td:nth-of-type(3):before { content: "前日比: "; font-weight: bold; }
  .market-data-table td:nth-of-type(4):before { content: "AI処理: "; font-weight: bold; }
  .market-data-table td:nth-of-type(5):before { content: "更新: "; font-weight: bold; }
  
  .results-table-section {
    overflow-x: hidden;
  }
  
  .info-flow-modern-container {
    overflow-x: auto;
    padding: 1.5rem;
  
  .info-flow-modern-item {
    min-width: calc(100% - 20px);
    margin-bottom: 10px;
  }
  
  .sidebar {
    order: 3;
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
  }
  
  .stat-item {
    width: 100%;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
}

.info-flow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.info-flow-modern-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  background: var(--light-gray);
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius);
}

.info-flow-modern-item {
  flex: 1;
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.info-flow-modern-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-flow-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  font-family: 'Courier New', monospace;
}

.info-flow-title {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin: 0.5rem 0 0.5rem 0;
  font-weight: 600;
}

.info-flow-subtitle {
  font-size: 0.9rem;
  color: #666;
  margin: 0.5rem 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 400;
}

.info-flow-description {
  color: var(--dark-text);
  line-height: 1.7;
  margin: 0;
  font-size: 1rem;
}

.info-flow-step {
  text-align: center;
  padding: 1.5rem;
  flex: 1;
  min-width: 200px;
}

.step-icon {
  width: 80px;
  height: 80px;
  background: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: white;
  font-size: 1.8rem;
}

.info-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--secondary-color);
}
