* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: #f5f5f5;
  color: #333;
}

/* Update Banner */
.update-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
  color: white;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  font-size: 14px;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

.update-button {
  background: white;
  color: #357abd;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  font-size: 13px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.update-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.update-dismiss {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  transition: background 0.2s;
}

.update-dismiss:hover {
  background: rgba(255, 255, 255, 0.1);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
  background-color: white;
  min-height: 100vh;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Main content area */
.main-content {
  padding: 0 20px 20px 20px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.header-left {
  flex: 1;
}

header h1 {
  flex: 1;
  text-align: center;
  font-size: 2em;
  color: #2c3e50;
  margin: 0;
}

.search-container {
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Dropdown Menu */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-button {
  padding: 8px 16px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.dropdown-button:hover {
  background-color: #2980b9;
}

.dropdown-button:active {
  background-color: #21618c;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  z-index: 1000;
  overflow: hidden;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background-color: white;
  color: #2c3e50;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background-color: #ecf0f1;
}

.dropdown-item:active {
  background-color: #d5dbdb;
}

/* Search Inputs */
#searchInput {
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  width: 300px;
}

#searchInput:focus {
  outline: none;
  border-color: #3498db;
}

#searchButton {
  padding: 8px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

#searchButton:hover {
  background-color: #2980b9;
}

#searchButton:active {
  background-color: #21618c;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 20px;
}

.tab-button {
  padding: 12px 24px;
  background-color: #ecf0f1;
  border: none;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #555;
  transition: background-color 0.2s;
}

.tab-button:hover {
  background-color: #d5dbdb;
}

.tab-button.active {
  background-color: white;
  color: #2c3e50;
  border-bottom: 2px solid white;
  margin-bottom: -2px;
}

/* Tab Content */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel h2 {
  font-size: 1.5em;
  color: #2c3e50;
  margin-bottom: 20px;
}

/* Sequence List */
.sequence-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 0;
}

.sequence-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.sequence-item:hover {
  background-color: #f8f9fa;
}

.sequence-item:hover .sequence-name {
  color: #2980b9;
  text-decoration: underline;
}

.sequence-item:active .sequence-name {
  color: #21618c;
}

.tree-button {
  padding: 2px 8px;
  background-color: #27ae60;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.tree-button:hover {
  background-color: #229954;
}

.tree-button:active {
  background-color: #1e8449;
}

.sequence-name {
  font-size: 16px;
  color: #3498db;
  text-decoration: none;
  transition: all 0.2s;
}

/* Loading and Messages */
.loading, .error-message {
  padding: 20px;
  text-align: center;
  color: #7f8c8d;
  font-style: italic;
}

.error-message {
  color: #e74c3c;
  background-color: #fadbd8;
  border: 1px solid #e74c3c;
  border-radius: 4px;
}

/* Under Construction */
.under-construction {
  text-align: center;
  padding: 60px 20px;
  color: #7f8c8d;
}

.under-construction h2 {
  margin-bottom: 10px;
}

.under-construction p {
  font-style: italic;
}

/* Modal Dialog */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

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

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-content h2 {
  margin: 0 0 20px 0;
  color: #2c3e50;
  font-size: 1.8em;
}

.modal-close {
  position: absolute;
  right: 15px;
  top: 15px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  line-height: 20px;
}

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

.modal-button {
  margin-top: 20px;
  padding: 10px 24px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.modal-button:hover {
  background-color: #2980b9;
}

#aboutContent {
  color: #555;
  line-height: 1.8;
}

#aboutContent p {
  margin: 10px 0;
}

#aboutContent ul {
  margin: 10px 0;
  padding-left: 20px;
}

#aboutContent li {
  margin: 5px 0;
}

/* Spell List Items */
.spell-list-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.spell-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-radius: 3px;
}

.spell-item:hover {
  background-color: #f8f9fa;
}

.spell-name {
  font-size: 15px;
  color: #3498db;
  font-weight: 500;
  flex: 1;
}

.spell-item:hover .spell-name {
  color: #2980b9;
  text-decoration: underline;
}

.spell-meta {
  font-size: 13px;
  color: #7f8c8d;
  margin-left: 15px;
  white-space: nowrap;
}
