/* ==================== Dice Panel Styles ==================== */
.dice-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0; /* tab-content已有padding，这里不需要 */
  background-color: var(--color-bg-secondary);
  overflow: hidden;
}

/* 标题栏 */
.dice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background-color: var(--color-bg-tertiary);
  border-bottom: 1px solid var(--color-border-light);
}

.dice-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.dice-help {
  font-size: 11px;
  color: var(--color-text-muted);
  cursor: help;
}

/* 主内容区 */
.dice-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0; /* 移除内部padding，依赖外层tab-content */
  gap: 12px;
  overflow-y: auto;
}

/* 输入区域 */
.dice-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dice-input-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dice-input-label {
  font-size: 11px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.dice-input {
  width: 100%;
  padding: 6px 10px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
  font-size: 13px;
  font-family: 'Courier New', monospace;
  transition: all var(--transition-fast);
}

.dice-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px var(--color-accent-light);
}

.dice-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

/* VS 分隔符 */
.dice-vs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent);
  background-color: var(--color-accent-ultra-light);
  border-radius: var(--radius-full);
  margin-top: 18px;
}

/* 按钮区域 */
.dice-actions {
  display: flex;
  gap: 8px;
}

.dice-roll-btn {
  flex: 1;
  padding: 8px 16px;
  background-color: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  color: white;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dice-roll-btn:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.dice-roll-btn:active {
  transform: translateY(0);
}

.dice-clear-btn {
  padding: 8px 12px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.dice-clear-btn:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-text-muted);
  color: var(--color-text-primary);
}

/* 结果展示区 */
.dice-result {
  flex: 1;
  min-height: 120px;
  padding: 12px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow-y: auto;
}

.dice-result-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 12px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* 单次掷骰结果 */
.dice-result-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.dice-result-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.dice-result-time {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.dice-result-comparison {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  margin-bottom: 8px;
}

.dice-result-side {
  flex: 1;
  text-align: center;
}

.dice-result-label {
  font-size: 11px;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}

.dice-result-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-accent);
  font-family: 'Courier New', monospace;
}

.dice-result-detail {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
  font-family: 'Courier New', monospace;
}

.dice-result-winner {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-success);
  text-align: center;
  margin-top: 8px;
  padding: 4px 8px;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
}

.dice-result-tie {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-warning);
  text-align: center;
  margin-top: 8px;
  padding: 4px 8px;
  background-color: rgba(245, 158, 11, 0.1);
  border-radius: var(--radius-sm);
}

/* 结果动画效果 */
@keyframes resultFlash {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-result {
  animation: resultFlash 0.3s ease-in-out;
}

/* 滚动条样式 */
.dice-content::-webkit-scrollbar,
.dice-result::-webkit-scrollbar {
  width: 4px;
}

.dice-content::-webkit-scrollbar-track,
.dice-result::-webkit-scrollbar-track {
  background: transparent;
}

.dice-content::-webkit-scrollbar-thumb,
.dice-result::-webkit-scrollbar-thumb {
  background-color: var(--color-scrollbar);
  border-radius: var(--radius-full);
}

.dice-content::-webkit-scrollbar-thumb:hover,
.dice-result::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-scrollbar-hover);
}
