/* 文章打字机效果样式 */
.post-typewriter-container {
  margin: 20px 0 30px 0;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

/* 深色模式适配 */
[data-theme="dark"] .post-typewriter-container {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  box-shadow: 0 8px 32px rgba(255, 255, 255, 0.05);
}

/* 标题样式 */
.post-typewriter-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  z-index: 1;
}

.post-typewriter-header i {
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
}

.post-typewriter-title {
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.post-typewriter-container::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: rotate(45deg);
  animation: typewriter-shimmer 3s infinite;
}

.post-typewriter-content {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  position: relative;
  z-index: 1;
}

.post-typewriter-icon {
  color: rgba(255, 255, 255, 0.8);
  font-size: 24px;
  margin-top: 2px;
  flex-shrink: 0;
}

.post-typewriter-text {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  flex: 1;
  min-height: 1.6em;
  word-wrap: break-word;
  word-break: break-word;
}

.post-typewriter-cursor {
  color: #ffffff;
  font-size: 18px;
  font-weight: bold;
  margin-left: 2px;
  align-self: flex-start;
  margin-top: 1px;
}

/* 光标闪烁动画 */
@keyframes typewriter-cursor-blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

/* 背景闪光动画 */
@keyframes typewriter-shimmer {
  0% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
  50% {
    transform: translateX(100%) translateY(100%) rotate(45deg);
  }
  100% {
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
  }
}

/* 平板适配 (768px - 1024px) */
@media screen and (max-width: 1024px) and (min-width: 768px) {
  .post-typewriter-container {
    margin: 18px 0 25px 0;
    padding: 18px;
    border-radius: 10px;
  }
  
  .post-typewriter-header {
    margin-bottom: 12px;
    padding-bottom: 8px;
  }
  
  .post-typewriter-header i {
    font-size: 17px;
  }
  
  .post-typewriter-title {
    font-size: 15px;
  }
  
  .post-typewriter-content {
    gap: 12px;
  }
  
  .post-typewriter-icon {
    font-size: 22px;
  }
  
  .post-typewriter-text {
    font-size: 15px;
    line-height: 1.5;
  }
  
  .post-typewriter-cursor {
    font-size: 17px;
  }
}

/* 手机适配 (最大768px) */
@media screen and (max-width: 768px) {
  .post-typewriter-container {
    margin: 15px 0 20px 0;
    padding: 15px;
    border-radius: 8px;
  }
  
  .post-typewriter-header {
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  
  .post-typewriter-header i {
    font-size: 16px;
  }
  
  .post-typewriter-title {
    font-size: 14px;
  }
  
  .post-typewriter-content {
    gap: 10px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .post-typewriter-icon {
    font-size: 20px;
    margin-top: 0;
    align-self: flex-start;
  }
  
  .post-typewriter-text {
    font-size: 14px;
    line-height: 1.5;
    margin-left: 0;
  }
  
  .post-typewriter-cursor {
    font-size: 16px;
    margin-left: 0;
    margin-top: -2px;
  }
}

/* 小屏手机适配 (最大480px) */
@media screen and (max-width: 480px) {
  .post-typewriter-container {
    margin: 12px 0 18px 0;
    padding: 12px;
    border-radius: 6px;
  }
  
  .post-typewriter-header {
    margin-bottom: 8px;
    padding-bottom: 5px;
  }
  
  .post-typewriter-header i {
    font-size: 15px;
  }
  
  .post-typewriter-title {
    font-size: 13px;
  }
  
  .post-typewriter-content {
    gap: 8px;
  }
  
  .post-typewriter-icon {
    font-size: 18px;
  }
  
  .post-typewriter-text {
    font-size: 13px;
    line-height: 1.4;
  }
  
  .post-typewriter-cursor {
    font-size: 15px;
  }
}

/* 横屏模式适配 */
@media screen and (max-height: 500px) and (orientation: landscape) {
  .post-typewriter-container {
    margin: 10px 0 15px 0;
    padding: 10px;
  }
  
  .post-typewriter-header {
    margin-bottom: 6px;
    padding-bottom: 4px;
  }
  
  .post-typewriter-header i {
    font-size: 14px;
  }
  
  .post-typewriter-title {
    font-size: 12px;
  }
  
  .post-typewriter-content {
    gap: 8px;
  }
  
  .post-typewriter-icon {
    font-size: 16px;
  }
  
  .post-typewriter-text {
    font-size: 12px;
    line-height: 1.3;
  }
  
  .post-typewriter-cursor {
    font-size: 14px;
  }
}

/* 减少动画效果以提升性能（针对低端设备） */
@media (prefers-reduced-motion: reduce) {
  .post-typewriter-container::before {
    animation: none;
  }
  
  .post-typewriter-cursor {
    animation: none !important;
    opacity: 1;
  }
} 