body {
  margin: 0;
  font-family: sans-serif;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

#topbar {
  background: #333;
  color: #fff;
  padding: 8px;
  display: flex;
  gap: 8px;
}

#mainLayout {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#sidebar {
  background: #444;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  min-width: 60px;
  align-items: center;
}

header {
    background: #333;
    color: #fff;
    padding: 8px;
    display: flex;
    gap: 8px;
}

#canvasWrap {
    flex: 1;
    position: relative;
    background: #666;
    overflow: hidden;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
}

button.active {
    background: #0a0;
}

#status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1em 2em;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 1.1em;
    display: none;
    z-index: 1000;
    display: none;
    align-items: center;
    gap: 12px;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #ccc;
    border-top: 3px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

#sidebar-branding {
  margin-top: auto;   /* ensures it sticks to bottom */
  padding: 8px;
  text-align: center;
  font-size: 12px;
  color: #ccc;
}

#sidebar-branding .brand-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4px;
}

#sidebar-branding .brand-logo {
  height: 24px;
  margin-bottom: 2px;
  opacity: 0.9;
}

#sidebar-branding .brand-text {
  font-size: 14px;
  font-weight: bold;
  color: #eee;
}

#sidebar-branding .brand-powered {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #aaa;
}

#sidebar-branding .ornyz-icon {
  height: 14px;
  opacity: 0.75;
}

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown button {
  background: #333;
  color: white;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #444;
  min-width: 160px;
  box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: white;
  padding: 8px 12px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background: #555;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Modal */
.modal {
  display: none; 
  position: fixed;
  z-index: 2000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  background: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 600px;
  color: #222;
}

.close {
  float: right;
  font-size: 24px;
  cursor: pointer;
}
