@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&display=swap');

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: 800px;
    text-align: center;
    background-color: #1e1e1e;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

h1 {
    color: #bb86fc;
    margin-bottom: 10px;
}

p {
    margin-bottom: 30px;
    color: #b0b0b0;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
}

input[type="file"] {
    border: 2px dashed #333;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

input[type="file"]::-webkit-file-upload-button {
  visibility: hidden;
  width: 0;
  height: 0;
  padding: 0;
  margin: 0;
}

input[type="file"]::before {
  content: '画像を選択またはドラッグ＆ドロップ';
  display: inline-block;
  background: #3700b3;
  color: white;
  border-radius: 5px;
  padding: 8px 12px;
  outline: none;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 700;
}

input[type="file"]:hover {
    background-color: #252525;
    border-color: #bb86fc;
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 400px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.slider-label {
    font-size: 14px;
    color: #b0b0b0;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
}

button {
    background-color: #03dac6;
    color: #121212;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:disabled {
    background-color: #333;
    color: #555;
    cursor: not-allowed;
}

button:not(:disabled):hover {
    background-color: #1affec;
    transform: translateY(-2px);
}

.download-buttons, .gif-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

#status {
    margin-top: 20px;
    font-size: 16px;
    color: #03dac6;
    min-height: 20px; /* Reserve space */
}

.output-container {
    width: 100%;
    min-height: 200px;
    background-color: #2a2a2a;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    margin-top: 20px;
}

canvas {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    image-rendering: -moz-crisp-edges;
    image-rendering: -webkit-crisp-edges;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border-radius: 4px;
}
