/* ============================================================
   PC比較サイト - スタイルシート (style.css)
   モダンダークモード対応デザイン
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Noto+Sans+JP:wght@300;400;500;600;700;800;900&display=swap");

/* --- CSS Variables --- */
:root {
  --bg-primary: #0f1117;
  --bg-secondary: #1a1d27;
  --bg-card: #1e2130;
  --bg-card-hover: #252840;
  --bg-input: #12141d;
  --border: #2d3148;
  --border-hover: #4a5078;
  --text-primary: #e8eaef;
  --text-secondary: #9499b3;
  --text-muted: #5d6280;
  --accent: #6c5ce7;
  --accent-light: #a29bfe;
  --accent-glow: rgba(108, 92, 231, 0.3);
  --success: #00cec9;
  --success-light: rgba(0, 206, 201, 0.15);
  --warning: #fdcb6e;
  --warning-light: rgba(253, 203, 110, 0.15);
  --danger: #ff6b6b;
  --danger-light: rgba(255, 107, 107, 0.15);
  --winner-bg: rgba(0, 206, 201, 0.08);
  --winner-border: #00cec9;
  --loser-bg: rgba(255, 107, 107, 0.05);
  --gradient-1: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
  --gradient-2: linear-gradient(135deg, #00cec9 0%, #55efc4 100%);
  --gradient-3: linear-gradient(135deg, #fd79a8 0%, #e17055 100%);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.2);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode */
:root.light {
  --bg-primary: #f0f2f5;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f9fe;
  --bg-input: #f5f6fa;
  --border: #e0e3eb;
  --border-hover: #b8bdd4;
  --text-primary: #1a1d27;
  --text-secondary: #5d6280;
  --text-muted: #9499b3;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(108, 92, 231, 0.1);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    "Inter",
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Background Effect --- */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%,
      rgba(108, 92, 231, 0.08) 0%,
      transparent 70%),
    radial-gradient(ellipse 50% 30% at 80% 80%,
      rgba(0, 206, 201, 0.06) 0%,
      transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

:root.light .header {
  background: rgba(255, 255, 255, 0.85);
}

.header-inner {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Theme Toggle --- */
.theme-toggle {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: var(--transition);
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-1);
  color: white;
  box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108, 92, 231, 0.4);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
}

.btn-success {
  background: var(--gradient-2);
  color: #0f1117;
  box-shadow: 0 4px 15px rgba(0, 206, 201, 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn-danger:hover {
  background: var(--danger-light);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

/* --- Main Container --- */
.main-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* --- Section Title --- */
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: "";
  width: 4px;
  height: 24px;
  background: var(--gradient-1);
  border-radius: 4px;
}

/* --- PC Cards Grid --- */
.pc-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* --- Card --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(108, 92, 231, 0.03);
}

.card-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- PC Number Badge --- */
.pc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: white;
}

.pc-badge-1 {
  background: #6c5ce7;
}

.pc-badge-2 {
  background: #00cec9;
}

.pc-badge-3 {
  background: #fd79a8;
}

.pc-badge-4 {
  background: #e17055;
}

.pc-badge-5 {
  background: #00b894;
}

.pc-badge-6 {
  background: #0984e3;
}

.pc-badge-7 {
  background: #fdcb6e;
  color: #1a1d27;
}

.pc-badge-8 {
  background: #d63031;
}

.pc-badge-9 {
  background: #e84393;
}

.pc-badge-10 {
  background: #636e72;
}

/* --- Form Elements --- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}

/* --- Suggest Dropdown --- */
.suggest-wrapper {
  position: relative;
}

.suggest-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  min-width: 280px;
}

.suggest-dropdown.active {
  display: block;
  animation: slideDown 0.2s ease;
}

.suggest-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  transition: var(--transition);
  border-bottom: 1px solid rgba(45, 49, 72, 0.3);
}

.suggest-item:last-child {
  border-bottom: none;
}

.suggest-item:hover,
.suggest-item.active {
  background: var(--accent-glow);
  color: var(--accent-light);
}

.suggest-item .score {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(108, 92, 231, 0.15);
  color: var(--accent-light);
}

/* --- Image Upload --- */
.image-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.image-upload-area:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.image-upload-area.has-image {
  padding: 8px;
}

.image-upload-area img {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.image-upload-icon {
  font-size: 32px;
  color: var(--text-muted);
}

.image-upload-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(108, 92, 231, 0.3);
}

.tab:hover:not(.active) {
  color: var(--text-primary);
  background: var(--bg-card);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* --- Section Accordion --- */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
}

.accordion-header {
  padding: 12px 16px;
  background: rgba(108, 92, 231, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  user-select: none;
}

.accordion-header:hover {
  background: rgba(108, 92, 231, 0.06);
}

.accordion-header .arrow {
  transition: var(--transition);
  font-size: 12px;
}

.accordion.open .accordion-header .arrow {
  transform: rotate(180deg);
}

.accordion-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.accordion.open .accordion-body {
  display: block;
  animation: slideDown 0.2s ease;
}

/* --- Checkbox Grid --- */
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* --- Radio Group --- */
.radio-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  cursor: pointer;
}

.radio-item input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* --- Condition Select --- */
.condition-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.condition-table th,
.condition-table td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: center;
}

.condition-table th {
  background: rgba(108, 92, 231, 0.05);
  font-weight: 600;
  color: var(--text-secondary);
}

.condition-table select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 4px 8px;
  font-size: 12px;
}

/* --- Comparison Table --- */
.comparison-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  border: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  vertical-align: middle;
}

.comparison-table thead th {
  background: var(--bg-secondary);
  font-weight: 700;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table .category-header {
  background: rgba(108, 92, 231, 0.08);
  font-weight: 700;
  color: var(--accent-light);
  text-align: left;
  font-size: 14px;
}

.comparison-table .spec-label {
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 160px;
  background: rgba(26, 29, 39, 0.5);
}

:root.light .comparison-table .spec-label {
  background: rgba(245, 246, 250, 0.8);
}

.comparison-table .winner {
  background: var(--winner-bg);
  font-weight: 600;
}

.comparison-table .loser {
  background: var(--loser-bg);
}

.comparison-table .draw {
  background: rgba(253, 203, 110, 0.05);
}

.comparison-table .pc-header {
  min-width: 180px;
}

.comparison-table .pc-header img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.comparison-table .pc-header .pc-name {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
}

.comparison-table .pc-header .pc-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--success);
}

/* Score bar */
.score-bar-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.score-bar {
  width: 60px;
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s ease;
}

.score-bar-fill.high {
  background: var(--gradient-2);
}

.score-bar-fill.mid {
  background: var(--gradient-1);
}

.score-bar-fill.low {
  background: var(--gradient-3);
}

.score-value {
  font-weight: 700;
  font-size: 14px;
  min-width: 30px;
}

/* --- Status Badges --- */
.status-ok {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--success-light);
  color: var(--success);
}

.status-ng {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--danger-light);
  color: var(--danger);
}

.status-none {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(93, 98, 128, 0.15);
  color: var(--text-muted);
}

/* --- AI Panel --- */
.ai-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 24px;
}

.ai-panel-header {
  padding: 16px 20px;
  background: linear-gradient(135deg,
      rgba(108, 92, 231, 0.1),
      rgba(0, 206, 201, 0.1));
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-panel-header h3 {
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-panel-body {
  padding: 20px;
}

.ai-response {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 20px;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-wrap;
  min-height: 100px;
}

.ai-response .loading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
}

.ai-api-key-group {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  align-items: end;
}

.ai-api-key-group .form-group {
  flex: 1;
  margin: 0;
}

/* --- Export Panel --- */
.export-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 24px;
}

.export-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Add PC Button --- */
.add-pc-card {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  cursor: pointer;
  transition: var(--transition);
  gap: 12px;
  color: var(--text-muted);
}

.add-pc-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}

.add-pc-card .icon {
  font-size: 48px;
  font-weight: 300;
}

.add-pc-card .text {
  font-size: 14px;
  font-weight: 600;
}

/* --- Sample Data Loader --- */
.sample-loader {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 24px;
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.sample-item {
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 12px;
}

.sample-item:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.sample-item .name {
  font-weight: 600;
  margin-bottom: 4px;
}

.sample-item .price {
  color: var(--success);
  font-weight: 700;
}

.sample-item .spec {
  color: var(--text-muted);
  font-size: 11px;
}

/* --- URL Input --- */
.url-input-group {
  display: flex;
  gap: 8px;
  align-items: end;
}

.url-input-group .form-group {
  flex: 1;
  margin: 0;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* --- Image Viewer Modal --- */
.image-viewer-modal .modal {
  max-width: 90vw;
}

.image-viewer-modal img {
  width: 100%;
  border-radius: var(--radius-md);
}

/* --- Toolbar --- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Overall Score Card --- */
.overall-score-card {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg,
      rgba(108, 92, 231, 0.05),
      rgba(0, 206, 201, 0.05));
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.overall-score {
  font-size: 48px;
  font-weight: 900;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.overall-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  animation: slideUp 0.3s ease;
  max-width: 400px;
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.info {
  border-left: 4px solid var(--accent);
}

/* --- Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.loading-dots::after {
  content: "";
  animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes loadingDots {
  0% {
    content: "";
  }

  25% {
    content: ".";
  }

  50% {
    content: "..";
  }

  75% {
    content: "...";
  }
}

/* --- Summary Section --- */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: center;
}

.summary-card .value {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.summary-card .label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card.best {
  border-color: var(--success);
  background: var(--success-light);
}

.summary-card.best .value {
  color: var(--success);
}

/* --- Winner Crown --- */
.winner-crown {
  display: inline-block;
  margin-right: 4px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .pc-cards-grid {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 8px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .export-buttons {
    flex-direction: column;
  }

  .comparison-table .spec-label {
    min-width: 120px;
  }

  .sample-grid {
    grid-template-columns: 1fr 1fr;
  }

  .summary-cards {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .main-container {
    padding: 12px;
  }

  .sample-grid {
    grid-template-columns: 1fr;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* --- Print --- */
@media print {

  .header,
  .toolbar,
  .add-pc-card,
  .card-footer,
  .export-panel,
  .ai-api-key-group,
  .btn,
  .theme-toggle,
  .sample-loader {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .comparison-table th,
  .comparison-table td {
    border-color: #ccc;
  }
}