* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  text-align: center;
  padding: 60px 20px 50px;
}

.hero-sub {
  font-size: 0.95rem;
  opacity: 0.85;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.7;
}

/* Main */
main {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* Tabs */
.tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.tab {
  flex: 1;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  color: #666;
}

.tab.active {
  border-color: #667eea;
  color: #667eea;
  background: #f0f0ff;
}

/* Tab content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Card */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  text-align: center;
}

.guide {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

/* Webcam */
#webcam-wrap {
  width: 260px;
  height: 260px;
  margin: 0 auto 20px;
  border-radius: 50%;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid #e8e8f0;
}

#webcam-placeholder {
  text-align: center;
  color: #aaa;
}

#webcam-placeholder span {
  font-size: 3rem;
  display: block;
  margin-bottom: 8px;
}

#webcam-placeholder p {
  font-size: 0.85rem;
}

#webcam-container canvas {
  width: 260px !important;
  height: 260px !important;
  object-fit: cover;
}

/* Upload */
.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #ccc;
  border-radius: 12px;
  padding: 40px 20px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 16px;
}

.upload-area:hover {
  border-color: #667eea;
  background: #f8f8ff;
}

#upload-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 10px;
}

#upload-text {
  color: #888;
  font-size: 0.9rem;
}

#preview-img {
  width: 240px;
  height: 240px;
  object-fit: cover;
  border-radius: 12px;
  margin: 0 auto 16px;
  display: block;
  border: 3px solid #e8e8f0;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-top: 4px;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-block;
  padding: 10px 24px;
  background: #fff;
  color: #888;
  border: 2px solid #ddd;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  margin-left: 8px;
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: #aaa;
  color: #555;
}

/* Result */
#result-section {
  margin-top: 28px;
}

.result-card {
  background: #fff;
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  text-align: center;
  animation: popIn 0.4s ease;
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.result-emoji {
  font-size: 5rem;
  margin-bottom: 12px;
  line-height: 1;
}

.result-card h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.result-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Bars */
.bar-wrap {
  text-align: left;
  margin-bottom: 24px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  margin-top: 12px;
}

.bar-track {
  background: #f0f0f0;
  border-radius: 50px;
  height: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 0.8s ease;
  width: 0%;
}

.bar-fill.dog {
  background: linear-gradient(90deg, #f6a623, #f5a623cc);
}

.bar-fill.cat {
  background: linear-gradient(90deg, #667eea, #764ba2);
}

.btn-retry {
  padding: 12px 28px;
  background: #f5f7fa;
  color: #555;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-retry:hover {
  background: #eee;
}

/* 오류 제보 */
.report-container {
  max-width: 560px;
  margin: 28px auto 60px;
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.report-container h2 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: #333;
}

.report-desc {
  color: #888;
  font-size: 0.88rem;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.required {
  color: #e74c3c;
}

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  border-color: #667eea;
}

textarea {
  resize: vertical;
}

#report-success {
  margin-top: 16px;
  padding: 14px;
  background: #eafaf1;
  border-radius: 8px;
  color: #27ae60;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}
