/**
 * Magic Punk 2.0 - Sync & Backup UI
 * プレミアム感のある自動保存・復元通知システム
 */

:root {
  --sync-bg: rgba(13, 17, 23, 0.85);
  --sync-accent: #00d4ff;
  --sync-accent-glow: rgba(0, 212, 255, 0.4);
  --sync-text: #e6edf3;
  --sync-border: rgba(0, 212, 255, 0.3);
}

/* 復元通知バナー */
.sync-banner {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 20px;
  background: var(--sync-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--sync-border);
  border-radius: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 15px var(--sync-accent-glow);
  color: var(--sync-text);
  font-size: 13px;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  white-space: nowrap;
}

.sync-banner.is-active {
  top: var(--banner-top, 20px);
}

.sync-banner-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sync-banner-icon {
  color: var(--sync-accent);
  animation: sync-pulse 2s infinite;
}

.sync-banner-actions {
  display: flex;
  gap: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 16px;
}

.sync-btn {
  background: transparent;
  border: none;
  color: var(--sync-accent);
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.sync-btn:hover {
  background: rgba(0, 212, 255, 0.15);
}

.sync-btn.is-danger {
  color: #ff4a4a;
}

.sync-btn.is-danger:hover {
  background: rgba(255, 74, 74, 0.15);
}

/* 保存ステータスインジケーター */
.save-status-indicator {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  border-radius: 20px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  transition: opacity 0.3s;
}

.save-status-dot {
  width: 6px;
  height: 6px;
  background: #444;
  border-radius: 50%;
  transition: all 0.3s;
}

.save-status-indicator.is-saving .save-status-dot {
  background: var(--sync-accent);
  box-shadow: 0 0 8px var(--sync-accent);
  animation: sync-pulse 1s infinite;
}

.save-status-indicator.is-saved .save-status-dot {
  background: #2ea043;
  box-shadow: 0 0 8px rgba(46, 160, 67, 0.6);
}

@keyframes sync-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* モバイル調整 */
@media (max-width: 768px) {
  .sync-banner {
    width: 90%;
    padding: 10px 15px;
    font-size: 12px;
  }
  .sync-banner-actions {
    padding-left: 10px;
    gap: 4px;
  }
  .save-status-indicator {
    bottom: 85px;
    right: 15px;
    padding: 4px 10px;
    font-size: 10px;
  }
}
