/*
 * mruby/c WebAssembly Simulator - Stylesheet
*/

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f5f5f5;
}

h1 {
  color: #333;
  text-align: center;
  margin-bottom: 10px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
}

.container {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.1em;
  font-weight: 600;
  color: #444;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
}

.status-indicator.loading {
  background-color: #f0ad4e;
  animation: pulse 1s infinite;
}

.status-indicator.ready {
  background-color: #5cb85c;
}

.status-indicator.error {
  background-color: #d9534f;
}

.status-indicator.running {
  background-color: #5bc0de;
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.button-group {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

button {
  padding: 10px 20px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #545b62;
}

.btn-success {
  background-color: #28a745;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background-color: #1e7e34;
}

.output-area {
  background-color: #1e1e1e;
  color: #d4d4d4;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  padding: 15px;
  border-radius: 4px;
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.output-area .error {
  color: #f48771;
}

.output-area .info {
  color: #569cd6;
}

.output-area .success {
  color: #6a9955;
}

.file-input-wrapper {
  margin-bottom: 15px;
}

.file-input-wrapper label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.file-input-wrapper input[type="file"] {
  display: block;
  width: 100%;
  padding: 10px;
  border: 2px dashed #ccc;
  border-radius: 4px;
  background: #fafafa;
  cursor: pointer;
}

.file-input-wrapper input[type="file"]:hover {
  border-color: #007bff;
  background: #f0f7ff;
}

.info-box {
  background-color: #e7f3ff;
  border: 1px solid #b3d7ff;
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 15px;
}

.info-box h4 {
  margin: 0 0 10px 0;
  color: #004085;
}

.info-box p {
  margin: 0;
  color: #004085;
  font-size: 14px;
}

.info-box code {
  background-color: #cce5ff;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: monospace;
}

footer {
  text-align: center;
  color: #888;
  font-size: 12px;
  margin-top: 30px;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

#dot-container {
    display: grid;
    grid-template-rows: repeat(6, 30px);
    grid-template-columns: repeat(10, 30px);
    gap: 0;
    direction: rtl; 
    grid-auto-flow: column;    
    width: fit-content;
    border: 1px solid #ddd;
    background-color: #f0f0f0;
}

.dot {
    width: 30px;
    height: 30px;
    background-color: #ccc;
    border-radius: 50%;
    box-sizing: border-box;
    
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
    
    transition: background-color 0.2s;
}
