/* Youtube Time Link Generator / 30.6.2025 */

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f8f9fa;
  margin: 0;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: background-color 0.3s, color 0.3s;
}

body.dark {
  background-color: #0b0722;
  color: #eee;
}

h1 {
  font-size: 28px;
  margin-bottom: 20px;
  text-align: center;
  border-bottom: 2px solid #007BFF;
  padding-bottom: 10px;
}

form {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  transition: background-color 0.3s;
}

body.dark form {
  background: #1e1e1e;
}

form div {
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 5px;
  font-weight: 600;
}

input, button {
  padding: 10px;
  font-size: 16px;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: background-color 0.3s, color 0.3s;
}

input:focus {
  outline: none;
  border-color: #007BFF;
}

input[type="number"] {
  text-align: left;
}

button {
  background-color: #007BFF;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

#toggleDarkMode {
  margin-bottom: 10px;
  align-self: center; 

}

#resultContainer {
  margin-top: 30px;
  text-align: center;
  width: 100%;
  max-width: 400px;
}

#generatedLink {
  font-size: 18px;
  text-decoration: none;
  color: #007BFF;
  display: block;
  margin-bottom: 10px;
}

#displayLink {
  font-family: monospace;
  font-size: 14px;
  word-break: break-all;
}

.time-inputs {
  display: flex;
  flex-direction: column;
}

.time-fields {
  display: flex;
  gap: 10px;
}

.time-fields input {
  flex: 1;
  min-width: 0;
}

/* スマホ対応 */
@media (max-width: 480px) {
  form {
    padding: 20px 10px;
  }

  .time-fields {
    flex-direction: column;
  }

  button, input {
    font-size: 14px;
  }

  #toggleDarkMode {

    align-self: center;
  }
}
