/* ============================================================
   MDroid Emulator - Version Manager Styles
   ============================================================ */

/* Badges de Status */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-stable {
  background: linear-gradient(135deg, #00d084, #00a86d);
  color: white;
}

.badge-beta {
  background: linear-gradient(135deg, #ff9500, #ff7b00);
  color: white;
}

.badge-prerelease {
  background: linear-gradient(135deg, #9945ff, #7c3aed);
  color: white;
}

.badge-latest {
  background: linear-gradient(135deg, #00d9ff, #0099cc);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Modal de Releases */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-primary, #0f0f1a);
  margin: 10% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  color: var(--text-primary, #fff);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary, #999);
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-secondary, rgba(255, 255, 255, 0.1));
  color: var(--text-primary, #fff);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--bg-secondary, rgba(255, 255, 255, 0.05));
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary, rgba(255, 255, 255, 0.2));
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--bg-quaternary, rgba(255, 255, 255, 0.3));
}

/* Release Cards */
#releases-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.release-card {
  padding: 20px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  border-radius: 8px;
  background: var(--bg-secondary, rgba(255, 255, 255, 0.03));
  transition: all 0.3s;
}

.release-card:hover {
  border-color: var(--accent-color, #00d9ff);
  background: var(--bg-secondary, rgba(255, 255, 255, 0.08));
  box-shadow: 0 8px 32px rgba(0, 217, 255, 0.1);
}

.release-card.latest {
  border-color: var(--accent-color, #00d9ff);
  background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(0, 153, 204, 0.05));
}

.release-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 16px;
}

.release-version {
  display: flex;
  align-items: center;
  gap: 8px;
}

.release-version h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary, #fff);
}

.release-date {
  font-size: 13px;
  color: var(--text-secondary, #999);
  white-space: nowrap;
}

.release-description {
  margin-bottom: 12px;
}

.release-description p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, #aaa);
  line-height: 1.5;
}

.release-info {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
}

.info-item {
  font-size: 12px;
  color: var(--text-secondary, #999);
}

.info-item strong {
  color: var(--text-primary, #fff);
  font-weight: 600;
}

.release-features {
  margin-bottom: 12px;
}

.release-features h4 {
  margin: 0 0 8px 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary, #aaa);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.release-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.release-features li {
  font-size: 13px;
  color: var(--text-secondary, #aaa);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.release-features li:before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-color, #00d9ff);
  font-weight: bold;
}

.release-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--accent-color, #00d9ff);
  background: transparent;
  color: var(--accent-color, #00d9ff);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-small:hover {
  background: var(--accent-color, #00d9ff);
  color: var(--bg-primary, #0f0f1a);
}

/* Loading State */
.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary, #999);
  font-size: 14px;
}

.loading:after {
  content: "";
  display: inline-block;
  animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
  0%, 20% { content: "."; }
  40% { content: ".."; }
  60% { content: "..."; }
  80%, 100% { content: ""; }
}

/* Botão para abrir histórico */
.btn-releases-history {
  padding: 8px 16px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.2));
  background: transparent;
  color: var(--text-secondary, #aaa);
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.btn-releases-history:hover {
  border-color: var(--accent-color, #00d9ff);
  color: var(--accent-color, #00d9ff);
  background: rgba(0, 217, 255, 0.1);
}

/* Responsivo */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20% auto;
    max-height: 90vh;
  }

  .modal-header {
    padding: 16px;
  }

  .release-header {
    flex-direction: column;
  }

  .release-info {
    flex-direction: column;
    gap: 8px;
  }

  .release-actions {
    justify-content: stretch;
  }

  .btn-small {
    flex: 1;
  }
}

/* Tema claro (se houver suporte) */
@media (prefers-color-scheme: light) {
  .modal-content {
    background: #f5f5f5;
    color: #333;
  }

  .release-card {
    background: #fff;
    border-color: #ddd;
  }

  .release-card:hover {
    box-shadow: 0 8px 32px rgba(0, 217, 255, 0.15);
  }
}
