/* Studio Workspace Styles
 * Адаптация дизайна из Figma под Bulma CSS
 * Цветовая схема: neutral (серый), orange (акценты), blue/purple/green (иконки)
 */

/* Анимация для спиннера */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Анимация пульсации для иконки интеграции */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.studio-integration-icon-pulse {
  animation: pulse 1.5s ease-in-out infinite;
  color: rgb(99, 102, 241) !important;
}

/* Unified Studio Primary Button */
.studio-btn-primary {
  background-color: #171717 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.studio-btn-primary:hover {
  background-color: #262626 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Основной контейнер - трехколоночный layout */
.studio-workspace {
  margin: 0;
  padding: 0;
  overflow: hidden;
  height: 100vh;
  background-color: #fafafa;
}

/* Переопределение толщины шрифта для заголовков Bulma в Studio */
.studio-workspace .title {
  font-weight: 400;
}

.studio-workspace .subtitle {
  font-weight: 400;
}

.studio-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* === Левая панель (Sidebar) === */
.studio-sidebar {
  width: 280px;
  min-width: 280px;
  background-color: #ffffff;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  position: relative; /* Для absolute позиционирования кнопки */
  overflow: visible !important; /* Важно: кнопка должна торчать наружу */
  z-index: 200; /* Чтобы быть выше контента на мобильных */
  transition: margin-left 0.3s ease, transform 0.3s ease;
}

.studio-sidebar-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  background-color: #ffffff;
}

.studio-sidebar-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.studio-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.studio-sidebar-logo img/* Sidebar Logo - кликабельный */
.studio-sidebar-logo {
  display: block;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}

.studio-sidebar-logo:hover {
  opacity: 0.8;
}

.studio-logo-full {
  height: 28px;
  width: auto;
}

.studio-sidebar-title {
  font-size: 1rem;
  font-weight: 400;
  color: #171717;
}

.studio-game-selector {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.studio-game-dropdown {
  width: 100%;
  border: 1px solid #d4d4d4;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-game-dropdown:hover {
  border-color: #a3a3a3;
  background-color: #fafafa;
}

.studio-new-affair-btn {
  margin: 0.75rem 1rem;
  flex-shrink: 0;
}

.studio-new-affair-btn .button {
  width: 100%;
  background-color: #171717;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s;
}

.studio-new-affair-btn .button:hover {
  background-color: #262626;
}

.studio-affairs-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
}

.studio-affairs-section {
  margin-bottom: 1.5rem;
}

.studio-affairs-list-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #737373;
  padding: 0.5rem 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.studio-affairs-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e5e5e5;
  color: #404040;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.studio-affair-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.25rem;
}

.studio-affair-item:hover {
  background-color: #fafafa;
}

.studio-affair-item.is-active {
  background-color: #f5f5f5;
}

.studio-affair-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #737373;
  margin-top: 2px;
}

.studio-affair-info {
  flex: 1;
  min-width: 0;
}

.studio-affair-title {
  font-size: 0.875rem;
  color: #171717;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.125rem;
}

.studio-affair-date {
  font-size: 0.75rem;
  color: #737373;
}

.studio-affair-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #737373;
}

.studio-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.studio-stat-item svg {
  width: 12px;
  height: 12px;
  stroke-width: 2;
}

/* === Центральная панель (Content Area) === */
.studio-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background-color: #ffffff;
}

.studio-notification {
  margin: 1rem 1.5rem 0;
  border-radius: 8px;
}

.studio-content-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e5e5;
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.studio-content-body {
  flex: 1;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Artifact Section */
.studio-artifact-section {
  margin-bottom: 2rem;
  scroll-margin-top: 6rem;
}

.studio-artifact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.studio-artifact-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.studio-artifact-icon {
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-artifact-icon.is-blue {
  background-color: #dbeafe;
}

.studio-artifact-icon.is-purple {
  background-color: #f3e8ff;
}

.studio-artifact-icon.is-orange {
  background-color: #ffedd5;
}

.studio-artifact-icon.is-green {
  background-color: #d1fae5;
}

.studio-artifact-icon svg {
  width: 20px;
  height: 20px;
}

.studio-artifact-icon.is-blue svg {
  color: #2563eb;
}

.studio-artifact-icon.is-purple svg {
  color: #9333ea;
}

.studio-artifact-icon.is-orange svg {
  color: #ea580c;
}

.studio-artifact-icon.is-green svg {
  color: #059669;
}

.studio-artifact-title {
  font-size: 1.25rem;
  font-weight: 400;
  color: #171717;
  margin: 0;
}

.studio-artifact-subtitle {
  font-size: 0.875rem;
  color: #737373;
  margin-top: 0.125rem;
}

/* === Правая панель (Artifacts Panel) === */
.studio-artifacts-panel {
  width: 320px;
  min-width: 320px;
  background-color: #ffffff;
  border-left: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200; /* Выше оверлея (z-index: 150) */
  position: fixed; /* Fixed positioning для overlay эффекта */
  right: -320px; /* Скрыт по умолчанию */
  top: 0;
  bottom: 0;
  transition: right 0.3s ease;
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
}

/* Скрытое состояние (по умолчанию) */
.studio-artifacts-panel.is-closed {
  right: -320px;
}

/* Видимое состояние */
.studio-artifacts-panel.is-visible {
  right: 0;
}

.studio-artifacts-header {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.studio-artifacts-header h2 {
  font-size: 1rem;
  font-weight: 400;
  color: #171717;
  margin-bottom: 0.25rem;
}

.studio-artifacts-header p {
  font-size: 0.875rem;
  color: #737373;
  margin: 0;
}

.studio-artifacts-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.studio-artifact-card {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.studio-artifact-card:hover {
  border-color: #d4d4d4;
  background-color: #fafafa;
}

.studio-artifact-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.studio-artifact-card-icon {
  padding: 0.5rem;
  border-radius: 8px;
  flex-shrink: 0;
}

.studio-artifact-card-icon.is-blue {
  background-color: #dbeafe;
  color: #2563eb;
}

.studio-artifact-card-icon.is-purple {
  background-color: #f3e8ff;
  color: #9333ea;
}

.studio-artifact-card-icon.is-green {
  background-color: #d1fae5;
  color: #059669;
}

.studio-artifact-card-icon svg {
  width: 16px;
  height: 16px;
}

.studio-artifact-card-content {
  flex: 1;
  min-width: 0;
}

.studio-artifact-card-title {
  font-size: 0.875rem;
  font-weight: 400;
  color: #171717;
  margin-bottom: 0.25rem;
}

.studio-artifact-card-description {
  font-size: 0.75rem;
  color: #737373;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-artifact-card-new {
  border: 2px dashed #d4d4d4;
  background-color: transparent;
}

.studio-artifact-card-new:hover {
  border-color: #fb923c;
  background-color: #fff7ed;
}

.studio-artifact-card-new .studio-artifact-card-icon {
  background-color: #ffedd5;
  color: #ea580c;
}

.studio-artifacts-upcoming {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid #e5e5e5;
}

.studio-artifacts-upcoming-title {
  font-size: 0.75rem;
  color: #737373;
  padding: 0 0.25rem 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.studio-artifact-card-placeholder {
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px dashed #d4d4d4;
  background-color: #fafafa;
  margin-bottom: 0.5rem;
}

.studio-artifact-card-placeholder .studio-artifact-card-inner {
  opacity: 0.5;
}

/* Content Cards */
.studio-card {
  display: block;
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.studio-card:hover {
  border-color: #d4d4d4;
  background-color: #fafafa;
}

.studio-card-content {
  font-size: 0.875rem;
  color: #404040;
  line-height: 1.6;
}

/* Dashboard Styles */
.studio-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.studio-stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  transition: all 0.2s;
}

.studio-stat-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.studio-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.studio-stat-icon.is-blue {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
}

.studio-stat-icon.is-purple {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.studio-stat-icon.is-green {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

.studio-stat-icon.is-orange {
  background: rgba(251, 146, 60, 0.1);
  color: #ea580c;
}

.studio-stat-content {
  flex: 1;
}

.studio-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #171717;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.studio-stat-label {
  font-size: 0.875rem;
  color: #737373;
}

.studio-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* === Hero Card для игры === */
.studio-game-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #3b82f6 50%, #dc2626 100%);
  border-radius: 16px;
  padding: 3rem;
  display: flex;
  gap: 3rem;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  margin-bottom: 2rem;
  min-height: 320px;
  position: relative;
  overflow: hidden;
}

.studio-game-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1));
  pointer-events: none;
}

.studio-game-hero-image {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 1;
}

.studio-game-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-game-hero-content {
  flex: 1;
  color: #ffffff;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.studio-game-hero-header {
  margin-bottom: 1.5rem;
}

.studio-game-hero-header .studio-artifact-icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 48px;
  height: 48px;
  backdrop-filter: blur(8px);
}

.studio-game-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}

.studio-game-hero-description {
  font-size: 1.125rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.95);
  max-width: 800px;
}

/* Адаптивность hero-карточки */
@media (max-width: 1024px) {
  .studio-game-hero-card {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
  }

  .studio-game-hero-image {
    width: 220px;
    height: 220px;
  }

  .studio-game-hero-title {
    font-size: 2rem;
  }

  .studio-game-hero-description {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .studio-game-hero-card {
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .studio-game-hero-image {
    width: 180px;
    height: 180px;
  }

  .studio-game-hero-title {
    font-size: 1.75rem;
  }
}

/* === Сетка карточек дел (3 в ряд, вертикальные) === */
.studio-affairs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1200px) {
  .studio-affairs-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .studio-affairs-grid {
    grid-template-columns: 1fr;
  }
}

/* === Карточка дела (вертикальная) === */
.studio-affair-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  transition: all 0.3s;
  cursor: pointer;
}

.studio-affair-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-color: #d4d4d4;
}

.studio-affair-card-image {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f5f5f5;
  position: relative;
}

.studio-affair-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.studio-affair-card:hover .studio-affair-card-image img {
  transform: scale(1.05);
}

.studio-affair-card-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #a3a3a3;
}

.studio-affair-card-placeholder svg {
  width: 48px;
  height: 48px;
}

.studio-affair-card-content {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.studio-affair-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #171717;
  margin: 0 0 1rem 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.studio-affair-card-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f5f5f5;
}

.studio-affair-stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #737373;
  font-size: 0.875rem;
  font-weight: 500;
}

.studio-affair-stat svg {
  flex-shrink: 0;
}

.studio-affair-card-status {
  margin-top: auto;
}

.studio-affair-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #f5f5f5;
  color: #737373;
}

.studio-affair-badge svg {
  flex-shrink: 0;
}

.studio-affair-badge.is-success {
  background: #dcfce7;
  color: #15803d;
}

.studio-affair-badge.is-warning {
  background: #fef3c7;
  color: #ca8a04;
}

.studio-game-card {
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  text-decoration: none;
  color: inherit;
}

.studio-game-card:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.studio-game-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: #fafafa;
}

.studio-game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-game-card-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.studio-game-card-placeholder svg {
  width: 48px;
  height: 48px;
  opacity: 0.8;
}

.studio-game-card-content {
  padding: 1.25rem;
}

.studio-game-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #171717;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.studio-game-card-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.studio-game-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  background: #f5f5f5;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #525252;
  font-weight: 500;
}

.studio-game-card-badge.is-success {
  background: #dcfce7;
  color: #166534;
}

.studio-game-card-badge.is-warning {
  background: #fef3c7;
  color: #92400e;
}

@media (max-width: 768px) {
  .studio-dashboard-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .studio-games-grid {
    grid-template-columns: 1fr;
  }
}

/* Character Card */
.studio-character-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.studio-character-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}

.studio-character-info {
  flex: 1;
  min-width: 0;
}

.studio-character-name {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  margin-bottom: 0.25rem;
}

.studio-character-role {
  font-size: 0.875rem;
  color: #737373;
  margin-bottom: 0.5rem;
}

.studio-character-description {
  font-size: 0.875rem;
  color: #404040;
  margin-bottom: 0.5rem;
}

.studio-character-motive {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.5rem;
  background-color: #fff7ed;
  color: #c2410c;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Evidence Card - старый стиль */
.studio-evidence-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.studio-evidence-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #d1fae5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
}

.studio-evidence-content {
  flex: 1;
}

.studio-evidence-title {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  margin-bottom: 0.5rem;
}

.studio-evidence-description {
  font-size: 0.875rem;
  color: #404040;
  margin-bottom: 0.5rem;
}

.studio-evidence-significance {
  padding: 0.75rem;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
}

.studio-evidence-significance-text {
  font-size: 0.75rem;
  color: #15803d;
}

.studio-evidence-significance-label {
  opacity: 0.75;
}

/* Evidence Grid - новый стиль 2-колоночный */
.studio-evidences-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 карточки в ряду на больших экранах */
  gap: 1rem;
  margin-bottom: 1rem;
}

.studio-evidence-grid-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.studio-evidence-grid-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.studio-evidence-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4; /* Вертикальный формат как игровая карточка */
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
}

.studio-evidence-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}

.studio-evidence-image-container:hover .studio-evidence-image {
  transform: scale(1.05);
}

.studio-evidence-image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4; /* Вертикальный формат как игровая карточка */
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-evidence-placeholder-icon svg {
  width: 48px;
  height: 48px;
  color: #a3a3a3;
}

/* Оверлеи поверх изображения */
.studio-evidence-overlays {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.studio-evidence-overlay {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(8px);
  pointer-events: auto;
  transition: all 0.2s;
}

/* Контейнер для номера и типа в левом верхнем углу */
.studio-overlay-top-left {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* Номер улики */
.studio-overlay-number {
  position: static;
  background: rgba(23, 23, 23, 0.8);
  color: #ffffff;
  font-weight: 600;
  gap: 0;
}

/* Тип улики */
.studio-overlay-type {
  position: static;
}

.studio-overlay-type.is-success {
  background: rgba(5, 150, 105, 0.9);
  color: #ffffff;
}

.studio-overlay-type.is-warning {
  background: rgba(217, 119, 6, 0.9);
  color: #ffffff;
}

/* Очки - правый нижний угол */
.studio-overlay-score {
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(37, 99, 235, 0.9);
  color: #ffffff;
}

/* Кнопка редактирования - правый верхний угол */
.studio-overlay-edit {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.9);
  color: #171717;
  padding: 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.studio-overlay-edit:hover {
  background: rgba(255, 255, 255, 1);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.studio-overlay-edit svg {
  display: block;
}

/* Форма для кнопки публикации - позиционируем слева от редактирования */
.studio-overlay-publish-form {
  position: absolute !important;
  top: 0.5rem !important;
  right: 4.75rem !important;
}

/* Кнопка публикации улики */
.studio-overlay-publish {
  background: rgba(255, 255, 255, 0.9);
  color: #171717;
  padding: 0.5rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.studio-overlay-publish:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.studio-overlay-publish.is-published {
  background: rgba(34, 197, 94, 0.9);
  color: white;
}

.studio-overlay-publish.is-published:hover {
  background: rgba(34, 197, 94, 1);
}

.studio-overlay-publish.is-draft {
  background: rgba(251, 191, 36, 0.9);
  color: #78350f;
}

.studio-overlay-publish.is-draft:hover {
  background: rgba(251, 191, 36, 1);
}

.studio-overlay-publish svg {
  display: block;
}

.studio-evidence-grid-content {
  padding: 1rem;
}

.studio-evidence-grid-title {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  line-height: 1.4;
  margin: 0 0 0.75rem 0;
}

.studio-evidence-grid-description {
  font-size: 0.875rem;
  color: #404040;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.studio-evidence-ai-controls {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
}

.studio-evidence-loader {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  font-size: 0.875rem;
  color: rgb(99, 102, 241);
  margin-bottom: 0.75rem;
}

.studio-evidence-ai-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  font-size: 0.875rem;
  color: rgb(99, 102, 241);
}

.studio-evidence-ai-loader .studio-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: rgb(99, 102, 241);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.studio-evidence-loader .studio-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-top-color: rgb(99, 102, 241);
}

.studio-ai-form {
  display: flex;
  flex-direction: column;
}

/* Inline AI controls - иконки в одну строку */
.studio-ai-form-inline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Форма-обертка для AI генерации в оверлее (не имеет собственного позиционирования) */
.studio-overlay-ai-form-wrapper {
  pointer-events: auto; /* Включаем клики на форме */
}

/* Контейнер для кнопок AI - позиционирован в левом нижнем углу */
.studio-overlay-ai-buttons {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
}

.studio-ai-inline-controls {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

/* Кнопки AI в оверлее */
.studio-overlay-ai-prompt,
.studio-overlay-ai-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  cursor: pointer;
  color: #404040;
  transition: all 0.2s;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
}

.studio-overlay-ai-prompt:hover,
.studio-overlay-ai-generate:hover {
  background: #171717;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Поле ввода промпта поверх изображения */
.studio-overlay-prompt-field {
  position: absolute;
  bottom: 3rem;
  left: 5%;
  right: 5%;
  width: 90%;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 15;
}

.studio-overlay-prompt-textarea {
  width: 100%;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  padding: 0.5rem;
  font-size: 0.875rem;
  resize: none;
  font-family: inherit;
}

.studio-overlay-prompt-textarea:focus {
  outline: none;
  border-color: #171717;
}

/* Старые стили для совместимости */
.studio-ai-form-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-ai-toggle {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #404040;
  transition: all 0.2s;
}

.studio-ai-toggle:hover {
  background: #e5e5e5;
  color: #171717;
}

.studio-ai-generate-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: #171717;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-ai-generate-btn:hover {
  background: #262626;
}

.studio-ai-generate-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.studio-ai-form-content {
  margin-top: 0.75rem;
}

.studio-ai-textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  font-size: 0.875rem;
  resize: vertical;
  background: #ffffff;
  transition: all 0.2s;
}

.studio-ai-textarea:focus {
  outline: none;
  border-color: #171717;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.1);
}


/* Responsive */
@media (max-width: 1400px) {
  .studio-evidences-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 карточки на средних экранах */
  }
}

@media (max-width: 1024px) {
  .studio-evidences-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 карточки на планшетах */
  }
}

@media (max-width: 480px) {
  .studio-evidences-grid {
    grid-template-columns: 1fr; /* 1 карточка на мобильных */
  }
}

/* Question Card */
.studio-question-card {
  position: relative;
}

.studio-question-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0 1rem;
}

.studio-question-number {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #2563eb;
  background: rgba(37, 99, 235, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.studio-question-edit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: #6b7280;
  transition: all 0.15s ease;
}

.studio-question-edit-icon:hover {
  background: #f3f4f6;
  color: #2563eb;
}

.studio-question-edit-icon svg {
  width: 16px;
  height: 16px;
}

.studio-question-card .studio-card-content {
  padding-top: 1rem;
}

.studio-question-title {
  font-weight: 600;
  font-size: 1rem;
  color: #171717;
  margin-bottom: 1rem;
}

.studio-answers-grid {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.studio-answer-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: #fafafa;
  border: 1.5px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #404040;
  transition: all 0.15s ease;
}

.studio-answer-option.is-correct {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}

.studio-answer-number {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  font-weight: 600;
  font-size: 0.75rem;
  color: #6b7280;
}

.studio-answer-option.is-correct .studio-answer-number {
  background: #22c55e;
  color: white;
}

.studio-answer-text {
  flex: 1;
}

.studio-answer-badge {
  font-size: 0.875rem;
  color: #22c55e;
  font-weight: 600;
}

.studio-question-correct-info {
  padding: 0.75rem;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #15803d;
}

.studio-answers-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.studio-answer-item {
  padding: 0.75rem;
  background-color: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: #404040;
}

/* Empty State */
.studio-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.studio-empty-icon {
  display: inline-flex;
  padding: 0.75rem;
  background-color: #f5f5f5;
  border-radius: 50%;
  margin-bottom: 0.75rem;
}

.studio-empty-icon svg {
  width: 24px;
  height: 24px;
  color: #a3a3a3;
}

.studio-empty-title {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  margin-bottom: 0.25rem;
}

.studio-empty-description {
  font-size: 0.875rem;
  color: #737373;
}

/* Form Styles */
.studio-form {
  background-color: #ffffff;
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  margin-bottom: 1.5rem;
}

.studio-form .field {
  margin-bottom: 1.5rem;
}

.studio-form .label {
  font-weight: 500;
  color: #171717;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.studio-form .input,
.studio-form .textarea,
.studio-form .select select,
.studio-form .file-input {
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background-color: #fafafa;
  transition: all 0.2s;
}

.studio-form .input:focus,
.studio-form .textarea:focus,
.studio-form .select select:focus {
  border-color: #171717;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.1);
  background-color: #ffffff;
}

.studio-form .help {
  color: #737373;
  font-size: 0.8125rem;
  margin-top: 0.375rem;
}

.studio-form .notification {
  border-radius: 8px;
  border: 1px solid;
}

.studio-form .notification.is-danger {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.studio-form .tabs {
  margin-bottom: 1rem;
}

.studio-form .tabs li {
  margin: 0 0.25rem;
}

.studio-form .tabs a {
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  color: #737373;
  font-size: 0.875rem;
  padding: 0.5rem 1rem;
}

.studio-form .tabs li.is-active a {
  background-color: #171717;
  color: #ffffff;
  border-color: #171717;
}

.studio-form .tabs a:hover {
  background-color: #fafafa;
  border-color: #d4d4d4;
}

.studio-form .tabs li.is-active a:hover {
  background-color: #262626;
  border-color: #262626;
}

/* Кнопки внутри формы */
.studio-form .button.is-dark {
  background-color: #171717;
  border-color: #171717;
  color: #ffffff !important;
}

.studio-form .button.is-dark:hover {
  background-color: #262626;
  border-color: #262626;
  color: #ffffff !important;
}

.studio-form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e5e5;
}

.studio-form-actions .button {
  border-radius: 8px;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
}

.studio-form-actions .button.is-success {
  background-color: #171717;
  border-color: #171717;
  color: #ffffff !important;
}

.studio-form-actions .button.is-success:hover {
  background-color: #262626;
  border-color: #262626;
  color: #ffffff !important;
}

.studio-form-actions .button.is-light {
  background-color: #f5f5f5;
  border-color: #e5e5e5;
  color: #171717;
}

.studio-form-actions .button.is-light:hover {
  background-color: #e5e5e5;
  border-color: #d4d4d4;
}

.studio-page-header {
  padding: 1.5rem 2rem;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 1.5rem;
}

.studio-page-header .title {
  color: #171717;
  margin-bottom: 0;
}

.studio-page-header .subtitle {
  color: #737373;
  margin-bottom: 0;
}

.studio-form-sidebar {
  position: sticky;
  top: 1.5rem;
}

.studio-form-sidebar .box {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.studio-form-sidebar .box .title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #171717;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Inline редактирование */
.inline-editable-field {
  margin-bottom: 0.5rem;
}

.inline-edit-display {
  display: flex;
  align-items: center;
  min-height: 2rem;
}

.inline-edit-trigger {
  opacity: 0;
  transition: opacity 0.2s;
  padding: 0.25rem 0.5rem;
  border: none;
  background: transparent;
  color: #737373;
  cursor: pointer;
}

.inline-editable-field:hover .inline-edit-trigger {
  opacity: 1;
}

.inline-edit-trigger:hover {
  color: #171717;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.inline-edit-form .field.has-addons {
  margin-bottom: 0;
}

.inline-edit-form .input,
.inline-edit-form .textarea {
  font-size: 1rem;
  border-radius: 6px;
  border-color: #e5e5e5;
}

.inline-edit-form .input:focus,
.inline-edit-form .textarea:focus {
  border-color: #171717;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.1);
}

.inline-edit-form .buttons {
  display: flex;
  gap: 0.5rem;
}

.inline-edit-form .button.is-success {
  background-color: #171717;
  color: #ffffff;
  border: none;
}

.inline-edit-form .button.is-success:hover {
  background-color: #262626;
}

.inline-edit-form .button.is-light {
  background-color: #f5f5f5;
  border-color: #e5e5e5;
}

.inline-edit-form .button.is-light:hover {
  background-color: #e5e5e5;
}

/* Преамбула с обтеканием изображения */
.studio-preamble-container {
  overflow: auto;
}

.studio-preamble-image {
  float: left;
  width: 280px;
  margin: 0 2rem 1rem 0;
}

.studio-preamble-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.studio-preamble-image img:hover {
  transform: scale(1.02);
}

.studio-preamble-cover {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
}

.studio-preamble-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #a3a3a3;
}

.studio-preamble-placeholder svg {
  width: 48px;
  height: 48px;
}

.studio-preamble-placeholder span {
  font-size: 0.875rem;
}

.studio-preamble-ai-controls {
  margin-top: 1rem;
}

.studio-preamble-text {
  line-height: 1.8;
  font-size: 1rem;
  color: #171717;
}

.studio-preamble-text p {
  margin-bottom: 1em;
}

/* Кнопка скрытия/показа сайдбара */
.studio-sidebar-toggle {
  position: absolute; /* Относительно сайдбара */
  right: -24px; /* Торчит за правый край сайдбара */
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  background: white;
  border: 1px solid #e5e5e5;
  border-left: none;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  z-index: 300; /* Очень высокий z-index чтобы быть поверх всего */
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 2px 0 5px rgba(0,0,0,0.05); /* Тень чтобы выделить кнопку */
}

.studio-sidebar-toggle:hover {
  background: #f5f5f5;
}

.studio-sidebar.is-closed .studio-sidebar-toggle svg {
  transform: rotate(180deg);
}

/* Desktop Logic (Default) */
.studio-sidebar.is-closed {
  margin-left: -280px; /* Скрываем смещением и освобождаем место */
  transform: none;
}

/* Оверлей для мобильных панелей */
.studio-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 150;
  cursor: pointer;
}

.studio-overlay.is-active {
  display: block;
}

/* Кнопка для настроек - всегда видна */
.studio-artifacts-toggle {
  display: inline-flex !important;
}

/* Сайдбар с характеристиками дела */
.studio-sidebar-section {
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem;
}

.studio-sidebar-section:last-child {
  border-bottom: none;
}

.studio-sidebar-section-header {
  margin-bottom: 1rem;
}

.studio-sidebar-section-header h3 {
  font-size: 0.875rem;
  font-weight: 500;
  color: #171717;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

.studio-sidebar-section-content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* AI Интеграции */
.studio-integration-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  background-color: #fafafa;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
}

.studio-integration-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #737373;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.studio-integration-value {
  font-size: 0.875rem;
  color: #171717;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-integration-badge {
  font-size: 0.7rem;
  padding: 0.125rem 0.5rem;
  background-color: #e0e7ff;
  color: #4f46e5;
  border-radius: 4px;
  font-weight: 500;
}

/* Статистика игры */
.studio-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.studio-stat-item:last-child {
  border-bottom: none;
}

.studio-stat-label {
  font-size: 0.875rem;
  color: #737373;
}

.studio-stat-value {
  font-size: 1rem;
  font-weight: 600;
  color: #171717;
}

/* Изображение обложки */
.studio-sidebar-image-container {
  margin-bottom: 0.75rem;
}

.studio-sidebar-image {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.studio-sidebar-image:hover {
  transform: scale(1.02);
}

.studio-sidebar-image-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #f5f5f5 0%, #e5e5e5 100%);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: #a3a3a3;
}

.studio-sidebar-image-placeholder svg {
  width: 32px;
  height: 32px;
}

.studio-sidebar-image-placeholder span {
  font-size: 0.875rem;
}

.studio-sidebar-ai {
  margin-top: 0.75rem;
}

/* Характеристики */
.studio-characteristic {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.studio-characteristic-label {
  font-size: 0.875rem;
  color: #737373;
}

.studio-characteristic-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #171717;
}

.studio-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #737373;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
}

.studio-characteristic:hover .studio-edit-btn {
  opacity: 1;
}

.studio-edit-btn:hover {
  background: #f5f5f5;
  color: #171717;
}

/* Шаблоны промптов */
.studio-prompt-template {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.studio-prompt-template-label {
  font-size: 0.75rem;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.studio-prompt-template-link {
  font-size: 0.875rem;
  color: #2563eb;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.studio-prompt-template-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.studio-empty-small {
  padding: 1rem 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 1024px) {
  /* Левый сайдбар как overlay на планшетах и мобильных */
  .studio-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: 200;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.1);
  }
  
  /* Reset default closed state (margin) and use transform */
  .studio-sidebar.is-closed {
    margin-left: 0;
    transform: translateX(-100%);
  }
  
  /* Контент занимает всю ширину */
  .studio-content {
    margin-left: 0 !important;
    width: 100%;
  }
  
  /* Скрываем правый блок на планшетах и мобильных */
  /* Правый сайдбар - уже fixed positioning, просто убеждаемся */
  .studio-artifacts-panel {
    /* Все стили уже определены выше для desktop, здесь ничего менять не нужно */
  }
  
  /* Показываем кнопку */
  .studio-artifacts-toggle {
    display: inline-flex !important;
  }
  
  /* Показываем оверлей когда открыт любой из сайдбаров */
  .studio-overlay.is-active {
    display: block;
  }
}

@media (max-width: 768px) {
  /* На мобильных уменьшаем изображение в преамбуле */
  .studio-preamble-image {
    width: 180px;
    margin-right: 1rem;
  }
  
  .studio-sidebar {
    width: 240px;
    min-width: 240px;
  }
}

@media (max-width: 480px) {
  /* На маленьких экранах убираем обтекание */
  .studio-preamble-image {
    float: none;
    width: 100%;
    margin: 0 0 1rem 0;
  }
}

/* Canvas Section - параметры генерации */
.studio-generation-params {
  margin: 1rem 0;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.studio-param-label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0;
}

.studio-param-label-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.studio-select {
  padding: 0.5rem 0.75rem;
  background: white;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s ease;
  max-width: 200px;
}

.studio-select:hover {
  border-color: #9ca3af;
}

.studio-select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Canvas Section Styles */
.studio-canvas-container {
  position: relative;
}

/* Canvas Card - улучшенный дизайн вдохновленный Claude */
.studio-canvas-card {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
}

.studio-canvas-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.studio-canvas-content {
  padding: 2rem;
  min-height: 120px;
}

.studio-canvas-text {
  font-size: 1.0625rem; /* Увеличенный шрифт 17px */
  line-height: 1.7;
  color: #171717;
}

.studio-canvas-text p {
  margin-bottom: 1em;
}

.studio-canvas-actions {
  display: flex;
  align-items: center;
  padding: 0.75rem 2rem;
  border-top: 1px solid #f5f5f5;
  background-color: #fafafa;
}

.studio-canvas-action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: #737373;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-canvas-action-btn:hover {
  background-color: #ffffff;
  color: #171717;
  border-color: #d4d4d4;
}

.studio-canvas-action-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Canvas AI Section */
.studio-canvas-ai-section {
  padding: 1rem 2rem 2rem;
  border-top: 1px solid #f5f5f5;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.studio-integration-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.studio-integration-info {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #404040;
}

.studio-integration-info .icon {
  margin-right: 0.5rem;
}

.studio-integration-info svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.studio-ai-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-ai-generate-compact-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #171717;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-ai-generate-compact-btn:hover {
  background-color: #262626;
}

.studio-ai-generate-compact-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* AI Response Row */
.studio-ai-response-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: #f5f5f5;
  border-radius: 8px;
  gap: 1rem;
}

.studio-ai-response-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: #404040;
}

.studio-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.875rem;
  padding: 0;
}

.studio-link-btn:hover {
  color: #1d4ed8;
}

.studio-parse-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-parse-btn {
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  color: #171717;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-parse-btn:hover {
  background-color: #f5f5f5;
  border-color: #a3a3a3;
}

.studio-integration-warning {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 0.875rem;
}

.studio-integration-warning .icon {
  margin-right: 0.5rem;
}

.studio-integration-warning svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

/* Canvas Edit Mode - inline textarea */
/* Canvas inline editing - текстовое поле без рамок, как сам текст */
.studio-canvas-inline-edit {
  width: 100%;
  border: none;
  outline: none;
  resize: vertical;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  padding: 0;
  background: transparent;
  color: inherit;
}

.studio-canvas-inline-edit:focus {
  background: rgba(99, 102, 241, 0.02);
  border-radius: 4px;
  padding: 0.5rem;
}

.studio-canvas-inline-textarea {
  width: 100%;
  min-height: 200px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 0;
  font-size: 1.0625rem; /* Соответствует размеру текста */
  line-height: 1.7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  resize: vertical;
  transition: all 0.2s;
  background-color: #ffffff;
}

.studio-canvas-inline-textarea:focus {
  outline: none;
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(23, 23, 23, 0.1);
}

.studio-canvas-inline-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f5f5f5;
}

.studio-canvas-inline-actions .help {
  margin-left: auto;
  color: #737373;
}

/* Old Edit Mode Styles - To Remove */
.studio-canvas-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid #e5e5e5;
}

.studio-canvas-edit-header .title {
  margin: 0;
}

.studio-canvas-edit-header .button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.studio-canvas-edit-header svg {
  width: 16px;
  height: 16px;
}

.studio-canvas-edit-content {
  padding: 2rem;
}

.studio-canvas-editor {
  min-height: 250px;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  font-size: 1.0625rem; /* Увеличенный шрифт 17px */
  line-height: 1.7;
}

.studio-canvas-editor:focus {
  border-color: #171717;
  box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.1);
}

/* Trix editor content styling */
trix-editor.studio-canvas-editor {
  padding: 1.5rem;
}

trix-editor.studio-canvas-editor p {
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* Old Canvas Styles - To Remove */
.studio-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e5e5;
}

.studio-canvas-edit-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #171717;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.studio-canvas-edit-btn:hover {
  background-color: #262626;
}

.studio-canvas-edit-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.5;
}

.studio-ai-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Studio Details (Collapsible) */
.studio-details summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.studio-details summary::-webkit-details-marker {
  display: none;
}

.studio-details[open] summary svg {
  transform: rotate(180deg);
}

.studio-details summary svg {
  transition: transform 0.2s;
}
