body {
  font-family:  "Arial", "Helvetica Neue", sans-serif;
  margin: 0;
  background: #ffffff;
}

header {
  color: white;
  padding: 0.6rem; 
  text-align: center;
  font-size: 1.3rem; 
  font-weight: bold;
  position: relative;

  background: rgb(56,56,56); /* Old browsers */
  background: -moz-linear-gradient(top,  rgba(56,56,56,1) 0%, rgba(25,25,25,1) 26%, rgba(0,0,0,1) 51%, rgba(25,25,25,1) 83%, rgba(30,30,30,1) 100%); /* FF3.6+ */
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(56,56,56,1)), color-stop(26%,rgba(25,25,25,1)), color-stop(51%,rgba(0,0,0,1)), color-stop(83%,rgba(25,25,25,1)), color-stop(100%,rgba(30,30,30,1))); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(top,  rgba(56,56,56,1) 0%,rgba(25,25,25,1) 26%,rgba(0,0,0,1) 51%,rgba(25,25,25,1) 83%,rgba(30,30,30,1) 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(top,  rgba(56,56,56,1) 0%,rgba(25,25,25,1) 26%,rgba(0,0,0,1) 51%,rgba(25,25,25,1) 83%,rgba(30,30,30,1) 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(top,  rgba(56,56,56,1) 0%,rgba(25,25,25,1) 26%,rgba(0,0,0,1) 51%,rgba(25,25,25,1) 83%,rgba(30,30,30,1) 100%); /* IE10+ */
  background: linear-gradient(to bottom,  rgba(56,56,56,1) 0%,rgba(25,25,25,1) 26%,rgba(0,0,0,1) 51%,rgba(25,25,25,1) 83%,rgba(30,30,30,1) 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#383838', endColorstr='#1e1e1e',GradientType=0 ); /* IE6-9 */
}
.tsv-link, #save-btn {
  position: absolute;
  top: 0.6rem;
  font-size: 0.7rem; 
  background-color: #444;
  color: white;
  padding: 3px 6px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: bold;
}

.tsv-link { right: 0.6rem; }
#save-btn { left: 0.6rem; cursor: pointer; border: none; }

.tabs {
  display: flex;
  background: #ddd;
  flex-wrap: wrap;
}

.tab {
  flex: 1 1 auto;
  text-align: center;
  padding: 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
}

.tab.active {
  background: white;
  border-bottom: 2px solid #000;
  font-weight: bold;
}

.checkbox-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  background: #f0f0f0;
}
#refresh-btn {
  margin-left: 10px;
  background-color: #007bff;
  color: white;
  border: none;
  padding: 4px 8px;
  font-size: 0.8rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.checkbox-container input {
  transform: scale(1.2); 
  margin-right: 6px;
}

.checkbox-container label {
  font-size: 0.9rem;
}

.content {
  padding: 0.6rem;
}
main {
  max-width: 600px;
  margin: 0 auto;
}

.section-title {
  font-size: 1rem;
  font-weight: bold;
  margin: 0.8rem 0 0.4rem;
  border-bottom: 1px solid #aaa;
}

.event-card {
  background: white;
  border-radius: 5px;
  padding: 0.5rem;
  margin: 0.3rem 0;
  font-size: 0.8rem;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.1);
  white-space: pre-wrap;
  cursor: pointer;
}

.hidden { display: none; }

.red { color: red; font-weight: bold; }
.blue { color: blue; font-weight: bold; }

.modal-backdrop {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-backdrop.show { display: flex; }

.modal-content {
  background: white;
  padding: 12px;
  border-radius: 6px;
  max-width: 80%;     
  max-height: 70%;    
  overflow-y: auto;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  position: relative;
  font-size: 0.8rem;  
  line-height: 1.4;   
}


.modal-content #modal-close {
  position: absolute;
  top: 6px;
  right: 10px;
  font-size: 2rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  header {
    font-size: 1.1rem;
    padding: 0.4rem;
  }

  .tsv-link, #save-btn {
    font-size: 0.6rem;
    padding: 2px 5px;
    top: 0.3rem;
  }

  .tab {
    font-size: 0.8rem;
    padding: 0.4rem;
  }

  .checkbox-container label {
    font-size: 0.8rem;
  }

  .event-card {
    font-size: 0.7rem;
    padding: 0.4rem;
    margin: 0.25rem 0;
  }
}

@media (max-width: 480px) {
  header {
    font-size: 1rem;
    padding: 0.3rem;
  }

  .tsv-link, #save-btn {
    font-size: 0.55rem;
    padding: 2px 4px;
  }

  .tab {
    font-size: 0.75rem;
    padding: 0.35rem;
  }

  .event-card {
    font-size: 0.65rem;
    padding: 0.35rem;
  }
}
