/* Старые стили (оставляем для совместимости) */
.admin_center_cross{
  position:absolute;
  top:50%;
  left:50%;
  width:10px;
  height:10px;
  background: red;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.admin_get_scene_zoom_pitch_yaw{
  position:absolute;
  top:30px;
  right:230px;
  width:70px;
  height:30px;
  background: #fff;
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.admin_panorams_list{
  position:absolute;
  top: 10px;
  right:10px;
  border: 1px solid rgba(33, 33, 33, 0.8);
  font-size: 0.9rem;
  padding: 0.5rem;
  margin-bottom: 10px;
  color: #000000;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.67);
  border-radius: 8px;
  width:200px;
  height: calc(100% - 22px);
  overflow: hidden;
  overflow-y: auto;
}

.admin_panoram_item{
  display: flex;
  flex-direction: column;
  padding:5px;
  margin-bottom: 10px;
  cursor:pointer;
}
.admin_panoram_item.selected{
  border: 1px solid rgba(255, 0, 0, 0.8);
  background-color: rgb(253 44 0 / 16%);
  border-radius: 8px;
}
.admin_panoram_item .admin_panoram_item_name{
  font-size: 1rem;
  margin-bottom: 0px;
}
.admin_panoram_item img{
  max-width: 100%;
  height: auto;
}

/* Новые стили для админской панели */
.admin-toggle-btn {
  position: fixed !important;
  top: 20px !important;
  right: 20px !important;
  width: 50px !important;
  height: 50px !important;
  background: rgba(0, 0, 0, 0.7) !important;
  color: white !important;
  border: none !important;
  border-radius: 50% !important;
  font-size: 24px !important;
  cursor: pointer !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  pointer-events: auto !important;
}

.admin-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.9) !important;
  transform: scale(1.1) !important;
}

.admin-panel {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  width: 400px !important;
  height: 100vh !important;
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3) !important;
  z-index: 99999 !important;
  overflow-y: auto !important;
  font-family: 'Manrope', sans-serif !important;
  display: none !important;
}

.admin-panel[style*="block"],
.admin-panel.show {
  display: block !important;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #2c3e50;
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.admin-header-buttons {
  display: flex;
  gap: 10px;
}

.admin-close-btn,
.admin-minimize-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
  line-height: 1;
}

.admin-close-btn:hover {
  transform: rotate(90deg);
}

.admin-minimize-btn:hover {
  transform: scale(1.2);
}

/* Минимизированное состояние */
.admin-panel.minimized {
  width: 60px !important;
  overflow: hidden;
}

.admin-panel.minimized .admin-content {
  display: none;
}

.admin-panel.minimized .admin-header h2 {
  display: none;
}

.admin-panel.minimized .admin-minimize-btn::after {
  content: '+';
}

.admin-panel.minimized .admin-minimize-btn {
  font-size: 24px;
}

.admin-content {
  padding: 20px;
}

.admin-content h3 {
  margin-top: 0;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 10px;
}

.panorams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.panoram-item {
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: all 0.3s ease;
}

.panoram-item:hover {
  border-color: #3498db;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.panoram-item-preview {
  width: 100%;
  height: 100px;
  overflow: hidden;
  background: #f0f0f0;
}

.panoram-item-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panoram-item-name {
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  word-break: break-word;
}

.panoram-item-btn {
  width: 100%;
  padding: 8px;
  border: none;
  background: #3498db;
  color: white;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.3s;
}

.panoram-item-btn:hover {
  background: #2980b9;
}

.panoram-item-btn:first-of-type {
  border-top: 1px solid #ddd;
}

.admin-edit-panel {
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.admin-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.admin-limit-buttons {
  background: #e8f4f8;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
}

.admin-limit-buttons h5 {
  margin: 0 0 10px 0;
  color: #2c3e50;
  font-size: 0.95rem;
}

.limit-buttons-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.limit-btn {
  font-size: 0.85rem !important;
  padding: 8px 12px !important;
}

.reset-buttons {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reset-btn {
  background: #6c757d !important;
  font-size: 0.85rem !important;
  padding: 8px 12px !important;
}

.reset-btn:hover {
  background: #5a6268 !important;
}

.admin-btn {
  padding: 12px 20px;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  font-family: 'Manrope', sans-serif;
}

.admin-btn:hover {
  background: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.admin-btn:active {
  transform: translateY(0);
}

.admin-params {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
}

.admin-params h4 {
  margin-top: 0;
  color: #2c3e50;
}

.param-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.param-group label {
  font-size: 0.9rem;
  color: #555;
}

.param-group span {
  font-weight: 600;
  color: #2c3e50;
}

.admin-hotspot-selector {
  background: #fff3cd;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border: 2px solid #ffc107;
}

.admin-hotspot-selector h4 {
  margin-top: 0;
  color: #856404;
}

.hotspot-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px;
  margin: 15px 0;
}

.hotspot-type-btn {
  padding: 10px;
  background: white;
  border: 2px solid #ffc107;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s;
  color: #856404;
}

.hotspot-type-btn:hover {
  background: #ffc107;
  color: white;
  transform: scale(1.05);
}

.admin-hotspots-list {
  margin-top: 20px;
}

.admin-hotspots-list h4 {
  color: #2c3e50;
  margin-bottom: 15px;
}

.hotspot-item {
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hotspot-info {
  flex: 1;
}

.hotspot-info strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 5px;
}

.hotspot-info div {
  font-size: 0.85rem;
  color: #666;
  margin: 3px 0;
}

.hotspot-actions {
  display: flex;
  gap: 10px;
}

.hotspot-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.hotspot-btn[data-action="edit"] {
  background: #17a2b8;
  color: white;
}

.hotspot-btn[data-action="edit"]:hover {
  background: #138496;
}

.hotspot-btn[data-action="delete"] {
  background: #dc3545;
  color: white;
}

.hotspot-btn[data-action="delete"]:hover {
  background: #c82333;
}

.hotspot-btn[data-action="move"] {
  background: #28a745;
  color: white;
}

.hotspot-btn[data-action="move"]:hover {
  background: #218838;
}

/* Адаптивность */
@media (max-width: 768px) {
  .admin-panel {
    width: 100%;
  }
  
  .panorams-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}