/* header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid black;
  background-color: white;
  padding: 10px 20px;
  margin: 0;
}

.logo-area {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-area img {
  height: 50px;
}

.site-name {
  font-size: 24px;
  font-weight: bold;
  margin-left: 10px;
  color: black;
  text-decoration: none;
}

.paw {
  font-size: 24px;
  margin-left: 5px;
}

nav a {
  margin-left: 20px;
  text-decoration: none;
  color: black;
  font-weight: bold;
}

.sns-links {
  margin-left: 40px;
  display: flex;
  flex-direction: row;
}

.sns-links img {
  width: 30px;
  height: 30px;
  margin: auto 5px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.sns-links img:hover {
  transform: scale(1.1);
}


body {
  background-color: #333;
  color: #ddd;
  font-family: "Yu Gothic", sans-serif;  
  padding: 0;
  margin: 0;
}

h1{  
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  color: #eee;
  background-color: #3a3a3a;
  padding-left: 20px;
  margin-top: 0;
  height: 100px;
  border-bottom: solid 3px #1c1c1c;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);  
}

h1 a{
  text-align: center;
  font-size: 20px; 
  padding: 6px 12px; 
  background-color: white; 
  color: #3a3a3a; 
  border-radius: 5px; 
  text-decoration: none; 
  margin-left: 20px;
  margin-right: 20px;
  width: 100px;
  height: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.5);  
}

.main-content {
  padding: 20px;
}

.mode-toggle {
  display: flex;
  flex-direction: row;
  justify-content: center;  
  align-items: center;
  margin-top: 10px;
}

.mode-toggle button {
  font-size: 22px;
  font-weight: bold;
  background-color: #555;
  color: #eee;
  border: none;
  padding: 15px 40px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 8px;  
  transition: background-color 0.3s;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
}

.mode-toggle button.active,
.mode-toggle button:hover {
  background-color: #777;
}

h2 {
  font-size: 30px;
  color: rgb(136, 255, 136);
  border-bottom: 2px solid #555;
  padding-bottom: 5px;
}

.section {  
  background-color: #444;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0,0,0,0.5);
  max-width: 800px;  
  margin: 30px auto;
}

.section p{
  font-size: 20px;
  font-weight: 600;
  text-indent: 1rem;
}

.parameter-section {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 20px 40px;
  justify-content: center;
  align-items: center;
}

.parameter-input-unit {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  font-size: 30px;
  width: 200px;  
}

.parameter-input {
  font-size: 20px;
  width: 120px;  
  margin-left: 20px;
}

.subsection {
  margin-top: 15px;
}

.formula-selection {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.formula {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-left: 50px;
}

#equationDisplay {
  font-size: 30px;
}

#solutionDisplay {
  font-size: 30px;
  margin-left: 40px;
}

.solve-section {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-top: 50px;
}

.graph-range {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.howto-formula {
  font-size: 24px;
}

#plotBtn {
  margin-top: 50px;
}

label,
input {
  margin: 5px;
}

input {
  width: 60px;
}

button {
  font-size: 20px;
  font-weight: bold;  
  background-color: #555;
  color: rgb(136, 255, 136);
  border: none;
  padding: 25px 24px;
  margin: 10px 0;
  cursor: pointer;
  border-radius: 12px;  
  box-shadow: 0px 0px 7px rgba(0,0,0,0.5);
}

button:hover {
  background-color: #666;
}

#plot {
  width: 100%;
  max-width: 800px;
  height: 500px;
  background-color: #fff;
  border: 1px solid #888;
  margin-top: 10px;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: #333;
  color: #ddd;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  margin: 100px auto;
  text-align: center;
}

.equation-list button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 12px;
  font-size: 18px;
  cursor: pointer;
  background-color: #555;
  color: #eee;
  border: none;
  border-radius: 8px;
}

.equation-list button:hover {
  background-color: #777;
}

.math-display-wrap {
    overflow-x: auto;
    white-space: nowrap;
}

