body {
  font-family: 'Noto Sans TC', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.circle-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  padding: 20px 0;
}

@media (max-width: 1400px) {
  .circle-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }
}

@media (max-width: 1200px) {
  .circle-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }
}

@media (max-width: 990px) {
  .circle-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
}


@media (max-width: 768px) {
  .circle-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .circle-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.circle-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  padding: 8px;
  transition: all 0.3s ease;
  border: 1px solid rgba(30, 150, 124, 0.1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.circle-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(30, 150, 124, 0.15);
  border-color: rgba(30, 150, 124, 0.3);
}

.circle-image {
  width: 100%;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 6px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.circle-image.loaded {
  opacity: 1;
}

.circle-image.error {
  opacity: 1;
  background: #f8f9fa;
}

@media (max-width: 768px) {
  .circle-image {
    height: 150px;
    margin-bottom: 6px;
    transition: all 1s ease;
    object-fit: cover;
  }
  
  .circle-image:hover,
  .circle-image:active,
  .circle-image:focus {
    height: auto;
    object-fit: contain;
    z-index: 100;
    position: relative;
    box-shadow: 0 8px 25px rgba(30, 150, 124, 0.3);
  }
  
  /* Larger text for mobile grid mode */
  .circle-card-name {
    font-size: 16px !important; /* Increased from 14px */
  }
  
  .circle-day {
    font-size: 14px !important; /* Increased from 12px */
    padding: 3px 10px; /* Slightly larger padding */
  }
  
  .circle-position {
    font-size: 14px !important; /* Increased from 12px */
    padding: 2px 8px; /* Slightly larger padding */
  }
  
  .badge {
    font-size: 13px !important; /* Increased from default */
    padding: 3px 8px; /* Larger padding */
  }
  
  .circle-card-badges .circle-badge {
    font-size: 13px !important; /* Increased from 11px */
    padding: 2px 8px; /* Larger padding */
  }
}

@media (max-width: 480px) {
  .circle-image {
    height: 150px;
    transition: all 1s ease;
    object-fit: cover;
  }
  
  .circle-image:hover,
  .circle-image:active,
  .circle-image:focus {
    height: auto;
    object-fit: contain;
    z-index: 100;
    position: relative;
    transition: all 1.5s ease;
    box-shadow: 0 8px 25px rgba(30, 150, 124, 0.3);
  }
  
  /* Keep larger text for smallest mobile screens */
  .circle-card-name {
    font-size: 15px !important; /* Slightly smaller than tablet but still larger than original */
  }
  
  .circle-day {
    font-size: 13px !important;
    padding: 2px 8px;
  }
  
  .circle-position {
    font-size: 13px !important;
    padding: 2px 6px;
  }
  
  .badge {
    font-size: 12px !important;
    padding: 2px 6px;
  }
  
  .circle-card-badges .circle-badge {
    font-size: 12px !important;
    padding: 1px 6px;
  }
}

.circle-card-name {
  font-size: 16px;
  font-weight: 600;
  color: #17585D;
  margin-bottom: 4px;
  line-height: 1.4;
  width: 100%;
  display: block;
  flex: none;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 1200px) {
  .circle-card-name {
    font-size: 15px;
  }
}

@media (max-width: 768px) {
  .circle-card-name {
    font-size: 14px;
  }
}

.circle-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  width: 100%;
}

.circle-position {
  font-size: 12px;
  color: #17585D;
  background: #e8f5f3;
  padding: 1px 5px;
  border-radius: 6px;
  font-weight: 500;
  border: 1px solid #b8ddd6;
}

.circle-day {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 500;
  margin-left: 5px;
}

.day-1 {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  color: #7b1fa2;
}

.day-2 {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
}

.circle-card-badges {
  margin-bottom: 4px;
  width: 100%;
}

.circle-card-badges .circle-badge {
  font-size: 12px;
  margin-right: 4px;
  margin-bottom: 3px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e9ecef;
  color: #495057;
}

@media (max-width: 1200px) {
  .circle-card-badges .circle-badge {
    font-size: 11px;
    padding: 1px 4px;
  }
}

.sns-links {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  width: 100%;
  align-items: center;
}

.sns-link {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 12px;
}

@media (max-width: 768px) {
  .sns-links {
    gap: 4px;
  }
  
  .sns-link {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
}

@media (max-width: 480px) {
  .sns-link {
    width: 18px;
    height: 18px;
    font-size: 9px;
  }
}

.sns-link.twitter { background: #1da1f2; color: white; }
.sns-link.pixiv { background: #0096fa; color: white; }
.sns-link.website { background: #28a745; color: white; }
.sns-link.booth { background: #fc4d50; color: white; }
.sns-link.instagram { background: #e4405f; color: white; }
.sns-link.facebook { background: #1877f2; color: white; }
.sns-link.plurk { background: #CF682F; color: white; }

.sns-link:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

.filter-controls {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.circle-filter-container {
  background: rgba(255, 255, 255, 0.9);
  padding: 15px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* New horizontal filter layout */
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  width: 100%;
}

.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.circle-filter-button {
  background: #e0e0e0;
  color: #333;
  padding: 5px 10px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 0px;
  margin-bottom: 7px;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.circle-filter-button:hover {
  background: #d0d0d0;
}

.circle-filter-button.active {
  background: #1E967C;
  color: white;
}

.day-section-title {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Day 1 styling - purple theme */
#day-1 .day-section-title {
  color: #7b1fa2;
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  padding: 0px 20px;
  border-radius: 12px;
  border: 2px solid #e1bee7;
}

#day-1 .day-scroll-button {
  background: #1565c0;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

#day-1 .day-scroll-button:hover {
  background: #0d47a1;
}

#day-1 .view-switch-button.active {
  background: #7b1fa2;
  color: white;
  box-shadow: 0 2px 4px rgba(123, 31, 162, 0.2);
}

#day-1 .view-switch-button:hover {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Day 2 styling - blue theme */
#day-2 .day-section-title {
  color: #1565c0;
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  padding: 0px 20px;
  border-radius: 12px;
  border: 2px solid #bbdefb;
}

#day-2 .day-scroll-button {
  background: #7b1fa2;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

#day-2 .day-scroll-button:hover {
  background: #4a148c;
}

#day-2 .view-switch-button.active {
  background: #1565c0;
  color: white;
  box-shadow: 0 2px 4px rgba(21, 101, 192, 0.2);
}

#day-2 .view-switch-button:hover {
  background: #e3f2fd;
  color: #1565c0;
}

.day-section-controls {
  display: flex;
  align-items: center;
  gap: 15px;
}

.day-scroll-button {
  background: #1E967C;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.day-scroll-button:hover {
  background: #17735F;
}

/* View Switch Controls */
.view-switch-container {
  display: flex;
  align-items: center;
  border-radius: 8px;
  padding: 4px;
}

.view-switch-button {
  background: #e9ecef; 
  color: #666;
  border: none;
  padding: 8px 12px;
  margin-left: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}

.view-switch-button:hover {
  background: #e9ecef;
  color: #333;
}

.view-switch-button.active {
  background: #1E967C;
  color: white;
  box-shadow: 0 2px 4px rgba(30, 150, 124, 0.2);
}

.view-switch-button i {
  font-size: 16px;
}

/* Table View Styles */
.circle-table-container {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
  display: none;
}

.circle-table-container.active {
  display: block;
}

.circle-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.circle-table thead {
  background: #1E967C;
  color: white;
}

.circle-table th,
.circle-table td {
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
  vertical-align: middle;
}

.circle-table th {
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.circle-table tbody tr:hover {
  background: rgba(30, 150, 124, 0.05);
}

.circle-table tbody tr:nth-child(even) {
  background: rgba(248, 249, 250, 0.5);
}

.circle-table tbody tr:nth-child(even):hover {
  background: rgba(30, 150, 124, 0.05);
}

/* Table specific styles */
.table-day-badge {
  display: inline-flex;
  gap: 3px;
}

.table-day-badge .circle-day {
  font-size: 11px;
  padding: 2px 6px;
  margin: 0;
}

.table-position-row {
  font-weight: 600;
  color: #17585D;
  background: #e8f5f3;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  min-width: 35px;
  display: inline-block;
}

.table-position-no {
  font-weight: 600;
  color: #17585D;
  text-align: center;
  min-width: 35px;
}

.table-circle-name {
  font-weight: 600;
  color: #17585D;
  max-width: 200px;
  word-wrap: break-word;
}

.table-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.table-sns-links {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
}

.table-sns-links .sns-link {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

/* Responsive table */
@media (max-width: 1200px) {
  .circle-table {
    font-size: 13px;
  }
  
  .circle-table th,
  .circle-table td {
    padding: 10px 6px;
  }
}

@media (max-width: 768px) {
  .circle-table-container {
    overflow-x: auto;
  }
  
  .circle-table {
    min-width: 600px;
    font-size: 12px;
  }
  
  .circle-table th,
  .circle-table td {
    padding: 8px 4px;
  }
  
  .table-circle-name {
    max-width: 150px;
  }
  
  /* Mobile adjustments for day section header */
  .day-section-title {
    font-size: 1.2em;
  }
  
  /* Keep buttons in a single row on mobile */
  .day-section-controls {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
  }
  
  .view-switch-container {
    order: 0;
    flex-shrink: 0;
  }
  
  .day-scroll-button {
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }
  
  .view-switch-button {
    padding: 6px 8px;
    font-size: 12px;
    margin-left: 4px;
  }
  
  /* Make icons bigger in mobile */
  .view-switch-button i {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .circle-table th,
  .circle-table td {
    padding: 6px 3px;
  }
  
  .table-circle-name {
    max-width: 120px;
  }
  
  .day-section-title {
    font-size: 1.3em;
  }
  
  .day-section-controls {
    gap: 6px;
  }
  
  .day-scroll-button {
    padding: 5px 8px;
    font-size: 11px;
  }
  
  .view-switch-button {
    padding: 5px 6px;
    font-size: 11px;
    margin-left: 2px;
  }
  
  /* Make icons bigger in smallest mobile too */
  .view-switch-button i {
    font-size: 18px; /* Slightly smaller than tablet mobile */
  }
}

.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

.no-results {
  text-align: center;
  padding: 40px;
  color: #999;
}

.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #1E967C;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top i {
  font-size: 20px;
}

.back-to-top:hover {
  background: #17735F;
  transform: translateY(-2px);
}

/* When there are many SNS links, you might want to limit the display */
.sns-links .sns-link:nth-child(n+7) {
  display: none;
}

@media (min-width: 769px) {
  .sns-links .sns-link:nth-child(n+7) {
    display: flex;
  }
}

@media (max-width: 768px) {
  .circle-filter-container {
    padding: 12px;
  }
  
  .circle-filter-button {
    padding: 4px 8px;
    font-size: 12px;
  }
  
  .filter-row {
    gap: 5px;
  }
}


/* Add these styles to your circlelist.css file */

/* Floorplan button in day section controls (desktop only) */
.floorplan-button {
  background: #28a745;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.floorplan-button:hover {
  background: #218838;
}

.floorplan-button i {
  font-size: 16px;
}

/* Hide floorplan button in day controls on mobile - IMPORTANT! */
@media (max-width: 768px) {
  .day-section-controls .floorplan-button {
    display: none !important;
  }
}

/* Bottom-right button bar container */
.bottom-button-bar {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 1000;
}

/* Fixed floorplan button (left in the bottom bar) */
.floorplan-fixed-button {
  background: #28a745;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floorplan-fixed-button i {
  font-size: 20px;
}

.floorplan-fixed-button:hover {
  background: #218838;
  transform: translateY(-2px);
}

/* Update back-to-top button to work within the button bar */
.back-to-top {
  position: relative; /* Changed from fixed */
  bottom: auto;
  right: auto;
  background: #1E967C;
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top i {
  font-size: 20px;
}

.back-to-top:hover {
  background: #17735F;
  transform: translateY(-2px);
}

/* Floorplan Modal */
.floorplan-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.floorplan-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.floorplan-modal-content {
  position: relative;
  width: 80%;
  height: 80%;
  max-width: 1200px;
  max-height: 800px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.floorplan-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.floorplan-modal-close:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.floorplan-modal-body {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f8f9fa;
}

.floorplan-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.floorplan-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #666;
}

.floorplan-loading i {
  margin-right: 10px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .floorplan-modal-content {
    width: 95%;
    height: 85%;
    margin: 0 10px;
  }
  
  .floorplan-modal-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  
  .floorplan-modal-body {
    padding: 15px;
  }
  
  .bottom-button-bar {
    bottom: 15px;
    right: 15px;
    gap: 8px;
  }
  
  .floorplan-fixed-button {
    width: 45px;
    height: 45px;
  }
  
  .floorplan-fixed-button i {
    font-size: 18px;
  }
  
  .back-to-top {
    width: 45px;
    height: 45px;
  }
  
  .back-to-top i {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .floorplan-modal-content {
    width: 98%;
    height: 90%;
  }
  
  .floorplan-modal-close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 18px;
  }
  
  .floorplan-modal-body {
    padding: 10px;
  }
  
  .bottom-button-bar {
    bottom: 12px;
    right: 12px;
    gap: 6px;
  }
  
  .floorplan-fixed-button {
    width: 42px;
    height: 42px;
  }
  
  .floorplan-fixed-button i {
    font-size: 16px;
  }
  
  .back-to-top {
    width: 42px;
    height: 42px;
  }
  
  .back-to-top i {
    font-size: 16px;
  }
}
