/* === Loading Progress Bar === */
.load-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: rgba(13, 27, 62, 0.95);
  backdrop-filter: blur(4px);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  transition: opacity 0.5s, transform 0.5s;
}

.load-progress.done {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.load-progress-text {
  font-size: 0.82rem;
  color: #e0e0e0;
  white-space: nowrap;
  flex-shrink: 0;
}

.load-progress-track {
  flex: 1;
  height: 10px;
  background: #1a1a2e;
  border-radius: 5px;
  overflow: hidden;
}

.load-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #e94560, #ff6b81);
  border-radius: 5px;
  transition: width 0.3s;
}

.load-progress-pct {
  font-size: 0.85rem;
  font-weight: bold;
  color: #e94560;
  min-width: 3.5rem;
  text-align: right;
  flex-shrink: 0;
}

/* === Base Theme === */
body {
  background: #1a1a2e;
  color: #e0e0e0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
}

/* === Sticky Top Wrapper === */
.sticky-top {
  position: sticky;
  top: 0;
  z-index: 900;
}

/* === Header === */
.header {
  background: #16213e;
  padding: 1.25rem 2rem;
  text-align: center;
  border-bottom: 2px solid #e94560;
}

.header h1 {
  color: #e94560;
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: 0.05em;
}

.header-disclaimer {
  color: #888;
  font-size: 0.72rem;
  margin: 0.5rem 0 0;
}

/* === Controls Bar === */
.controls {
  background: #16213e;
  padding: 1rem 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid #0f3460;
}

.controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.search-input {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  width: 240px;
  outline: none;
  transition: border-color 0.2s;
}

.search-input:focus {
  border-color: #e94560;
}

/* === Color Filter Buttons === */
.color-filters {
  display: flex;
  gap: 4px;
}

.color-filter-btn {
  width: 30px;
  height: 30px;
  border: 2px solid transparent;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s;
  opacity: 0.3;
}

.color-filter-btn.active {
  opacity: 1;
  border-color: #fff;
}

.color-filter-btn[data-color="青"] { background: #1565c0; color: #fff; }
.color-filter-btn[data-color="緑"] { background: #2e7d32; color: #fff; }
.color-filter-btn[data-color="白"] { background: #cfd8dc; color: #1a1a2e; }
.color-filter-btn[data-color="赤"] { background: #c62828; color: #fff; }
.color-filter-btn[data-color="黄"] { background: #f9a825; color: #1a1a2e; }
.color-filter-btn[data-color="黒"] { background: #424242; color: #fff; }

.search-input::placeholder {
  color: #666;
}

.sort-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.sort-label {
  font-size: 0.85rem;
  color: #aaa;
  margin-right: 0.25rem;
}

.sort-btn {
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #aaa;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.sort-btn:hover {
  border-color: #e94560;
  color: #e0e0e0;
}

.sort-btn.active {
  background: #e94560;
  border-color: #e94560;
  color: #fff;
}

/* Arrow indicator for sort direction */
.sort-btn.active::after {
  content: " \25BC"; /* ▼ descending */
  font-size: 0.65rem;
}

.sort-btn.active.asc::after {
  content: " \25B2"; /* ▲ ascending */
}

/* === Section Titles === */
.section-title {
  font-size: 1.2rem;
  padding: 1rem 2rem 0.5rem;
  margin: 0 auto;
  color: #e94560;
  border-bottom: 1px solid #0f3460;
  max-width: 1050px;
}

/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 1rem 2rem;
  max-width: 1050px;
  margin: 0 auto;
}

.card-item {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #16213e;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(233, 69, 96, 0.3);
}

.card-item img {
  width: 100%;
  height: auto;
  display: block;
  background: #0d1b3e;
  filter: saturate(0.8);
}

.card-item .card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent 0%, rgba(255, 255, 255, 0.5) 50%, rgba(255, 255, 255, 0.92) 100%);
  padding: 2rem 0.4rem 0.4rem;
}

.card-item .card-name {
  font-size: 0.82rem;
  font-weight: bold;
  letter-spacing: 0.03em;
  text-align: center;
  color: #fff;
  text-shadow:
    -1px -1px 0 rgba(0, 0, 0, 0.7),
     1px -1px 0 rgba(0, 0, 0, 0.7),
    -1px  1px 0 rgba(0, 0, 0, 0.7),
     1px  1px 0 rgba(0, 0, 0, 0.7),
     0    0   4px rgba(0, 0, 0, 0.5),
     2px  3px 6px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-stars {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  line-height: 1;
  margin-top: 0.2rem;
}

.stars-standalone {
  color: #f9a825;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.stars-synergy {
  color: #4fc3f7;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* === Modal === */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  justify-content: center;
  align-items: flex-start;
  overflow-y: auto;
  padding: 2rem 0 6rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #16213e;
  border-radius: 12px;
  max-width: 800px;
  width: 92%;
  margin: 2rem auto 6rem;
  position: relative;
  border: 1px solid #0f3460;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  background: rgba(22, 33, 62, 0.9);
  border: none;
  color: #e0e0e0;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 0 12px 0 8px;
}

.modal-close:hover {
  color: #e94560;
}

/* === Modal Header === */
.modal-header {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  clear: both;
}

.modal-header img {
  width: 220px;
  height: auto;
  border-radius: 8px;
  flex-shrink: 0;
  align-self: flex-start;
}

.modal-info {
  flex: 1;
  min-width: 0;
}

.modal-info h2 {
  margin: 0 0 0.75rem;
  color: #e94560;
  font-size: 1.4rem;
}

/* === Info Badges === */
.info-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.info-badge {
  background: #0f3460;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.82rem;
  white-space: nowrap;
}

/* === Color Badges === */
.color-blue { background: #1565c0; }
.color-red { background: #c62828; }
.color-green { background: #2e7d32; }
.color-yellow { background: #f9a825; color: #1a1a2e; }
.color-white { background: #cfd8dc; color: #1a1a2e; }
.color-black { background: #424242; }

/* === Abilities === */
.abilities-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #0f3460;
}

.abilities-section h3 {
  color: #e94560;
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.ability-item {
  background: #0d1b3e;
  border-radius: 6px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.88rem;
  line-height: 1.6;
  border-left: 3px solid #e94560;
}

.ability-timing {
  color: #e94560;
  font-weight: bold;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.ability-turn-limit {
  color: #888;
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

/* === Score Section === */
.score-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #0f3460;
}

.score-section h3 {
  color: #e94560;
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.score-label {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 0.2rem;
}

.score-bar-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.score-bar {
  flex: 1;
  height: 8px;
  background: #0a0a1a;
  border-radius: 4px;
  overflow: hidden;
}

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

.score-value {
  font-weight: bold;
  min-width: 2.5rem;
  text-align: right;
  font-size: 0.9rem;
}

/* === Analysis / Detail Sections === */
.detail-section {
  padding: 1rem 1.5rem;
  border-top: 1px solid #0f3460;
}

.detail-section h3 {
  color: #e94560;
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.detail-text {
  font-size: 0.88rem;
  line-height: 1.7;
  color: #ccc;
  margin-bottom: 0.75rem;
}

.detail-text:last-child {
  margin-bottom: 0;
}

/* === Deck Type Tags === */
.deck-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.deck-type-tag {
  background: #e94560;
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 12px;
  font-size: 0.8rem;
}

/* === Synergy Grid === */
.synergy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.synergy-card {
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s;
  position: relative;
  background: #0d1b3e;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.synergy-card:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
}

.synergy-card img {
  width: 100%;
  display: block;
}

.synergy-name {
  font-size: 0.65rem;
  padding: 0.3rem;
  text-align: center;
  background: rgba(0, 0, 0, 0.75);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Variants Grid === */
.variants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}

.variant-card {
  border-radius: 6px;
  overflow: hidden;
  background: #0d1b3e;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.variant-card img {
  width: 100%;
  display: block;
}

.variant-label {
  font-size: 0.72rem;
  padding: 0.3rem;
  color: #aaa;
}

/* === Review Request Button === */
.review-request-section {
  text-align: right;
  padding: 1rem 1.5rem 1.5rem;
}

.review-request-btn {
  background: transparent;
  border: 1px solid #e94560;
  color: #e94560;
  padding: 0.5rem 1.5rem;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.review-request-btn:hover {
  background: #e94560;
  color: #fff;
}

.review-request-btn:disabled {
  cursor: default;
  opacity: 0.7;
}

.review-request-btn.sent {
  border-color: #4caf50;
  color: #4caf50;
  opacity: 1;
}

.review-request-section-inline {
  padding: 0.8rem 0 0;
  text-align: right;
}

/* === Loading State === */
.loading {
  text-align: center;
  padding: 3rem;
  color: #aaa;
  font-size: 1rem;
}

/* === Site Footer === */
.site-footer {
  background: #16213e;
  border-top: 2px solid #e94560;
  padding: 1.5rem 2rem;
  text-align: center;
  margin-top: 2rem;
}

.site-footer .copyright {
  color: #e0e0e0;
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.site-footer .disclaimer {
  color: #888;
  font-size: 0.75rem;
  margin: 0;
}

.site-footer .footer-links {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
}

.site-footer .footer-links a {
  color: #e94560;
  text-decoration: none;
}

.site-footer .footer-links a:hover {
  text-decoration: underline;
}

.site-footer .footer-sep {
  color: #555;
  margin: 0 0.4rem;
}

/* === Image Protection === */
.card-grid img,
.modal-content img,
.synergy-card img,
.variant-card img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* === Responsive === */
@media (max-width: 640px) {
  .controls {
    padding: 0.75rem;
  }

  .controls-row {
    width: 100%;
  }

  .search-input {
    width: 100%;
    flex: 1;
    min-width: 0;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
    padding: 0.75rem;
  }

  .section-title {
    padding: 0.75rem;
    font-size: 1.1rem;
  }

  .modal-header {
    gap: 0.75rem;
    padding: 1rem;
  }

  .modal-header img {
    width: 120px;
    height: auto;
  }

  .modal-info h2 {
    font-size: 1.1rem;
    margin: 0 0 0.4rem;
  }

  .info-row {
    gap: 0.3rem;
    margin-bottom: 0.3rem;
  }

  .info-badge {
    padding: 0.15rem 0.45rem;
    font-size: 0.75rem;
  }

  .abilities-section {
    padding: 0.75rem 1rem;
  }

  .detail-section {
    padding: 0.75rem 1rem;
  }

  .score-section {
    padding: 0.75rem 1rem;
  }
}
/* === Contact Page === */
.contact-page {
  min-height: 80vh;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
}

.contact-container {
  max-width: 600px;
  width: 100%;
}

.contact-title {
  color: #e94560;
  font-size: 1.6rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

.contact-description {
  color: #aaa;
  font-size: 0.88rem;
  text-align: center;
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.contact-notice {
  background: #1b5e20;
  color: #c8e6c9;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.88rem;
}

.contact-errors {
  background: #b71c1c;
  color: #ffcdd2;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.contact-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.contact-form {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 12px;
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  color: #ccc;
  margin-bottom: 0.35rem;
}

.form-label.required::after {
  content: " *";
  color: #e94560;
}

.form-input {
  width: 100%;
  background: #0d1b3e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  color: #e0e0e0;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-input:focus {
  border-color: #e94560;
}

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

.form-actions {
  text-align: center;
  margin-top: 1.5rem;
}

.form-submit {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.65rem 2.5rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.form-submit:hover {
  background: #d63851;
}

.contact-back {
  text-align: center;
  margin-top: 1.5rem;
}

.contact-back a {
  color: #e94560;
  text-decoration: none;
  font-size: 0.85rem;
}

.contact-back a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .contact-page {
    padding: 1rem 0.75rem;
  }

  .contact-form {
    padding: 1rem;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
