/* Themes page layout */
.themes-intro {
  margin-bottom: 20px;
  color: inherit;
  opacity: 0.9;
}

.themes-panel {
  margin-bottom: 24px;
  padding: 20px;
  border-radius: 16px;
  border: 3px solid rgba(0, 0, 0, 0.15);
  background: linear-gradient(145deg, #f5f6f8, #e8eaed);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.themes-panel-title {
  margin: 0 0 12px 0;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.themes-panel-title .material-icons {
  font-size: 1.25rem;
  opacity: 0.9;
}

.themes-panel-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.themes-panel-label {
  font-weight: 600;
}

.themes-panel-hint {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
  width: 100%;
}

.themes-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 180px;
}

.themes-dropdown-btn .material-icons {
  font-size: 18px;
  margin-left: auto;
}

.themes-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.themes-reset-btn {
  width: auto !important;
  padding: 8px 14px !important;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  width: 100%;
}

.theme-card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border: 2px solid #c0c4c8;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.theme-card img {
  width: 100%;
  display: block;
  height: 140px;
  object-fit: cover;
}

.theme-card .info {
  padding: 14px;
  color: #0f172a;
}

.theme-card h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
  line-height: 1.3;
}

.theme-card p {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.4;
}

.theme-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.theme-actions .nav-btn {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* Dropdown styles (from settings) */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: fixed;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  min-width: 150px;
  z-index: 99999;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.dropdown-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: var(--default-font-family, 'Shrikhand');
  font-size: 0.95rem;
  color: #334155;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

.dropdown-item:active {
  background: rgba(59, 130, 246, 0.2);
}

.dropdown-item:not(:last-child) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}