/* Scoped CSS for Chess.com Player Stats Lookup */
.ccps-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #f8fafc;
  line-height: 1.5;
  margin: 0;
  padding: 0;
}

.ccps-main {
  padding: 1.5rem 1rem 3rem;
}

.ccps-container {
  max-width: 1100px;
  margin: 0 auto;
}

.ccps-app-card {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.ccps-search-section {
  margin-bottom: 1.5rem;
}

.ccps-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.5rem;
}

.ccps-input-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.ccps-input {
  flex: 1;
  min-width: 240px;
  padding: 0.75rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.ccps-input:focus {
  border-color: #2563eb;
}

.ccps-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  text-decoration: none;
}

.ccps-btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.ccps-btn-primary:hover {
  background: #1d4ed8;
}

.ccps-presets-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ccps-presets-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ccps-select {
  padding: 0.45rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #1e293b;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  max-width: 100%;
}

.ccps-select:focus {
  border-color: #2563eb;
}

.ccps-presets {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.ccps-preset-label {
  font-size: 0.825rem;
  color: #64748b;
  font-weight: 500;
}

.ccps-preset-btn {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.2rem 0.55rem;
  font-size: 0.8rem;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ccps-preset-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Player View */
.ccps-player-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border-top: 1px solid #e2e8f0;
  padding-top: 1.5rem;
}

.ccps-hero-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
}

.ccps-hero-left {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ccps-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ccps-badge-title {
  display: inline-block;
  background: #b91c1c;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.ccps-player-name {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.ccps-player-handle {
  font-size: 0.95rem;
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ccps-player-status {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
}

.ccps-hero-right {
  display: flex;
  align-items: center;
}

.ccps-btn-profile {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2563eb;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ccps-btn-profile:hover {
  background: #eff6ff;
  border-color: #2563eb;
}

/* Ratings Grid */
.ccps-ratings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.ccps-rating-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ccps-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ccps-mode-title {
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.ccps-rating-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: #16a34a;
}

.ccps-card-sub {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #64748b;
}

.ccps-card-sub strong {
  color: #0f172a;
}

.ccps-record-bar {
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  background: #e2e8f0;
}

.ccps-bar-win {
  background: #22c55e;
}

.ccps-bar-draw {
  background: #94a3b8;
}

.ccps-bar-loss {
  background: #ef4444;
}

.ccps-record-text {
  font-size: 0.75rem;
  color: #64748b;
  text-align: right;
}

/* Guide Section */
.ccps-guide-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  padding: 1.75rem;
  margin-bottom: 2rem;
}

.ccps-section-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0f172a;
}

.ccps-lead-text {
  color: #475569;
  font-size: 0.95rem;
  margin: 0 0 1.25rem;
}

.ccps-table-wrap {
  overflow-x: auto;
}

.ccps-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ccps-table th {
  background: #f8fafc;
  color: #334155;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 600;
}

.ccps-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}

.ccps-table tr:hover {
  background: #f8fafc;
}
