﻿*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #0f1120;
  color: #f0f0f5;
  min-height: 100vh;
}

a { color: inherit; }

input, select, textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: #f0f0f5;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(100,200,255,0.5);
}
input[type="color"] {
  padding: 0.2rem;
  height: 2.4rem;
  cursor: pointer;
}
label {
  display: block;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.3rem;
}

button[hidden], .btn[hidden] { display: none !important; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: none;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  text-decoration: none;
}
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #4f8ef7, #6c3de0);
  color: #fff;
}
.btn-primary:hover:not(:disabled) { opacity: 0.88; }

.btn-ghost {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,0.14); }

.btn-danger {
  background: rgba(231,76,60,0.2);
  border: 1px solid rgba(231,76,60,0.4);
  color: #e74c3c;
}
.btn-danger:hover:not(:disabled) { background: rgba(231,76,60,0.35); }

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  border-radius: 6px;
}

.panel {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.panel h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.9);
}

.field-group { margin-bottom: 0.85rem; }

.status-msg {
  min-height: 1.2rem;
  font-size: 0.82rem;
  margin-top: 0.5rem;
  color: rgba(255,255,255,0.65);
}
.status-msg.error { color: #e74c3c; }
.status-msg.success { color: #2ecc71; }

/* Overlay modal */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: grid;
  place-items: center;
  z-index: 900;
  padding: 1rem;
}
.overlay[hidden] { display: none; }

.modal-card {
  width: min(420px, 100%);
  background: #181c30;
  border: 1px solid rgba(100,200,255,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.modal-card h2 { font-size: 1.1rem; margin-bottom: 0.25rem; }
.modal-subtitle { color: rgba(255,255,255,0.5); font-size: 0.85rem; margin-bottom: 1.1rem; }

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,0.5);
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.5rem 1rem 0.55rem;
  cursor: pointer;
  margin-bottom: -1px;
}
.tab-btn.active {
  color: #4f8ef7;
  border-bottom-color: #4f8ef7;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Canvas wheel */
.wheel-wrapper {
  position: relative;
  display: inline-block;
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 22px solid #ffd200;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* Spin page screens */
.screen { display: none; }
.screen.active { display: block; }

/* Result share */
.share-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.share-row input { flex: 1; }
