/* style.css - Modern iPhone-like UI */
body {
  font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background: #f7f8fa;
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.container {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 32px 20px 24px 20px;
  max-width: 350px;
  width: 100%;
  margin: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}
.toggle-group {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}
.toggle-btn {
  background: #f1f2f6;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-btn.active {
  background: #007aff;
  color: #fff;
}
#cam-container, #upload-container, #preview-container, #result-container {
  width: 100%;
  margin-top: 10px;
}
.hide {
  display: none !important;
}
#qr-reader {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}
.close-btn {
  background: #f1f2f6;
  border: none;
  border-radius: 10px;
  padding: 7px 16px;
  font-size: 0.95rem;
  color: #222;
  margin-top: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.close-btn:hover {
  background: #e0e1e6;
}
.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #d1d1d6;
  border-radius: 14px;
  padding: 30px 0;
  color: #8e8e93;
  font-size: 1rem;
  cursor: pointer;
  margin-bottom: 10px;
  background: #fafbfc;
  transition: border 0.2s;
}
.upload-label:hover {
  border-color: #007aff;
}
#preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}
#preview-img {
  max-width: 180px;
  max-height: 180px;
  border-radius: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}
#result-container {
  background: #f1f2f6;
  border-radius: 10px;
  padding: 12px 10px;
  margin-top: 18px;
  min-height: 32px;
  text-align: center;
  font-size: 1.05rem;
  color: #222;
  word-break: break-all;
}
.preview-info {
  font-size: 0.93rem;
  color: #888;
  margin-top: 2px;
  margin-bottom: 2px;
  text-align: center;
  word-break: break-all;
}
.qr-info {
  font-size: 1.05rem;
  color: #222;
  margin-top: 6px;
  margin-bottom: 2px;
  text-align: center;
  word-break: break-all;
  background: #f1f2f6;
  border-radius: 8px;
  padding: 7px 8px 6px 8px;
  min-height: 28px;
}
#preview-container .qr-info {
  display: block;
  font-size: 1.08rem;
  color: #222;
  margin-top: 8px;
  margin-bottom: 2px;
  text-align: center;
  word-break: break-all;
  background: #f1f2f6;
  border-radius: 8px;
  padding: 8px 10px 8px 10px;
  min-height: 28px;
  max-width: 95%;
}
.copy-btn {
  background: #e5e6ea;
  border: none;
  border-radius: 7px;
  padding: 4px 12px;
  font-size: 0.93rem;
  color: #222;
  margin-top: 7px;
  margin-bottom: 2px;
  cursor: pointer;
  transition: background 0.18s;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.copy-btn:hover {
  background: #d1d1d6;
}
@media (max-width: 600px) {
  .container {
    max-width: 98vw;
    padding: 18px 4vw 16px 4vw;
  }
  #preview-img {
    max-width: 90vw;
    max-height: 40vw;
  }
}
